commit dbc32e3d9aab8b8131416e8c6b98c7f965e1f19e
parent de4ab81b205d221ad55e3abdf5e2940b07496f5a
Author: ms <ms@taler.net>
Date: Sun, 10 Apr 2022 21:52:42 +0200
handle aborted withdrawal
Diffstat:
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/packages/bank/src/pages/home/index.tsx b/packages/bank/src/pages/home/index.tsx
@@ -987,6 +987,21 @@ function TalerWithdrawalQRCode(Props: any): VNode {
* Wallet didn't communicate withdrawal details yet:
*/
console.log("withdrawal status", data);
+ if (data.aborted) {
+ pageStateSetter((prevState: PageStateType) => {
+ const {
+ withdrawalOutcome,
+ withdrawalId,
+ talerWithdrawUri,
+ ...rest } = prevState;
+ return {
+ ...rest,
+ withdrawalInProgress: false,
+ hasError: true,
+ error: i18n`This withdrawal was aborted!`
+ };
+ })
+ }
if (!data.selection_done) {
setTimeout(() => mutate(), 1000); // check again after 1 second.
return (<section id="main" class="content">