From 3b46bc93af1f3ffad003d9fe1e7eb3ae0a2f33f0 Mon Sep 17 00:00:00 2001 From: ignaciosantise <25931366+ignaciosantise@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:47:21 -0300 Subject: [PATCH 1/2] feat(rn_cli_wallet): skip select option screen for single no-collectData payment --- .../src/modals/PaymentOptionsModal/index.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/index.tsx b/wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/index.tsx index 7bf27f5d..6089099e 100644 --- a/wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/index.tsx +++ b/wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/index.tsx @@ -61,7 +61,18 @@ export default function PaymentOptionsModal() { message: getErrorMessage('insufficient_funds'), }); } else { - PaymentStore.setStep('selectOption'); + const options = snap.paymentOptions.options; + const singleOptionWithoutCollectData = + options.length === 1 && + !(options[0] as PaymentOptionWithCollectData).collectData?.url; + + if (singleOptionWithoutCollectData) { + PaymentStore.selectOption(options[0] as PaymentOption); + PaymentStore.fetchPaymentActions(options[0] as PaymentOption); + PaymentStore.setStep('review'); + } else { + PaymentStore.setStep('selectOption'); + } } } } From a392372678693d67372637c43eddb94ace8f1111 Mon Sep 17 00:00:00 2001 From: ignaciosantise <25931366+ignaciosantise@users.noreply.github.com> Date: Fri, 27 Feb 2026 12:46:37 -0300 Subject: [PATCH 2/2] refactor(rn_cli_wallet): extract firstOption const to reduce type assertion repetition --- .../src/modals/PaymentOptionsModal/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/index.tsx b/wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/index.tsx index 6089099e..95cae7df 100644 --- a/wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/index.tsx +++ b/wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/index.tsx @@ -62,13 +62,13 @@ export default function PaymentOptionsModal() { }); } else { const options = snap.paymentOptions.options; + const firstOption = options[0] as PaymentOptionWithCollectData; const singleOptionWithoutCollectData = - options.length === 1 && - !(options[0] as PaymentOptionWithCollectData).collectData?.url; + options.length === 1 && !firstOption.collectData?.url; if (singleOptionWithoutCollectData) { - PaymentStore.selectOption(options[0] as PaymentOption); - PaymentStore.fetchPaymentActions(options[0] as PaymentOption); + PaymentStore.selectOption(firstOption as PaymentOption); + PaymentStore.fetchPaymentActions(firstOption as PaymentOption); PaymentStore.setStep('review'); } else { PaymentStore.setStep('selectOption');