Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions Bitkit/Views/PaymentRequests/CreatePaymentRequestView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -348,21 +348,20 @@ struct PaymentRequestAmountView: View {
}
}

Spacer().frame(height: 16)
Spacer(minLength: 12)

amountControls(showUnit: allowedAssets.contains(.btc))
.hidden()
.overlay(alignment: .topTrailing) {
amountControls(showUnit: asset == .btc)
}
.padding(.bottom, 16)
.padding(.bottom, 12)

if conversionError {
BodySText(t("wallet__payment_request_rate_unavailable"), textColor: .white64)
}
CustomDivider()
.accessibilityIdentifier("\(testIdentifierPrefix)AmountDivider")
Spacer(minLength: 16)
NumberPad(
type: asset == .usd ? .decimal : amountViewModel.getNumberPadType(currency: currency),
errorKey: amountViewModel.errorKey
Expand All @@ -380,8 +379,6 @@ struct PaymentRequestAmountView: View {
}
}

Spacer(minLength: 24)

CustomButton(title: t("common__continue"), isDisabled: !allowedAssets.contains(asset) || (amount?.atomic ?? 0) == 0) {
guard allowedAssets.contains(asset), let amount else { return }
onContinue(
Expand Down Expand Up @@ -667,7 +664,7 @@ struct PaymentRequestSentView: View {
Image("check")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 256, height: 256)
.frame(maxWidth: UIScreen.main.bounds.width * 0.8, maxHeight: UIScreen.main.bounds.width * 0.8)
.frame(maxWidth: .infinity)

Spacer(minLength: 8)
Expand All @@ -676,14 +673,16 @@ struct PaymentRequestSentView: View {
.padding(.bottom, 8)

BodyMText(description, textColor: .white64)
.padding(.bottom, 16)
.padding(.bottom, 32)

CaptionMText(t("wallet__payment_request_recipient").localizedUppercase, textColor: .white64, lineHeight: 18)
.padding(.bottom, 8)

PaymentRequestCard(
request: request,
isHighlighted: false
)

Spacer(minLength: 32)
.padding(.bottom, 16)

CustomButton(title: t("common__ok")) {
sheets.hideSheet(reason: "Payment request created")
Expand Down
1 change: 1 addition & 0 deletions changelog.d/next/1138.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Payment request amount entry keeps the number pad above Continue, and the Payment Requested sheet keeps OK at the bottom with the recipient above it.
2 changes: 1 addition & 1 deletion journeys/paykit-amount-layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description>Use an onboarded wallet with USDT enabled, an existing test contact and a current BTC/USD rate. Verify request denomination layout without sending or publishing a request.</description>
<actions>
<action>Open Payment Requests and create a request for the test contact. Open Amount.</action>
<action>Use the denomination toggle to select USD and enter 1.50. Verify the amount is leading-aligned near the header, the denomination toggle is trailing-aligned directly below it, and a divider separates them from the keypad.</action>
<action>Use the denomination toggle to select USD and enter 1.50. Verify the layout matches the Send amount screen: the amount is leading-aligned near the header, spare space sits below it, and the trailing-aligned denomination toggle, the divider, the keypad and Continue sit at the same height and position as on Send.</action>
<action>Use the single denomination toggle to switch between BTC and USD several times. Verify the Bitcoin unit control is shown only in BTC. Verify the amount controls, divider and keypad stay at the same vertical positions, including when the Bitcoin unit button wraps below the denomination toggle at enlarged text sizes.</action>
<action>Verify every keypad key remains legible and tappable on a short screen at enlarged text sizes, including zero, decimal/000 and Delete. Scroll as needed to reach all keys and Continue. Continue to details and verify the request denomination and amount remain 1.50 USD. Cancel without sending.</action>
<action>Open Subscriptions and start creating a subscription for the same contact. Select USDT before opening Amount. Starting from zero, enter 1.50 without deleting first. Continue and verify the subscription amount is 1.50 USD. Reopen Amount and verify the existing cents are preserved. Repeat the layout check in BTC and USD. Verify the controls do not overlap the keypad or Continue.</action>
Expand Down
2 changes: 1 addition & 1 deletion journeys/payment-requests/request-summary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</description>
<actions>
<action>On the requester, send the payer contact a Payment Request for 21,000 sats with the note "Lunch last week"</action>
<action>On the requester, verify completion (id "PaymentRequestSent") says "Sent" with "You have sent a payment request", or "Queued" with "Your payment request is queued and will send automatically"; the title and description must agree</action>
<action>On the requester, verify completion (id "PaymentRequestSent") says "Sent" with "You have sent a payment request", or "Queued" with "Your payment request is queued and will send automatically"; the title and description must agree. Verify a RECIPIENT caption sits above the request card, with OK at the bottom of the sheet and the heading, description and recipient card directly above it</action>
<action>On the payer, verify the Payment Request confirmation screen (id "PaymentRequestConfirm") appears with 21,000 sats without opening the pending Payment Requests bell</action>
<action>Verify From (id "PaymentRequestFrom") shows the requester's contact name</action>
<action>Verify For (id "PaymentRequestFor") shows "Lunch last week"</action>
Expand Down
Loading