Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet: non-helpful error messages when receiving from the "wrong" mintUrl #184

Open
Egge21M opened this issue Oct 12, 2024 · 0 comments
Open

Comments

@Egge21M
Copy link
Collaborator

Egge21M commented Oct 12, 2024

When receiving proofs from mint a on a wallet instance connected to mint b, receive() throws a not so helpful error.

/Users/egge/Projects/btcplusplus24-code/cashu.js:3188
          var _this = _super.call(this, message) || this;
                             ^

Error: '009a1f293253e41e'
    at new HttpResponseError2 (/Users/egge/Projects/btcplusplus24-code/cashu.js:3188:30)
    at /Users/egge/Projects/btcplusplus24-code/cashu.js:3347:21
    at step (/Users/egge/Projects/btcplusplus24-code/cashu.js:3299:21)
    at Object.next (/Users/egge/Projects/btcplusplus24-code/cashu.js:3251:18)
    at fulfilled (/Users/egge/Projects/btcplusplus24-code/cashu.js:3223:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
  status: 400
}

receive should probably compare the keysets and if it does not match it should error.
We could also introduce a general utility that would allow you to receive from unknown mints, by parsing the mintUrl from the token.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant