diff options
author | Sebastian <sebasjm@gmail.com> | 2023-11-24 11:36:56 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-11-24 11:36:56 -0300 |
commit | 9ba6a59d18c9ab7d7690e556d7f9aedf0c370e52 (patch) | |
tree | f9b6a45cf2afd3b07c977a21241116758a1fe4c2 /packages/taler-wallet-webextension | |
parent | 074d5986c5ba2d0fd181046f27ba0f2ffce5840f (diff) | |
download | wallet-core-9ba6a59d18c9ab7d7690e556d7f9aedf0c370e52.tar.gz wallet-core-9ba6a59d18c9ab7d7690e556d7f9aedf0c370e52.tar.bz2 wallet-core-9ba6a59d18c9ab7d7690e556d7f9aedf0c370e52.zip |
using monitor api
Diffstat (limited to 'packages/taler-wallet-webextension')
4 files changed, 45 insertions, 0 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Payment/test.ts b/packages/taler-wallet-webextension/src/cta/Payment/test.ts index 213382efc..5e009b3de 100644 --- a/packages/taler-wallet-webextension/src/cta/Payment/test.ts +++ b/packages/taler-wallet-webextension/src/cta/Payment/test.ts @@ -140,6 +140,7 @@ describe("Payment CTA states", () => { { balances: [ { + flags: [], available: "USD:5" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -200,6 +201,7 @@ describe("Payment CTA states", () => { { balances: [ { + flags: [], available: "USD:15" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -263,6 +265,7 @@ describe("Payment CTA states", () => { { balances: [ { + flags: [], available: "USD:15" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -324,6 +327,7 @@ describe("Payment CTA states", () => { { balances: [ { + flags: [], available: "USD:15" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -393,6 +397,7 @@ describe("Payment CTA states", () => { { balances: [ { + flags: [], available: "USD:15" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -481,6 +486,7 @@ describe("Payment CTA states", () => { { balances: [ { + flags: [], available: "USD:10" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -512,6 +518,7 @@ describe("Payment CTA states", () => { { balances: [ { + flags: [], available: "USD:15" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, diff --git a/packages/taler-wallet-webextension/src/popup/Balance.stories.tsx b/packages/taler-wallet-webextension/src/popup/Balance.stories.tsx index dd8142b68..626ad4977 100644 --- a/packages/taler-wallet-webextension/src/popup/Balance.stories.tsx +++ b/packages/taler-wallet-webextension/src/popup/Balance.stories.tsx @@ -35,6 +35,7 @@ export const EmptyBalance = tests.createExample(TestedComponent, { export const SomeCoins = tests.createExample(TestedComponent, { balances: [ { + flags: [], available: "USD:10.5" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -54,6 +55,7 @@ export const SomeCoins = tests.createExample(TestedComponent, { export const SomeCoinsInTreeCurrencies = tests.createExample(TestedComponent, { balances: [ { + flags: [], available: "EUR:1" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -66,6 +68,7 @@ export const SomeCoinsInTreeCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "TESTKUDOS:2000" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -78,6 +81,7 @@ export const SomeCoinsInTreeCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "JPY:4" as AmountString, hasPendingTransactions: false, pendingIncoming: "EUR:15" as AmountString, @@ -97,6 +101,7 @@ export const SomeCoinsInTreeCurrencies = tests.createExample(TestedComponent, { export const NoCoinsInTreeCurrencies = tests.createExample(TestedComponent, { balances: [ { + flags: [], available: "EUR:3" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -109,6 +114,7 @@ export const NoCoinsInTreeCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "USD:2" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -121,6 +127,7 @@ export const NoCoinsInTreeCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "ARS:1" as AmountString, hasPendingTransactions: false, pendingIncoming: "EUR:15" as AmountString, @@ -140,6 +147,7 @@ export const NoCoinsInTreeCurrencies = tests.createExample(TestedComponent, { export const SomeCoinsInFiveCurrencies = tests.createExample(TestedComponent, { balances: [ { + flags: [], available: "USD:0" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -152,6 +160,7 @@ export const SomeCoinsInFiveCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "ARS:13451" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -164,6 +173,7 @@ export const SomeCoinsInFiveCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "EUR:202.02" as AmountString, hasPendingTransactions: false, pendingIncoming: "EUR:0" as AmountString, @@ -176,6 +186,7 @@ export const SomeCoinsInFiveCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "JPY:0" as AmountString, hasPendingTransactions: false, pendingIncoming: "EUR:0" as AmountString, @@ -188,6 +199,7 @@ export const SomeCoinsInFiveCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "JPY:51223233" as AmountString, hasPendingTransactions: false, pendingIncoming: "EUR:0" as AmountString, @@ -200,6 +212,7 @@ export const SomeCoinsInFiveCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "DEMOKUDOS:6" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:0" as AmountString, @@ -212,6 +225,7 @@ export const SomeCoinsInFiveCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "TESTKUDOS:6" as AmountString, hasPendingTransactions: false, pendingIncoming: "USD:5" as AmountString, diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage/test.ts b/packages/taler-wallet-webextension/src/wallet/DepositPage/test.ts index 5384fe4c5..157cb868a 100644 --- a/packages/taler-wallet-webextension/src/wallet/DepositPage/test.ts +++ b/packages/taler-wallet-webextension/src/wallet/DepositPage/test.ts @@ -66,6 +66,7 @@ describe("DepositPage states", () => { handler.addWalletCallResponse(WalletApiOperation.GetBalances, undefined, { balances: [ { + flags: [], available: `${currency}:0` as AmountString, hasPendingTransactions: false, pendingIncoming: `${currency}:0` as AmountString, @@ -112,6 +113,7 @@ describe("DepositPage states", () => { handler.addWalletCallResponse(WalletApiOperation.GetBalances, undefined, { balances: [ { + flags: [], available: `${currency}:1` as AmountString, hasPendingTransactions: false, pendingIncoming: `${currency}:0` as AmountString, @@ -171,6 +173,7 @@ describe("DepositPage states", () => { handler.addWalletCallResponse(WalletApiOperation.GetBalances, undefined, { balances: [ { + flags: [], available: `${currency}:1` as AmountString, hasPendingTransactions: false, pendingIncoming: `${currency}:0` as AmountString, @@ -230,6 +233,7 @@ describe("DepositPage states", () => { handler.addWalletCallResponse(WalletApiOperation.GetBalances, undefined, { balances: [ { + flags: [], available: `${currency}:5` as AmountString, hasPendingTransactions: false, pendingIncoming: `${currency}:0` as AmountString, @@ -319,6 +323,7 @@ describe("DepositPage states", () => { handler.addWalletCallResponse(WalletApiOperation.GetBalances, undefined, { balances: [ { + flags: [], available: `${currency}:10` as AmountString, hasPendingTransactions: false, pendingIncoming: `${currency}:0` as AmountString, diff --git a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx index 9bf39b8ae..8b4f64a93 100644 --- a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx @@ -180,6 +180,7 @@ export const SomeBalanceWithNoTransactions = tests.createExample( balances: [ { available: "TESTKUDOS:10" as AmountString, + flags: [], pendingIncoming: "TESTKUDOS:0" as AmountString, pendingOutgoing: "TESTKUDOS:0" as AmountString, hasPendingTransactions: false, @@ -198,6 +199,7 @@ export const OneSimpleTransaction = tests.createExample(TestedComponent, { transactions: [exampleData.withdraw], balances: [ { + flags: [], available: "USD:10" as AmountString, pendingIncoming: "USD:0" as AmountString, pendingOutgoing: "USD:0" as AmountString, @@ -218,6 +220,7 @@ export const TwoTransactionsAndZeroBalance = tests.createExample( transactions: [exampleData.withdraw, exampleData.deposit], balances: [ { + flags: [], available: "USD:0" as AmountString, pendingIncoming: "USD:0" as AmountString, pendingOutgoing: "USD:0" as AmountString, @@ -244,6 +247,7 @@ export const OneTransactionPending = tests.createExample(TestedComponent, { ], balances: [ { + flags: [], available: "USD:10" as AmountString, pendingIncoming: "USD:0" as AmountString, pendingOutgoing: "USD:0" as AmountString, @@ -278,6 +282,7 @@ export const SomeTransactions = tests.createExample(TestedComponent, { ], balances: [ { + flags: [], available: "USD:10" as AmountString, pendingIncoming: "USD:0" as AmountString, pendingOutgoing: "USD:0" as AmountString, @@ -371,6 +376,7 @@ export const SomeTransactionsInDifferentStates = tests.createExample( ], balances: [ { + flags: [], available: "USD:10" as AmountString, pendingIncoming: "USD:0" as AmountString, pendingOutgoing: "USD:0" as AmountString, @@ -401,6 +407,7 @@ export const SomeTransactionsWithTwoCurrencies = tests.createExample( ], balances: [ { + flags: [], available: "USD:0" as AmountString, pendingIncoming: "USD:0" as AmountString, pendingOutgoing: "USD:0" as AmountString, @@ -413,6 +420,7 @@ export const SomeTransactionsWithTwoCurrencies = tests.createExample( }, }, { + flags: [], available: "TESTKUDOS:10" as AmountString, pendingIncoming: "TESTKUDOS:0" as AmountString, pendingOutgoing: "TESTKUDOS:0" as AmountString, @@ -432,6 +440,7 @@ export const FiveOfficialCurrencies = tests.createExample(TestedComponent, { transactions: [exampleData.withdraw], balances: [ { + flags: [], available: "USD:1000" as AmountString, pendingIncoming: "USD:0" as AmountString, pendingOutgoing: "USD:0" as AmountString, @@ -444,6 +453,7 @@ export const FiveOfficialCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "EUR:881" as AmountString, pendingIncoming: "TESTKUDOS:0" as AmountString, pendingOutgoing: "TESTKUDOS:0" as AmountString, @@ -456,6 +466,7 @@ export const FiveOfficialCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "COL:4043000.5" as AmountString, pendingIncoming: "TESTKUDOS:0" as AmountString, pendingOutgoing: "TESTKUDOS:0" as AmountString, @@ -468,6 +479,7 @@ export const FiveOfficialCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "JPY:11564450.6" as AmountString, pendingIncoming: "TESTKUDOS:0" as AmountString, pendingOutgoing: "TESTKUDOS:0" as AmountString, @@ -480,6 +492,7 @@ export const FiveOfficialCurrencies = tests.createExample(TestedComponent, { }, }, { + flags: [], available: "GBP:736" as AmountString, pendingIncoming: "TESTKUDOS:0" as AmountString, pendingOutgoing: "TESTKUDOS:0" as AmountString, @@ -500,6 +513,7 @@ export const FiveOfficialCurrenciesWithHighValue = tests.createExample( transactions: [exampleData.withdraw], balances: [ { + flags: [], available: "USD:881001321230000" as AmountString, pendingIncoming: "USD:0" as AmountString, pendingOutgoing: "USD:0" as AmountString, @@ -512,6 +526,7 @@ export const FiveOfficialCurrenciesWithHighValue = tests.createExample( }, }, { + flags: [], available: "EUR:10" as AmountString, pendingIncoming: "TESTKUDOS:0" as AmountString, pendingOutgoing: "TESTKUDOS:0" as AmountString, @@ -524,6 +539,7 @@ export const FiveOfficialCurrenciesWithHighValue = tests.createExample( }, }, { + flags: [], available: "COL:443000123123000.5123123" as AmountString, pendingIncoming: "TESTKUDOS:0" as AmountString, pendingOutgoing: "TESTKUDOS:0" as AmountString, @@ -536,6 +552,7 @@ export const FiveOfficialCurrenciesWithHighValue = tests.createExample( requiresUserInput: false, }, { + flags: [], available: "JPY:1564450000000.6123123" as AmountString, pendingIncoming: "TESTKUDOS:0" as AmountString, pendingOutgoing: "TESTKUDOS:0" as AmountString, @@ -548,6 +565,7 @@ export const FiveOfficialCurrenciesWithHighValue = tests.createExample( }, }, { + flags: [], available: "GBP:736001231231200.23123" as AmountString, pendingIncoming: "TESTKUDOS:0" as AmountString, pendingOutgoing: "TESTKUDOS:0" as AmountString, @@ -572,6 +590,7 @@ export const PeerToPeer = tests.createExample(TestedComponent, { ], balances: [ { + flags: [], available: "USD:10" as AmountString, pendingIncoming: "USD:0" as AmountString, pendingOutgoing: "USD:0" as AmountString, |