summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-01-13 16:09:33 -0300
committerSebastian <sebasjm@gmail.com>2023-01-13 16:09:33 -0300
commit0b2bf13deff518c3ebbdaf4a72d2c162790906b7 (patch)
treee8e778cc7cc90daf2a54f32f8c6be5912f814621 /packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
parentbc67ff0c7f298b0657164037ba01e1bc3488202c (diff)
downloadwallet-core-0b2bf13deff518c3ebbdaf4a72d2c162790906b7.tar.gz
wallet-core-0b2bf13deff518c3ebbdaf4a72d2c162790906b7.tar.bz2
wallet-core-0b2bf13deff518c3ebbdaf4a72d2c162790906b7.zip
using extendedStatus
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx37
1 files changed, 23 insertions, 14 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
index fea96a02c..21e9ee55e 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx
@@ -39,14 +39,13 @@ import {
WithdrawalDetails,
WithdrawalType,
} from "@gnu-taler/taler-util";
-import { DevContextProviderForTesting } from "../context/devContext.js";
// import {
// createExample,
// createExampleWithCustomContext as createExampleInCustomContext,
// } from "../test-utils.js";
-import { TransactionView as TestedComponent } from "./Transaction.js";
import { tests } from "@gnu-taler/web-util/lib/index.browser";
import beer from "../../static-dev/beer.png";
+import { TransactionView as TestedComponent } from "./Transaction.js";
export default {
title: "transaction details",
@@ -54,6 +53,7 @@ export default {
argTypes: {
onRetry: { action: "onRetry" },
onDelete: { action: "onDelete" },
+ onCancel: { action: "onCancel" },
onBack: { action: "onBack" },
},
};
@@ -62,10 +62,10 @@ const commonTransaction = {
amountRaw: "KUDOS:11",
amountEffective: "KUDOS:9.2",
extendedStatus: ExtendedStatus.Done,
- pending: false,
+ pending: undefined as any as boolean, //deprecated
timestamp: TalerProtocolTimestamp.now(),
transactionId: "txn:deposit:12",
- frozen: false,
+ frozen: undefined as any as boolean, //deprecated
type: TransactionType.Deposit,
} as TransactionCommon;
@@ -255,7 +255,7 @@ export const WithdrawFiveMinutesAgoAndPending = tests.createExample(
timestamp: TalerProtocolTimestamp.fromSeconds(
new Date().getTime() / 1000 - 60 * 5,
),
- pending: true,
+ extendedStatus: ExtendedStatus.Pending,
},
}),
);
@@ -295,7 +295,7 @@ export const WithdrawPendingManual = tests.createExample(
exchangePaytoUris: ["payto://iban/ES8877998399652238"],
reservePub: "A05AJGMFNSK4Q62NXR2FKNDB1J4EXTYQTE7VA4M9GZQ4TR06YBNG",
} as WithdrawalDetails,
- pending: true,
+ extendedStatus: ExtendedStatus.Pending,
},
}),
);
@@ -311,7 +311,7 @@ export const WithdrawPendingTalerBankUnconfirmed = tests.createExample(
reservePub: "A05AJGMFNSK4Q62NXR2FKNDB1J4EXTYQTE7VA4M9GZQ4TR06YBNG",
bankConfirmationUrl: "http://bank.demo.taler.net",
},
- pending: true,
+ extendedStatus: ExtendedStatus.Pending,
},
},
);
@@ -326,7 +326,7 @@ export const WithdrawPendingTalerBankConfirmed = tests.createExample(
confirmed: true,
reservePub: "A05AJGMFNSK4Q62NXR2FKNDB1J4EXTYQTE7VA4M9GZQ4TR06YBNG",
},
- pending: true,
+ extendedStatus: ExtendedStatus.Pending,
},
},
);
@@ -443,7 +443,10 @@ export const PaymentWithoutFee = tests.createExample(TestedComponent, {
});
export const PaymentPending = tests.createExample(TestedComponent, {
- transaction: { ...exampleData.payment, pending: true },
+ transaction: {
+ ...exampleData.payment,
+ extendedStatus: ExtendedStatus.Pending,
+ },
});
export const PaymentWithProducts = tests.createExample(TestedComponent, {
@@ -540,7 +543,10 @@ export const DepositError = tests.createExample(TestedComponent, {
});
export const DepositPending = tests.createExample(TestedComponent, {
- transaction: { ...exampleData.deposit, pending: true },
+ transaction: {
+ ...exampleData.deposit,
+ extendedStatus: ExtendedStatus.Pending,
+ },
});
export const Refresh = tests.createExample(TestedComponent, {
@@ -566,7 +572,7 @@ export const TipError = tests.createExample(TestedComponent, {
});
export const TipPending = tests.createExample(TestedComponent, {
- transaction: { ...exampleData.tip, pending: true },
+ transaction: { ...exampleData.tip, extendedStatus: ExtendedStatus.Pending },
});
export const Refund = tests.createExample(TestedComponent, {
@@ -581,7 +587,10 @@ export const RefundError = tests.createExample(TestedComponent, {
});
export const RefundPending = tests.createExample(TestedComponent, {
- transaction: { ...exampleData.refund, pending: true },
+ transaction: {
+ ...exampleData.refund,
+ extendedStatus: ExtendedStatus.Pending,
+ },
});
export const InvoiceCreditComplete = tests.createExample(TestedComponent, {
@@ -591,7 +600,7 @@ export const InvoiceCreditComplete = tests.createExample(TestedComponent, {
export const InvoiceCreditIncomplete = tests.createExample(TestedComponent, {
transaction: {
...exampleData.pull_credit,
- pending: true,
+ extendedStatus: ExtendedStatus.Pending,
},
});
@@ -609,6 +618,6 @@ export const TransferDebitComplete = tests.createExample(TestedComponent, {
export const TransferDebitIncomplete = tests.createExample(TestedComponent, {
transaction: {
...exampleData.push_debit,
- pending: true,
+ extendedStatus: ExtendedStatus.Pending,
},
});