-
-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/implement confirm send UI #536
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
base: main
Are you sure you want to change the base?
Conversation
}; | ||
|
||
const interfaceId = | ||
await this.#sendFlowRepository.insertUnifiedSendForm(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should be something like insertConfirmation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to insertConfirmSendForm
to be make the relationship with confirmSend
method obvious.
).psbt; | ||
|
||
const parsedPsbt = parsePsbt(signedPsbt); | ||
return account.extractTransaction(parsedPsbt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Type Mismatch in PSBT Parsing
In confirmSendFlow
, the parsePsbt
function receives a Psbt
object instead of a string. After signPsbt
returns a Psbt
instance, it's passed directly to parsePsbt
, which expects a string representation. This type mismatch causes a runtime error, preventing transaction extraction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is wrong. On line 150 the .psbt
is a string
(Promise<{ psbt: string; txid?: Txid }> {
.
Note
Introduce a unified confirm-send flow that builds PSBTs, prompts for confirmation via a new UI, signs/broadcasts via AccountUseCases, and updates handler/tests and link safety.
confirmSendFlow(account, amount, toAddress)
to build PSBTs (uses fee estimates or fallback, supports drain when amount equals balance), present confirmation, then sign/broadcast viaAccountUseCases
, returning the builtTransaction
.refresh
.AccountUseCases
dependency and wire insrc/index.ts
.UnifiedSendFormView
with fees/amount display and confirm/cancel; export viainfra/jsx/unified-send-flow
.isValidSnapLinkProtocol
and use it to guard links inReviewTransactionView
.ConfirmSendFormContext
andSendFlowRepository.insertConfirmSendForm
.insertConfirmSendForm
inJSXSendFlowRepository
.confirmSend
now delegates toSendFlowUseCases.confirmSendFlow
and maps result; normalize insufficient-fee errors to validation response.RpcHandler.test
to expect delegation toconfirmSendFlow
and new error paths; add comprehensive tests forconfirmSendFlow
(build, drain, fee fallback, cancellation, errors, exchange rates).snap_dialog
; skip insufficient-fee test due to drain behavior.shasum
insnap.manifest.json
.Written by Cursor Bugbot for commit 9b756c3. This will update automatically on new commits. Configure here.