Skip to content

feat: send flow design updates v60#863

Open
jvsena42 wants to merge 21 commits intofeat/settings-v60from
feat/send-v60
Open

feat: send flow design updates v60#863
jvsena42 wants to merge 21 commits intofeat/settings-v60from
feat/send-v60

Conversation

@jvsena42
Copy link
Copy Markdown
Member

@jvsena42 jvsena42 commented Mar 25, 2026

Implements v60 design for the send flow, matching iOS PR #488.

Description

This PR:

  1. Adds show/hide details toggle on the send confirmation screen with coin-stack image animation driven by swipe progress
  2. Adds "Send from" section with payment method switching (Savings/Spending) on unified/BIP21 payments
  3. Reorganizes the confirmation screen layout using a new reusable SendSectionView component
  4. Adds "Instant" (Lightning) option to the fee rate selection screen for unified payments
  5. Improves custom fee rate defaults to fall back through settings default, slow rate, then 1
  6. Replaces absolute invoice expiry timestamps with relative time formatting ("in 10 minutes")
  7. Adds swipe progress callback to SwipeToConfirm for driving animations

Preview

QA Notes

1. Show/Hide Details Toggle

On-chain payment:

  • Paste an on-chain address, set amount, continue to confirm
  • Coin-stack image is shown by default (details hidden)
  • "Show Details" button visible with speed icon (orange)
  • Tap "Show Details" -> sections appear: Send from, Send to, Fee & Speed, Confirming in, Tags
  • Button text changes to "Hide Details" with eye-slash icon
  • Tap "Hide Details" -> coin-stack image returns
  • Partially swipe the swipe button -> coin-stack rotates

Lightning payment:

  • Paste a lightning invoice, continue to confirm
  • Coin-stack image is shown by default
  • "Show Details" button visible with lightning icon (purple)
  • Tap "Show Details" -> sections appear: Send from, Send to, Fee & Speed, Invoice expiration, Note (if present), Tags
  • Tap "Hide Details" -> coin-stack returns

LNURL Pay:

  • Paste an LNURL-pay, set amount, continue to confirm
  • Show details -> comment field appears instead of tags
  • Hide details -> coin-stack image

2. Send From / Payment Method Switch

Unified invoice (BIP21) - Confirm screen:

  • Scan/paste a BIP21 URI with both on-chain and lightning
  • Set amount above dust limit (>546 sats) and within both balances
  • Continue to confirm, show details
  • "Send from" shows "Savings" or "Spending" with transfer icon
  • Tap to switch from Spending -> Savings
  • Fee section updates to show on-chain fee with speed icon
  • "Confirming in" section appears
  • Tap to switch back Savings -> Spending
  • Fee section updates to "Instant" with lightning icon
  • "Invoice expiration" section appears

Unified invoice - Button disabled when conditions not met:

  • Set amount below dust limit (<546 sats) -> switch button disabled on confirm
  • Set amount above one of the balances -> switch button disabled on confirm

Non-unified invoice - Confirm screen:

  • Paste a plain on-chain address -> "Send from" shows "Savings" without transfer icon, not tappable
  • Paste a plain lightning invoice -> "Send from" shows "Spending" without transfer icon, not tappable

Amount screen switching:

  • Paste unified invoice on amount screen -> switch button enabled
  • Switch between Savings/Spending freely regardless of amount
  • Set amount to 0 -> switch still works on amount screen
  • Set small amount (e.g. 22 sats) -> switch still works on amount screen

3. Fee Rate Screen - Instant Option

Unified payment:

  • From unified confirm screen, tap "Fee & Speed"
  • "Instant" appears as first option with lightning icon (purple)
  • Currently lightning -> "Instant" is selected (highlighted)
  • Select "Fast" -> switches to on-chain, navigates back to confirm
  • Confirm screen now shows on-chain layout
  • Tap "Fee & Speed" again -> "Instant" not selected, "Fast" selected
  • Select "Instant" -> switches to lightning, navigates back

Non-unified payment:

  • From plain on-chain confirm, tap "Fee & Speed"
  • "Instant" option NOT shown
  • Fast/Normal/Slow/Custom shown as before

4. Custom Fee Defaults

  • Settings > Transaction Speed set to "Normal" (default)
  • Send on-chain, go to Fee Rate > Custom
  • Initial value should be the slow fee rate (not 0, not current speed rate)
  • Change Settings > Transaction Speed to Custom (e.g. 5 sat/vB)
  • Send on-chain, go to Fee Rate > Custom
  • Initial value should be 5 (from settings)

5. Relative Invoice Expiry

  • Send to a lightning invoice with known expiry (e.g. 3600s)
  • Show details on confirm screen
  • Invoice expiration shows relative time (e.g. "in 59 minutes")
  • NOT an absolute date like "Mar 27, 5:30 PM"

6. Layout & Spacing

  • "Send from" button and "Send to" text are vertically aligned (same height)
  • "Fee & Speed" and "Confirming in" / "Invoice expiration" are side by side
  • Dividers appear below each section
  • 16dp spacing between section rows
  • Small screen: layout doesn't overflow, all sections visible when scrolling

7. Regression

  • Non-unified on-chain send works end-to-end (swipe, pin, broadcast)
  • Non-unified lightning send works end-to-end
  • Fee rate selection (Fast/Normal/Slow) still works
  • Custom fee rate entry still works
  • Tags add/remove on confirm screen
  • Boost transaction swipe still works (uses SwipeToConfirm)
  • Transfer to savings/spending swipe still works

@jvsena42 jvsena42 self-assigned this Mar 25, 2026
@jvsena42 jvsena42 marked this pull request as ready for review March 27, 2026 17:42
@jvsena42
Copy link
Copy Markdown
Member Author

Testing ...

@jvsena42 jvsena42 added this to the 2.2.0 milestone Mar 27, 2026
it.copy(
payMethod = SendMethod.LIGHTNING,
fee = SendFee.Lightning(0),
isAmountInputValid = validateAmount(it.amount, SendMethod.LIGHTNING),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

switchToLightning() does not clear confirmedWarnings, while onPaymentMethodSwitch() does (line 1123). This inconsistency means a user who confirmed a sanity warning on the on-chain path and then taps "Instant" on the fee screen will carry stale confirmedWarnings into the Lightning path, bypassing the check on next send attempt.

Suggested change
isAmountInputValid = validateAmount(it.amount, SendMethod.LIGHTNING),
payMethod = SendMethod.LIGHTNING,
fee = SendFee.Lightning(0),
isAmountInputValid = validateAmount(it.amount, SendMethod.LIGHTNING),
confirmedWarnings = persistentListOf(),

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.

1 participant