aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Tip
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Tip')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Tip/state.ts2
-rw-r--r--packages/taler-wallet-webextension/src/cta/Tip/test.ts56
2 files changed, 33 insertions, 25 deletions
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,
),