Skip to content

Conversation

thisconnect
Copy link
Collaborator

@thisconnect thisconnect commented Sep 11, 2025

So the user can confirm the payment on the device.

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)

@thisconnect thisconnect force-pushed the frontend-block-bitrefill-when-singing branch 2 times, most recently from 5afc79a to 10d8d4c Compare September 15, 2025 07:04
@thisconnect
Copy link
Collaborator Author

Screenshot 2025-09-15 at 09 07 18 Screenshot 2025-09-15 at 09 06 05

@thisconnect
Copy link
Collaborator Author

@Beerosagos ready for review. Added a few more commits:

  • Fixed a bug to prevent multiple payment requests if the user clicks Pay button multiple times.
  • refactored config and payment request code into their own functions (similar to how its in btcdirect.tsx)

@thisconnect thisconnect mentioned this pull request Sep 17, 2025
2 tasks
Copy link
Collaborator

@Beerosagos Beerosagos left a comment

Choose a reason for hiding this comment

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

tACK with a couple of nits 🙏

// Ensure expected payment method matches account
if (coinMapping[account.coinCode] !== paymentMethod) {
alertUser(t('unknownError', { errorMessage: 'Payment method mismatch' }));
setPendingPayment(false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we need a return too here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch 🙏

const [agreedTerms, setAgreedTerms] = useState(false);

const [pendingPayment, setPendingPayment] = useState<boolean>(false);
const [verifyPaymentRequest, setVerifyPaymentRequest] = useState<TTxProposalResult & { address: string } | false>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Initialize to false?

@thisconnect thisconnect force-pushed the frontend-block-bitrefill-when-singing branch from e68fd76 to b092422 Compare September 19, 2025 09:23
@thisconnect thisconnect merged commit 6cb644b into BitBoxSwiss:staging-bitrefill Sep 22, 2025
10 checks passed
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.

2 participants