Skip to content

[Critical] Wallet keys are not created #104

@leobz

Description

@leobz

Summary

Wallet key creation is not working. This produces a failure in the creation of new users.

Reason: The endpoint currently used to create keys (" GET https://legend.lnbits.com/wallet?nme=Bookmark") returns the following error "Missing user ID or access token."

Technical Details

Code

  def get_new_wallet_key do
    {:ok, response} =
      Req.request(
        url: "https://legend.lnbits.com/wallet?nme=Bookmark",
        method: :get
      )

    key =
       ...
            Regex.run( 
              ~r/Admin key: <\/strong><em>(.*)<\/em>/,
              response.body
            )
        ...
    key
  end

Error

** (FunctionClauseError) no function clause matching in Regex.run/3                                                                                                                  
  (elixir 1.14.3) lib/regex.ex:335: Regex.run(~r/Admin key: <\/strong><em>(.*)<\/em>/, %{"detail" => "Missing user ID or access token."}, [])
    (bookmark 0.1.0) lib/bookmark_web/controllers/wallet_controller.ex:45: BookmarkWeb.WalletController.get_new_wallet_key/0                  

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions