commit 734de5d3598bbf31638daaa5678e378c56881b5e parent d8d214942cc2544d46448811303cedf15809f5b3 Author: Sebastian <sebasjm@gmail.com> Date: Tue, 6 Jun 2023 14:57:33 -0300 use transaction state transition instead of other notifications Diffstat:
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx b/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx @@ -49,7 +49,7 @@ export function PendingTransactions({ goToTransaction }: Props): VNode { useEffect(() => { return api.listener.onUpdateNotification( - [NotificationType.WithdrawGroupFinished], + [NotificationType.TransactionStateTransition], state?.retry, ); }); diff --git a/packages/taler-wallet-webextension/src/cta/Refund/state.ts b/packages/taler-wallet-webextension/src/cta/Refund/state.ts @@ -60,7 +60,7 @@ export function useComponentState({ useEffect(() => api.listener.onUpdateNotification( - [NotificationType.RefreshMelted], + [NotificationType.TransactionStateTransition], info?.retry, ), ); diff --git a/packages/taler-wallet-webextension/src/cta/Refund/test.ts b/packages/taler-wallet-webextension/src/cta/Refund/test.ts @@ -260,7 +260,7 @@ describe("Refund CTA states", () => { // expect(state.products).undefined; // expect(state.amount).deep.eq(Amounts.parseOrThrow("EUR:2")); // // expect(state.progress).closeTo(1 / 3, 0.01) - // handler.notifyEventFromWallet(NotificationType.RefreshMelted); + // handler.notifyEventFromWallet(NotificationType.TransactionStateTransition); // }, // (state) => { // if (state.status !== "in-progress") expect.fail(); @@ -269,7 +269,7 @@ describe("Refund CTA states", () => { // expect(state.products).undefined; // expect(state.amount).deep.eq(Amounts.parseOrThrow("EUR:2")); // // expect(state.progress).closeTo(2 / 3, 0.01) - // handler.notifyEventFromWallet(NotificationType.RefreshMelted); + // handler.notifyEventFromWallet(NotificationType.TransactionStateTransition); // }, // (state) => { // if (state.status !== "ready") expect.fail(); diff --git a/packages/taler-wallet-webextension/src/popup/BalancePage.tsx b/packages/taler-wallet-webextension/src/popup/BalancePage.tsx @@ -87,7 +87,7 @@ function useComponentState({ useEffect(() => api.listener.onUpdateNotification( - [NotificationType.WithdrawGroupFinished], + [NotificationType.TransactionStateTransition], state?.retry, ), ); diff --git a/packages/taler-wallet-webextension/src/wallet/History.tsx b/packages/taler-wallet-webextension/src/wallet/History.tsx @@ -62,7 +62,7 @@ export function HistoryPage({ useEffect(() => { return api.listener.onUpdateNotification( - [NotificationType.WithdrawGroupFinished], + [NotificationType.TransactionStateTransition], state?.retry, ); }); diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -94,7 +94,7 @@ export function TransactionPage({ tid, goToWalletHistory }: Props): VNode { useEffect(() => api.listener.onUpdateNotification( - [NotificationType.WithdrawGroupFinished, NotificationType.KycRequested], + [NotificationType.TransactionStateTransition], state?.retry, ), );