summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/InvoicePay
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-11-16 16:04:52 -0300
committerSebastian <sebasjm@gmail.com>2022-11-16 16:05:13 -0300
commit1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e (patch)
tree7255cf4a5b51af4807e2a01a370497413a78968f /packages/taler-wallet-webextension/src/cta/InvoicePay
parent53164dc47b1138235a0c797affaa6fb37ea43239 (diff)
downloadwallet-core-1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e.tar.gz
wallet-core-1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e.tar.bz2
wallet-core-1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e.zip
fix #7411, also making the backup payment visible
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/InvoicePay')
-rw-r--r--packages/taler-wallet-webextension/src/cta/InvoicePay/index.ts2
-rw-r--r--packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts26
2 files changed, 15 insertions, 13 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/InvoicePay/index.ts b/packages/taler-wallet-webextension/src/cta/InvoicePay/index.ts
index 693803587..6e16b528c 100644
--- a/packages/taler-wallet-webextension/src/cta/InvoicePay/index.ts
+++ b/packages/taler-wallet-webextension/src/cta/InvoicePay/index.ts
@@ -18,7 +18,7 @@ import {
AbsoluteTime,
AmountJson,
PreparePayResult,
- TalerErrorDetail
+ TalerErrorDetail,
} from "@gnu-taler/taler-util";
import { Loading } from "../../components/Loading.js";
import { HookError } from "../../hooks/useAsyncAsHook.js";
diff --git a/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts b/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts
index 457827127..1846794fc 100644
--- a/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/InvoicePay/state.ts
@@ -21,7 +21,7 @@ import {
PreparePayResult,
PreparePayResultType,
TalerErrorDetail,
- TalerProtocolTimestamp
+ TalerProtocolTimestamp,
} from "@gnu-taler/taler-util";
import { TalerError, WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { useEffect, useState } from "preact/hooks";
@@ -41,10 +41,12 @@ export function useComponentState(
return { p2p, balance };
});
- useEffect(() => api.listener.onUpdateNotification(
- [NotificationType.CoinWithdrawn],
- hook?.retry
- ));
+ useEffect(() =>
+ api.listener.onUpdateNotification(
+ [NotificationType.CoinWithdrawn],
+ hook?.retry,
+ ),
+ );
const [operationError, setOperationError] = useState<
TalerErrorDetail | undefined
@@ -63,10 +65,7 @@ export function useComponentState(
};
}
- const {
- contractTerms,
- peerPullPaymentIncomingId,
- } = hook.response.p2p;
+ const { contractTerms, peerPullPaymentIncomingId } = hook.response.p2p;
const amountStr: string = contractTerms?.amount;
const amount = Amounts.parseOrThrow(amountStr);
@@ -134,9 +133,12 @@ export function useComponentState(
async function accept(): Promise<void> {
try {
- const resp = await api.wallet.call(WalletApiOperation.AcceptPeerPullPayment, {
- peerPullPaymentIncomingId,
- });
+ const resp = await api.wallet.call(
+ WalletApiOperation.AcceptPeerPullPayment,
+ {
+ peerPullPaymentIncomingId,
+ },
+ );
onSuccess(resp.transactionId);
} catch (e) {
if (e instanceof TalerError) {