diff options
author | Sebastian <sebasjm@gmail.com> | 2023-05-22 10:40:13 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-05-22 10:40:13 -0300 |
commit | 3e95ae356a98d01e523bdf48547db4114ff224fe (patch) | |
tree | 7cc1e488b902bb3a3eeba92ff81ea0e383ed542d /packages/taler-wallet-webextension/src/wallet | |
parent | 0544b8358af68df87dbc472221d8c0842c2b2db0 (diff) | |
download | wallet-core-3e95ae356a98d01e523bdf48547db4114ff224fe.tar.xz |
fix break on build
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet')
3 files changed, 22 insertions, 24 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx index 1c5ba61c3..93d61ba2b 100644 --- a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx @@ -122,15 +122,11 @@ const exampleData = { type: TransactionType.Refund, refundedTransactionId: "payment:1EMJJH8EP1NX3XF7733NCYS2DBEJW4Q2KA5KEB37MCQJQ8Q5HMC0", - info: { - contractTermsHash: "ASDZXCASD", + paymentInfo: { merchant: { name: "the merchant", }, - orderId: "2021.167-03NPY6MCYMVGT", - products: [], summary: "the summary", - fulfillmentMessage: "", }, refundPending: undefined, } as TransactionRefund, diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx index 78b741b51..7f2069fc9 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx @@ -148,15 +148,12 @@ const exampleData = { type: TransactionType.Refund, refundedTransactionId: "payment:1EMJJH8EP1NX3XF7733NCYS2DBEJW4Q2KA5KEB37MCQJQ8Q5HMC0", - info: { - contractTermsHash: "ASDZXCASD", + paymentInfo: { merchant: { - name: "the merchant", + name: "The merchant", }, - orderId: "2021.167-03NPY6MCYMVGT", - products: [], summary: "Essay: Why the Devil's Advocate Doesn't Help Reach the Truth", - fulfillmentMessage: "", + summary_i18n: {}, }, refundPending: undefined, } as TransactionRefund, diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index cd240ffea..938d62490 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -823,30 +823,35 @@ export function TransactionView({ total={effective} kind="positive" > - {"transaction.info.summary"} - </Header> - - <Part - title={i18n.str`Merchant`} - text={"transaction.info.merchant.name" as TranslatedString} - kind="neutral" - /> - <Part - title={i18n.str`Original order ID`} - text={ + {transaction.paymentInfo ? ( <a href={Pages.balanceTransaction({ tid: transaction.refundedTransactionId, })} > - {"transaction.info.orderId"} + {transaction.paymentInfo.summary} </a> + ) : ( + <span style={{ color: "gray" }}>-- deleted --</span> + )} + </Header> + + <Part + title={i18n.str`Merchant`} + text={ + (transaction.paymentInfo + ? transaction.paymentInfo.merchant.name + : "-- deleted --") as TranslatedString } kind="neutral" /> <Part title={i18n.str`Purchase summary`} - text={"transaction.info.summary" as TranslatedString} + text={ + (transaction.paymentInfo + ? transaction.paymentInfo.summary + : "-- deleted --") as TranslatedString + } kind="neutral" /> <Part |