feat(wallet): transaction history sheet, Send/Receive as bottom sheets, Receive redesign#607
Open
dmnyc wants to merge 5 commits into
Open
feat(wallet): transaction history sheet, Send/Receive as bottom sheets, Receive redesign#607dmnyc wants to merge 5 commits into
dmnyc wants to merge 5 commits into
Conversation
PaymentDetails.Deposit and PaymentDetails.Withdraw are now recognized as on-chain payments; their txId is used as the payment hash instead of the UUID payment ID. Adds pending and isOnchain fields to WalletTransaction.
Tapping a row in the full transaction history sheet expands an inline detail panel showing status, type (on-chain/Lightning), amount, network fee, date, note, and payment hash with a copy icon. On-chain transactions get a "View on mempool.space" link. Compact home-screen list is unchanged.
…prefix handling WalletProvider interface gains transactionsChanged SharedFlow (emitted on payment succeeded/failed/pending) and makeInvoice(expirySecs: Int = 3600). SparkRepository also calls refreshBalanceInternal() on PaymentPending. NwcRepository wires expirySecs through to Nip47 MakeInvoice. Nip47 serializes optional expiry field per NIP-47. WalletViewModel: setSendAmount(), processInput strips bitcoin:/BITCOIN: prefix, generateInvoice threads expirySecs through to the provider.
Contributor
Author
|
@barrydeen The on-chain features here and in barrydeen/dark-wisp-android#49 and barrydeen/wisp-ios#395 are for display purposes only. All send/receive functionality is out of scope here. |
… address QR Send, Receive, and Transactions each present as full-page ModalBottomSheets over the Home dashboard (swipe down to dismiss), matching iOS behavior. WalletSheetDragHandle pushes the grab handle below the status bar so it clears the camera cutout on full-height sheets. Receive screen redesign: expiry selector (1 h / 24 h / Custom) replaces the Invoice/Address tab row. Lightning address shown as a compact row below the Create invoice button with bolt icon, address, QR toggle, and copy. Tapping the QR icon expands an inline QR card within the sheet and auto-scrolls to it; tapping again collapses. Loading indicator only appears after the Create invoice button is pressed, not on sheet open. Send screen redesign: tall dark-card BasicTextField replaces OutlinedTextField; Scan / Paste / Gallery action row replaces OutlinedButton pair; accent-colored Next button with disabled state. Strings: wallet_receive_expires_*, wallet_receive_via_address, wallet_send_input_hint_onchain, wallet_tx_pending, action_copy, wallet_copy_address.
d25f8de to
3c7f37b
Compare
…rk wallet on the same seed On-chain deposits sit unclaimed until explicitly claimed once they have enough confirmations; the SDK emits SdkEvent.UnclaimedDeposits when a deposit becomes claimable, and we weren't calling claimDeposit at all. Now claims automatically on that event and once more on connect (in case a deposit became claimable while the app was closed). Also stops trusting PaymentStatus.PENDING for on-chain rows in general: transactions made through another wallet app on the same seed aren't tracked by this SDK session, so the status can stay stuck at PENDING long after the underlying transaction is confirmed on-chain. The mempool.space link already lets users verify actual confirmation status for on-chain transactions.
7e0065e to
7b7d91f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WalletTransactiongainsisOnchainandpendingflags;SparkRepositorycorrectly identifies on-chain deposits/withdrawals (Spark SDKPaymentDetails.Deposit/Withdraw) and uses the txid as the payment hash instead of showing a UUIDAnimatedVisibilitypanel showing status, type, amount, fee, date, note, and payment hash/txid with copy; on-chain rows add a mempool.space link; compact dashboard preview is unaffected (expandable = false)transactionsChangedflow —WalletProviderinterface gainsSharedFlow<Unit>emitted bySparkRepositoryonPaymentSucceeded/PaymentFailed/PaymentPending, triggering a silent transaction list refresh without a loading spinnermakeInvoiceexpiry param —expirySecs: Int = 3600threaded throughWalletProvider→SparkRepository→NwcRepository→Nip47.MakeInvoice(NIP-47 optionalexpiryfield)bitcoin:prefix stripping —processInputnow stripsbitcoin:/BITCOIN:in addition tolightning:/LIGHTNING:ModalBottomSheetoverlays on the Home dashboard; home remains visible behind the sheet; a single sheet stays open for the entire flow so there's no close/reopen flicker between pagesWalletSheetDragHandle— custom drag handle usingstatusBarsPadding()so the grab pill sits below the status bar/camera cutout on full-height sheetsBasicTextFielddark-card input (min 120dp, nsec guard), Scan QR / Paste / Gallery action row, accent-colored Next buttonAnimatedVisibility) that auto-scrolls into view after expanding; localinvoiceGeneratingflag so the spinner only appears after the button is pressed, not on sheet openWALLET_SHEET_UX.mddocuments the full pattern for dark-wisp and zap-cooking androidTest plan
bitcoin:bc1q…into Send input — prefix stripped, routes correctly