use transaction state transition instead of other notifications
This commit is contained in:
parent
d8d214942c
commit
734de5d359
@ -49,7 +49,7 @@ export function PendingTransactions({ goToTransaction }: Props): VNode {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return api.listener.onUpdateNotification(
|
return api.listener.onUpdateNotification(
|
||||||
[NotificationType.WithdrawGroupFinished],
|
[NotificationType.TransactionStateTransition],
|
||||||
state?.retry,
|
state?.retry,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -60,7 +60,7 @@ export function useComponentState({
|
|||||||
|
|
||||||
useEffect(() =>
|
useEffect(() =>
|
||||||
api.listener.onUpdateNotification(
|
api.listener.onUpdateNotification(
|
||||||
[NotificationType.RefreshMelted],
|
[NotificationType.TransactionStateTransition],
|
||||||
info?.retry,
|
info?.retry,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -260,7 +260,7 @@ describe("Refund CTA states", () => {
|
|||||||
// expect(state.products).undefined;
|
// expect(state.products).undefined;
|
||||||
// expect(state.amount).deep.eq(Amounts.parseOrThrow("EUR:2"));
|
// expect(state.amount).deep.eq(Amounts.parseOrThrow("EUR:2"));
|
||||||
// // expect(state.progress).closeTo(1 / 3, 0.01)
|
// // expect(state.progress).closeTo(1 / 3, 0.01)
|
||||||
// handler.notifyEventFromWallet(NotificationType.RefreshMelted);
|
// handler.notifyEventFromWallet(NotificationType.TransactionStateTransition);
|
||||||
// },
|
// },
|
||||||
// (state) => {
|
// (state) => {
|
||||||
// if (state.status !== "in-progress") expect.fail();
|
// if (state.status !== "in-progress") expect.fail();
|
||||||
@ -269,7 +269,7 @@ describe("Refund CTA states", () => {
|
|||||||
// expect(state.products).undefined;
|
// expect(state.products).undefined;
|
||||||
// expect(state.amount).deep.eq(Amounts.parseOrThrow("EUR:2"));
|
// expect(state.amount).deep.eq(Amounts.parseOrThrow("EUR:2"));
|
||||||
// // expect(state.progress).closeTo(2 / 3, 0.01)
|
// // expect(state.progress).closeTo(2 / 3, 0.01)
|
||||||
// handler.notifyEventFromWallet(NotificationType.RefreshMelted);
|
// handler.notifyEventFromWallet(NotificationType.TransactionStateTransition);
|
||||||
// },
|
// },
|
||||||
// (state) => {
|
// (state) => {
|
||||||
// if (state.status !== "ready") expect.fail();
|
// if (state.status !== "ready") expect.fail();
|
||||||
|
@ -87,7 +87,7 @@ function useComponentState({
|
|||||||
|
|
||||||
useEffect(() =>
|
useEffect(() =>
|
||||||
api.listener.onUpdateNotification(
|
api.listener.onUpdateNotification(
|
||||||
[NotificationType.WithdrawGroupFinished],
|
[NotificationType.TransactionStateTransition],
|
||||||
state?.retry,
|
state?.retry,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -62,7 +62,7 @@ export function HistoryPage({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return api.listener.onUpdateNotification(
|
return api.listener.onUpdateNotification(
|
||||||
[NotificationType.WithdrawGroupFinished],
|
[NotificationType.TransactionStateTransition],
|
||||||
state?.retry,
|
state?.retry,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -94,7 +94,7 @@ export function TransactionPage({ tid, goToWalletHistory }: Props): VNode {
|
|||||||
|
|
||||||
useEffect(() =>
|
useEffect(() =>
|
||||||
api.listener.onUpdateNotification(
|
api.listener.onUpdateNotification(
|
||||||
[NotificationType.WithdrawGroupFinished, NotificationType.KycRequested],
|
[NotificationType.TransactionStateTransition],
|
||||||
state?.retry,
|
state?.retry,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user