From e14310825437c5de93c07c570639d2a09fc4826b Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 16 Sep 2022 16:04:41 -0300 Subject: pretty --- .../taler-wallet-webextension/src/cta/Tip/state.ts | 2 +- .../taler-wallet-webextension/src/cta/Tip/test.ts | 56 ++++++++++++---------- 2 files changed, 33 insertions(+), 25 deletions(-) (limited to 'packages/taler-wallet-webextension/src/cta/Tip') diff --git a/packages/taler-wallet-webextension/src/cta/Tip/state.ts b/packages/taler-wallet-webextension/src/cta/Tip/state.ts index a3adafe53..f6721d504 100644 --- a/packages/taler-wallet-webextension/src/cta/Tip/state.ts +++ b/packages/taler-wallet-webextension/src/cta/Tip/state.ts @@ -52,7 +52,7 @@ export function useComponentState( //FIX: this may not be seen since we are moving to the success also tipInfo.retry(); - onSuccess(res.transactionId) + onSuccess(res.transactionId); }; const baseInfo = { diff --git a/packages/taler-wallet-webextension/src/cta/Tip/test.ts b/packages/taler-wallet-webextension/src/cta/Tip/test.ts index eeb39c8aa..47d9aa8db 100644 --- a/packages/taler-wallet-webextension/src/cta/Tip/test.ts +++ b/packages/taler-wallet-webextension/src/cta/Tip/test.ts @@ -34,7 +34,9 @@ describe("Tip CTA states", () => { onCancel: async () => { null; }, - onSuccess: async () => { null; }, + onSuccess: async () => { + null; + }, }, { prepareTip: async () => ({}), @@ -75,17 +77,19 @@ describe("Tip CTA states", () => { onCancel: async () => { null; }, - onSuccess: async () => { null; }, + onSuccess: async () => { + null; + }, }, { prepareTip: async () => - ({ - accepted: tipAccepted, - exchangeBaseUrl: "exchange url", - merchantBaseUrl: "merchant url", - tipAmountEffective: "EUR:1", - walletTipId: "tip_id", - } as PrepareTipResult as any), + ({ + accepted: tipAccepted, + exchangeBaseUrl: "exchange url", + merchantBaseUrl: "merchant url", + tipAmountEffective: "EUR:1", + walletTipId: "tip_id", + } as PrepareTipResult as any), acceptTip: async () => { tipAccepted = true; }, @@ -136,16 +140,18 @@ describe("Tip CTA states", () => { onCancel: async () => { null; }, - onSuccess: async () => { null; }, + onSuccess: async () => { + null; + }, }, { prepareTip: async () => - ({ - exchangeBaseUrl: "exchange url", - merchantBaseUrl: "merchant url", - tipAmountEffective: "EUR:1", - walletTipId: "tip_id", - } as PrepareTipResult as any), + ({ + exchangeBaseUrl: "exchange url", + merchantBaseUrl: "merchant url", + tipAmountEffective: "EUR:1", + walletTipId: "tip_id", + } as PrepareTipResult as any), acceptTip: async () => ({}), } as any, ), @@ -191,17 +197,19 @@ describe("Tip CTA states", () => { onCancel: async () => { null; }, - onSuccess: async () => { null; }, + onSuccess: async () => { + null; + }, }, { prepareTip: async () => - ({ - accepted: true, - exchangeBaseUrl: "exchange url", - merchantBaseUrl: "merchant url", - tipAmountEffective: "EUR:1", - walletTipId: "tip_id", - } as PrepareTipResult as any), + ({ + accepted: true, + exchangeBaseUrl: "exchange url", + merchantBaseUrl: "merchant url", + tipAmountEffective: "EUR:1", + walletTipId: "tip_id", + } as PrepareTipResult as any), acceptTip: async () => ({}), } as any, ), -- cgit v1.2.3