summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Tip
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-09-16 16:04:41 -0300
committerSebastian <sebasjm@gmail.com>2022-09-16 16:04:41 -0300
commite14310825437c5de93c07c570639d2a09fc4826b (patch)
tree6d63ed9d62bdb21fdbf41e8c5d30fcc08bb9326f /packages/taler-wallet-webextension/src/cta/Tip
parent59d235e8d29159bc8caccf8bee6a2bca8b0b90dc (diff)
downloadwallet-core-e14310825437c5de93c07c570639d2a09fc4826b.tar.gz
wallet-core-e14310825437c5de93c07c570639d2a09fc4826b.tar.bz2
wallet-core-e14310825437c5de93c07c570639d2a09fc4826b.zip
pretty
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,
),