diff --git a/app/src/androidTest/java/to/bitkit/ui/screens/wallets/usdt/UsdtPaymentContentTest.kt b/app/src/androidTest/java/to/bitkit/ui/screens/wallets/usdt/UsdtPaymentContentTest.kt index abefd7e155..85c26c0b77 100644 --- a/app/src/androidTest/java/to/bitkit/ui/screens/wallets/usdt/UsdtPaymentContentTest.kt +++ b/app/src/androidTest/java/to/bitkit/ui/screens/wallets/usdt/UsdtPaymentContentTest.kt @@ -153,7 +153,7 @@ class UsdtPaymentContentTest { total.assertIsDisplayed() composeTestRule.onNodeWithText("4.47").assertIsDisplayed() composeTestRule.onNodeWithText("Polygon").performScrollTo().assertIsDisplayed() - composeTestRule.onNodeWithText("All fees are paid in USDT. Final fee may be lower.").assertIsDisplayed() + composeTestRule.onNodeWithText("All fees are paid in USDT. Final fee may be lower.").performScrollTo().assertIsDisplayed() swipe.assertIsDisplayed() SystemClock.sleep(600) composeTestRule.onNodeWithTag("UsdtReviewDetails").performScrollTo().performClick() diff --git a/app/src/main/java/to/bitkit/ui/screens/wallets/usdt/PaykitUsdtReview.kt b/app/src/main/java/to/bitkit/ui/screens/wallets/usdt/PaykitUsdtReview.kt index fc5f533ded..98e447daf6 100644 --- a/app/src/main/java/to/bitkit/ui/screens/wallets/usdt/PaykitUsdtReview.kt +++ b/app/src/main/java/to/bitkit/ui/screens/wallets/usdt/PaykitUsdtReview.kt @@ -4,6 +4,7 @@ import androidx.activity.compose.BackHandler import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect @@ -90,6 +91,8 @@ fun PaykitUsdtReview( } else { Column( Modifier.sheetHeight().background(Colors.Gray7) + .navigationBarsPadding() + .padding(bottom = 16.dp) ) { if (state.authenticationRequired) { Box(modifier = Modifier.padding(horizontal = 16.dp)) { diff --git a/app/src/main/java/to/bitkit/ui/screens/wallets/usdt/UsdtSendContent.kt b/app/src/main/java/to/bitkit/ui/screens/wallets/usdt/UsdtSendContent.kt index ed5c1a4bfb..ef34c5e2c5 100644 --- a/app/src/main/java/to/bitkit/ui/screens/wallets/usdt/UsdtSendContent.kt +++ b/app/src/main/java/to/bitkit/ui/screens/wallets/usdt/UsdtSendContent.kt @@ -578,9 +578,12 @@ private fun UsdtConfirmation( } UsdtReviewDetailsButton(showDetails) { showDetails = !showDetails } } + if (showDetails) { + FillHeight() + UsdtFeeNote() + } } } - if (showDetails) UsdtFeeNote() SwipeToConfirm( text = stringResource(R.string.wallet__send_swipe), color = Colors.Usdt, diff --git a/changelog.d/next/1628.fixed.md b/changelog.d/next/1628.fixed.md new file mode 100644 index 0000000000..b1c6c50b0f --- /dev/null +++ b/changelog.d/next/1628.fixed.md @@ -0,0 +1 @@ +On the expanded USDT payment review, the fee note no longer crowds Hide Details, and long details scroll above Swipe To Pay, which stays clear of the navigation bar. diff --git a/journeys/paykit-quoted-usdt.xml b/journeys/paykit-quoted-usdt.xml index 5ad7207fa3..c27e2b767d 100644 --- a/journeys/paykit-quoted-usdt.xml +++ b/journeys/paykit-quoted-usdt.xml @@ -16,8 +16,9 @@ Create a USD subscription for 150,50 on a comma-decimal locale. Verify the amount review shows 150,50 USD and editing preserves that amount. Verify Accepted Payments appears below frequency, with USDT selected and any available Savings and Spending chips unselected. Verify the description and icon controls are side by side. Propose it to the linked contact. On the payer, verify the subscription card and details show 150,50 USD, then review its recurrence and USDT-only payment method. Verify the subscription swipe uses USDT teal, then close before subscribing. Create a BTC subscription for 12,345 sats and verify available Savings and Spending chips start selected and USDT is unselected. Deselect each selected Bitcoin chip and verify Choose Recipient is disabled when none remain. Select Savings (id "SubscriptionAccept-savings"), then USDT (id "SubscriptionAccept-usdt"); verify the amount converts to USD and only USDT is selected. Select Savings again; verify the amount returns to exactly 12,345 sats and only Savings is selected. If Spending is available, select it (id "SubscriptionAccept-spending") and verify both Bitcoin rails can be selected together, with USDT still unselected. Repeat the subscription USDT and Savings switches four times without editing. Verify every return to Bitcoin shows exactly 12,345 sats and USDT is never selected with a Bitcoin rail. Edit the amount to 10 USD, repeat the switches and verify every return to USDT shows exactly 10 USD. Select Savings only and propose to the linked contact. On the payer, verify the proposal offers Savings but not Spending or USDT, then close before subscribing. - Open a linked USDT-only contact that has published a private payment list. Verify the amount screen offers only USDT, enter 0.01, and verify the balance is labeled AVAILABLE rather than AVAILABLE (SPENDING). Compare with direct USDT Send: the amount, balance, USDT chip and Continue use the same typography; the balance stays close below the amount and the keypad uses the remaining space without clipping Continue. Close without continuing to review. + Open a linked USDT-only contact that has published a private payment list. Verify the amount screen offers only USDT, enter 0.01, and verify the balance is labeled AVAILABLE rather than AVAILABLE (SPENDING). Compare with direct USDT Send: the amount, balance, USDT chip and Continue use the same typography; the balance, chips and keypad sit at the bottom above Continue, as on direct USDT Send. Close without continuing to review. Open a USD payment request for 150.50 that is payable in USDT. Verify its preset USDT input retains two decimal places, including 150,50 in a comma locale. Continue to payment review and verify those decimal places remain visible while the fee quote loads and after a quote failure. Close without paying. Edit an existing USD or USDT request for the same amount and verify the input retains those cents. A six-decimal USDT amount must remain exact, and the serialized request amount must not change merely because its input formatting changed. + Using the local USDT fixture for quotes, open an unpaid USDT payment request from a linked contact whose invoice note is long enough to wrap. Continue to payment review and tap Show Details. Verify Contact, Address and Invoice Note appear, scroll past them and verify Hide Details and then the fee note "All fees are paid in USDT. Final fee may be lower." follow with space between them, never overlapping. Verify Swipe To Pay stays pinned and fully visible above the navigation area while the details scroll. Close without paying. On a comma-decimal locale, open direct USDT Send, USDT Receive amount entry and a USDT contact payment. Verify each decimal key is a comma and entering 5,5 shows 5,5. Close each flow without paying or sharing a deposit request. diff --git a/journeys/usdt-send-review-and-details.xml b/journeys/usdt-send-review-and-details.xml index 64186accf5..8cc4b70a2b 100644 --- a/journeys/usdt-send-review-and-details.xml +++ b/journeys/usdt-send-review-and-details.xml @@ -6,7 +6,7 @@ Open the network pill and verify the full USDT Network picker, Tether rows and selected teal check. Select another EVM network. Verify the amount and valid recipient remain. Change to Solana with an EVM recipient and verify recipient entry is required. Enter an owned plain Solana address and verify the previous amount remains. Return to Arbitrum, enter the owned EVM address and verify the amount still remains. From recipient entry with another network selected, paste an explicit Arbitrum USDT URI. Verify the selected network becomes Arbitrum and the link amount is retained. A plain 0x address preserves the selected network. Tap MAX. Verify it fills a positive amount below the balance and remains on Amount. Continue and verify the payment plus maximum fee fits within the balance. Back out without swiping. - Enter a smaller amount and continue. Verify the collapsed review shows the amount, coin illustration, Show Details and teal Swipe To Pay. Show Details reveals Pay from, Network, Payment, Fee and Address. Verify Network is Arbitrum One and the fee note says all fees are paid in USDT and the final fee may be lower. Displayed amounts round to cents; nonzero values below one cent show <0.01. Hide Details restores the illustration. Cancel without paying. + Enter a smaller amount and continue. Verify the collapsed review shows the amount, coin illustration, Show Details and teal Swipe To Pay. Show Details reveals Pay from, Network, Payment, Fee and Address. Verify Network is Arbitrum One and the fee note says all fees are paid in USDT and the final fee may be lower. The fee note sits below Hide Details and scrolls with the details when they do not fit, and Swipe To Pay stays pinned. Displayed amounts round to cents; nonzero values below one cent show <0.01. Hide Details restores the illustration. Cancel without paying. Prepare an ordinary amount and note the payment and fee in Details. Go back to Amount and immediately continue without editing; verify the same review values return. Go back, change the amount and continue; verify the payment reflects the new amount. Go back, wait until the quote expires (at most two minutes) and continue; verify a new quote is obtained or an error leaves the amount editable, rather than displaying expired fees. Cancel without swiping. Prepare a cross-network payment and continue. Verify the basic confirmation shows the amount, coin illustration, Show Details and teal Swipe To Pay without Recipient gets or Max total debit rows. Tap Show Details (id "UsdtReviewDetails"). Verify the two-column rows are Pay from / Network, Payment / Fee, Recipient gets / Max total debit and Address / Recipient network. Network must be Arbitrum One; Recipient network must be the chosen destination. Verify Recipient gets (id "UsdtRecipientAmount") follows the quote, with an approximation marker for Orchestra, and Max total debit (id "UsdtMaximumTotal") equals the payment plus maximum fee. Tap the shortened address (id "UsdtReviewAddress") and verify the full value is shown and can be selected and copied. Verify the Address and Recipient network dividers stay aligned below the expanded address. Tap again to restore the compact row. Hide Details restores the basic confirmation. Cancel without paying. Using the local quote fixture, prepare a 5 USDT bridge with 2 USDT received and a small network fee. Try to proceed and verify the fee-over-half-value warning appears before payment authentication. Cancel without paying.