diff options
author | Sebastian <sebasjm@gmail.com> | 2023-05-10 13:35:18 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-05-10 13:35:18 -0300 |
commit | f281803f1e555b8e8c1e76612b1f6b7128033cd6 (patch) | |
tree | a30f1863a5b5ea27c2e382bb0297e9b9e55de572 /packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx | |
parent | 6308c7ea6ba195199ee413c6c485321a013a514a (diff) | |
download | wallet-core-f281803f1e555b8e8c1e76612b1f6b7128033cd6.tar.xz |
compile again after DD37 impl
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx | 61 |
1 files changed, 42 insertions, 19 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx index 71f8cfe1a..78b741b51 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx @@ -21,7 +21,6 @@ import { AbsoluteTime, - ExtendedStatus, PaymentStatus, RefreshReason, TalerProtocolTimestamp, @@ -56,19 +55,20 @@ export default { }, }; -const commonTransaction = { +const commonTransaction: TransactionCommon = { + error: undefined, amountRaw: "KUDOS:11", amountEffective: "KUDOS:9.2", - extendedStatus: ExtendedStatus.Done, - pending: undefined as any as boolean, //deprecated + txState: { + major: TransactionMajorState.Done, + }, timestamp: TalerProtocolTimestamp.now(), transactionId: "txn:deposit:12", - frozen: undefined as any as boolean, //deprecated type: TransactionType.Deposit, - txState: { - major: TransactionMajorState.Unknown, - }, -} as TransactionCommon; +} as Omit< + Omit<Omit<TransactionCommon, "extendedStatus">, "frozen">, + "pending" +> as TransactionCommon; import merchantIcon from "../../static-dev/merchant-icon.jpeg"; @@ -262,7 +262,9 @@ export const WithdrawFiveMinutesAgoAndPending = tests.createExample( timestamp: TalerProtocolTimestamp.fromSeconds( new Date().getTime() / 1000 - 60 * 5, ), - extendedStatus: ExtendedStatus.Pending, + txState: { + major: TransactionMajorState.Pending, + }, }, }), ); @@ -302,7 +304,9 @@ export const WithdrawPendingManual = tests.createExample( exchangePaytoUris: ["payto://iban/ES8877998399652238"], reservePub: "A05AJGMFNSK4Q62NXR2FKNDB1J4EXTYQTE7VA4M9GZQ4TR06YBNG", } as WithdrawalDetails, - extendedStatus: ExtendedStatus.Pending, + txState: { + major: TransactionMajorState.Pending, + }, }, }), ); @@ -319,7 +323,9 @@ export const WithdrawPendingTalerBankUnconfirmed = tests.createExample( reservePub: "A05AJGMFNSK4Q62NXR2FKNDB1J4EXTYQTE7VA4M9GZQ4TR06YBNG", bankConfirmationUrl: "http://bank.demo.taler.net", }, - extendedStatus: ExtendedStatus.Pending, + txState: { + major: TransactionMajorState.Pending, + }, }, }, ); @@ -335,7 +341,9 @@ export const WithdrawPendingTalerBankConfirmed = tests.createExample( reserveIsReady: false, reservePub: "A05AJGMFNSK4Q62NXR2FKNDB1J4EXTYQTE7VA4M9GZQ4TR06YBNG", }, - extendedStatus: ExtendedStatus.Pending, + txState: { + major: TransactionMajorState.Pending, + }, }, }, ); @@ -461,7 +469,9 @@ export const PaymentWithoutFee = tests.createExample(TestedComponent, { export const PaymentPending = tests.createExample(TestedComponent, { transaction: { ...exampleData.payment, - extendedStatus: ExtendedStatus.Pending, + txState: { + major: TransactionMajorState.Pending, + }, }, }); @@ -561,7 +571,9 @@ export const DepositError = tests.createExample(TestedComponent, { export const DepositPending = tests.createExample(TestedComponent, { transaction: { ...exampleData.deposit, - extendedStatus: ExtendedStatus.Pending, + txState: { + major: TransactionMajorState.Pending, + }, }, }); @@ -588,7 +600,12 @@ export const TipError = tests.createExample(TestedComponent, { }); export const TipPending = tests.createExample(TestedComponent, { - transaction: { ...exampleData.tip, extendedStatus: ExtendedStatus.Pending }, + transaction: { + ...exampleData.tip, + txState: { + major: TransactionMajorState.Pending, + }, + }, }); export const Refund = tests.createExample(TestedComponent, { @@ -605,7 +622,9 @@ export const RefundError = tests.createExample(TestedComponent, { export const RefundPending = tests.createExample(TestedComponent, { transaction: { ...exampleData.refund, - extendedStatus: ExtendedStatus.Pending, + txState: { + major: TransactionMajorState.Pending, + }, }, }); @@ -616,7 +635,9 @@ export const InvoiceCreditComplete = tests.createExample(TestedComponent, { export const InvoiceCreditIncomplete = tests.createExample(TestedComponent, { transaction: { ...exampleData.pull_credit, - extendedStatus: ExtendedStatus.Pending, + txState: { + major: TransactionMajorState.Pending, + }, }, }); @@ -634,6 +655,8 @@ export const TransferDebitComplete = tests.createExample(TestedComponent, { export const TransferDebitIncomplete = tests.createExample(TestedComponent, { transaction: { ...exampleData.push_debit, - extendedStatus: ExtendedStatus.Pending, + txState: { + major: TransactionMajorState.Pending, + }, }, }); |