aboutsummaryrefslogtreecommitdiff
path: root/packages/bank-ui/src/pages/WithdrawalQRCode.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/bank-ui/src/pages/WithdrawalQRCode.tsx')
-rw-r--r--packages/bank-ui/src/pages/WithdrawalQRCode.tsx35
1 files changed, 20 insertions, 15 deletions
diff --git a/packages/bank-ui/src/pages/WithdrawalQRCode.tsx b/packages/bank-ui/src/pages/WithdrawalQRCode.tsx
index b61f0cc8f..6901c2a87 100644
--- a/packages/bank-ui/src/pages/WithdrawalQRCode.tsx
+++ b/packages/bank-ui/src/pages/WithdrawalQRCode.tsx
@@ -232,21 +232,26 @@ export function WithdrawalQRCode({
}
return (
- <WithdrawalConfirmationQuestion
- withdrawUri={withdrawUri}
- routeHere={routeWithdrawalDetails}
- details={{
- username: data.username,
- account,
- reserve: data.selected_reserve_pub,
- amount: Amounts.parseOrThrow(data.amount),
- }}
- onAuthorizationRequired={onAuthorizationRequired}
- onAborted={() => {
- notifyInfo(i18n.str`Operation canceled`);
- onOperationAborted();
- }}
- />
+ /* FIXME: THIS IS STUPID! We need to fix the reason why data.amount could be undefined here! */
+ data.amount !== undefined ? (
+ <WithdrawalConfirmationQuestion
+ withdrawUri={withdrawUri}
+ routeHere={routeWithdrawalDetails}
+ details={{
+ username: data.username,
+ account,
+ reserve: data.selected_reserve_pub,
+ amount: Amounts.parseOrThrow(data.amount),
+ }}
+ onAuthorizationRequired={onAuthorizationRequired}
+ onAborted={() => {
+ notifyInfo(i18n.str`Operation canceled`);
+ onOperationAborted();
+ }}
+ />
+ ) : (
+ <p>Unable to find the amount.</p>
+ )
);
}