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

feat(btc): report extra context in the TxBuildError #272

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

ShookLyngs
Copy link
Collaborator

Changes

  • Add a context prop in the TxBuildError to report more info; The TxBuilderError.context.tx (a TxBuilder object) should exist when the BTC Builder APIs fail. For example, you should be able to visit the context when calling the sendBtc API and it fails:
    try {
      await sendBtc(...);
    } catch (e) {
      if (e instanceof TxBuildError) {
        console.log(e.context.tx); // TxBuilder
      }
    }
  • Update the message of the MISSING_PUBKEY error
    Missing a pubkey that pairs with the address, it is required for the P2TR UTXO included in the transaction: {address}
    

Related issues

@ShookLyngs ShookLyngs requested review from Flouse and duanyytop August 8, 2024 06:44
duanyytop
duanyytop previously approved these changes Aug 8, 2024
@Flouse Flouse added this pull request to the merge queue Aug 8, 2024
Merged via the queue into develop with commit e24c526 Aug 8, 2024
3 checks passed
@Flouse Flouse deleted the feat/tx-build-error-context branch August 8, 2024 07:31
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

Successfully merging this pull request may close these issues.

The MISSING_PUBKEY error is not clear enough
3 participants