feat(wallet): iOS-parity Receive screen — text input + note + invoice / address tabs#580
Open
dmnyc wants to merge 1 commit into
Open
feat(wallet): iOS-parity Receive screen — text input + note + invoice / address tabs#580dmnyc wants to merge 1 commit into
dmnyc wants to merge 1 commit into
Conversation
… / address tabs Replaces the orange numpad-style Receive screen with a form layout matching iOS ReceiveInvoiceSheet: - AMOUNT label + single text field (numeric keyboard, "0" placeholder, "sats" or fiat suffix). In fiat mode shows the live sats conversion below the field. - NOTE (OPTIONAL) label + single-line text field with "For coffee, etc." placeholder — plumbed through generateInvoice(amountSats, description) so the note is embedded in the BOLT11 invoice description. - Create invoice full-width button; disabled (gray) until the amount parses to > 0 sats. - Invoice / Lightning Address segmented control at the top, shown only when the user has a Spark lightning address. Switching to the address tab renders the address QR + Copy / Share row inline (no nav churn). Touches: - WalletScreen.kt: rewrites ReceiveAmountContent; adds ReceiveAddressBlock. Uses BasicTextField for the hero amount field (custom placeholder inside a rounded surface) and a second BasicTextField for the note. - WalletViewModel.kt: generateInvoice now takes (amountSats, description); adds setReceiveAmount(value) for the new text-input path. The existing digit-by-digit updateReceiveAmount / receiveAmountBackspace stay untouched (still used by Send numpad). - strings.xml: new English strings for the labels / placeholders / CTA. Translations to follow. Tested on device.
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
Ports the iOS
ReceiveInvoiceSheetlayout to Android. The orange numpad-style Receive screen is replaced with a form: amount text field, optional note field, and a Create invoice CTA. When the user has a Spark lightning address, an Invoice / Lightning Address segmented control appears at the top and the address tab renders the QR + Copy / Share row inline.Before / After:
Changes
WalletScreen.ktReceiveAmountContentfrom aSatsNumpaddriver to aBasicTextField-based form: AMOUNT field (numeric keyboard, "0" placeholder, "sats" or fiat suffix), NOTE field (placeholder "For coffee, etc."), Create invoice button.SingleChoiceSegmentedButtonRowat the top — only rendered whenwalletViewModel.lightningAddressis non-blank.ReceiveAddressBlockcomposable: QR card with the address centered below + Copy / Share row beneath. Reuses the same QR generation path asLightningAddressQRContent.WalletViewModel.ktgenerateInvoicenow takes(amountSats: Long, description: String = "")and passes the description toWalletProvider.makeInvoice. The description ends up in the BOLT11 invoice memo.setReceiveAmount(value: String)for the new text-input path. The oldupdateReceiveAmount(digit)/receiveAmountBackspace()setters stay untouched since the Send flow still uses them.values/strings.xml— new English strings:wallet_receive_invoice_tab= "Invoice"wallet_receive_address_tab= "Lightning Address"wallet_receive_amount_label= "AMOUNT"wallet_receive_note_label= "NOTE (OPTIONAL)"wallet_receive_note_placeholder= "For coffee, etc."wallet_receive_create_invoice= "Create invoice"What's NOT in this PR
Test plan
./gradlew assembleDebug) on cleanmainbaseReference
iOS:
wisp-ios/WalletView.swift→ReceiveInvoiceSheet(~lines 984–1230)