summaryrefslogtreecommitdiff
path: root/packages/bank-ui/src/pages/OperationState/views.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/bank-ui/src/pages/OperationState/views.tsx')
-rw-r--r--packages/bank-ui/src/pages/OperationState/views.tsx17
1 files changed, 12 insertions, 5 deletions
diff --git a/packages/bank-ui/src/pages/OperationState/views.tsx b/packages/bank-ui/src/pages/OperationState/views.tsx
index 6eee6daa9..330fe1072 100644
--- a/packages/bank-ui/src/pages/OperationState/views.tsx
+++ b/packages/bank-ui/src/pages/OperationState/views.tsx
@@ -73,6 +73,7 @@ export function NeedConfirmationView({
title: i18n.str`The reserve operation has been confirmed previously and can't be aborted`,
description: resp.detail.hint as TranslatedString,
debug: resp.detail,
+ when: AbsoluteTime.now(),
});
case HttpStatusCode.BadRequest:
return notify({
@@ -80,6 +81,7 @@ export function NeedConfirmationView({
title: i18n.str`The operation id is invalid.`,
description: resp.detail.hint as TranslatedString,
debug: resp.detail,
+ when: AbsoluteTime.now(),
});
case HttpStatusCode.NotFound:
return notify({
@@ -87,6 +89,7 @@ export function NeedConfirmationView({
title: i18n.str`The operation was not found.`,
description: resp.detail.hint as TranslatedString,
debug: resp.detail,
+ when: AbsoluteTime.now(),
});
default:
assertUnreachable(resp);
@@ -111,6 +114,7 @@ export function NeedConfirmationView({
title: i18n.str`The withdrawal has been aborted previously and can't be confirmed`,
description: resp.detail.hint as TranslatedString,
debug: resp.detail,
+ when: AbsoluteTime.now(),
});
case TalerErrorCode.BANK_CONFIRM_INCOMPLETE:
return notify({
@@ -118,6 +122,7 @@ export function NeedConfirmationView({
title: i18n.str`The withdrawal operation can't be confirmed before a wallet accepted the transaction.`,
description: resp.detail.hint as TranslatedString,
debug: resp.detail,
+ when: AbsoluteTime.now(),
});
case HttpStatusCode.BadRequest:
return notify({
@@ -125,6 +130,7 @@ export function NeedConfirmationView({
title: i18n.str`The operation id is invalid.`,
description: resp.detail.hint as TranslatedString,
debug: resp.detail,
+ when: AbsoluteTime.now(),
});
case HttpStatusCode.NotFound:
return notify({
@@ -132,6 +138,7 @@ export function NeedConfirmationView({
title: i18n.str`The operation was not found.`,
description: resp.detail.hint as TranslatedString,
debug: resp.detail,
+ when: AbsoluteTime.now(),
});
case TalerErrorCode.BANK_UNALLOWED_DEBIT:
return notify({
@@ -139,6 +146,7 @@ export function NeedConfirmationView({
title: i18n.str`Your balance is not enough.`,
description: resp.detail.hint as TranslatedString,
debug: resp.detail,
+ when: AbsoluteTime.now(),
});
case HttpStatusCode.Accepted: {
updateBankState("currentChallenge", {
@@ -147,7 +155,6 @@ export function NeedConfirmationView({
sent: AbsoluteTime.never(),
location: routeHere.url({ wopid: id }),
request: id,
-
});
return onAuthorizationRequired();
}
@@ -331,10 +338,7 @@ export function ConfirmedView({ routeClose }: State.Confirmed) {
);
}
-export function ReadyView({
- uri,
- onAbort: doAbort,
-}: State.Ready): VNode {
+export function ReadyView({ uri, onAbort: doAbort }: State.Ready): VNode {
const { i18n } = useTranslationContext();
const walletInegrationApi = useTalerWalletIntegrationAPI();
const [notification, notify, errorHandler] = useLocalNotification();
@@ -355,6 +359,7 @@ export function ReadyView({
title: i18n.str`The reserve operation has been confirmed previously and can't be aborted`,
description: hasError.detail.hint as TranslatedString,
debug: hasError.detail,
+ when: AbsoluteTime.now(),
});
case HttpStatusCode.BadRequest:
return notify({
@@ -362,6 +367,7 @@ export function ReadyView({
title: i18n.str`The operation id is invalid.`,
description: hasError.detail.hint as TranslatedString,
debug: hasError.detail,
+ when: AbsoluteTime.now(),
});
case HttpStatusCode.NotFound:
return notify({
@@ -369,6 +375,7 @@ export function ReadyView({
title: i18n.str`The operation was not found.`,
description: hasError.detail.hint as TranslatedString,
debug: hasError.detail,
+ when: AbsoluteTime.now(),
});
default:
assertUnreachable(hasError);