Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ interface UseTransactionDetailsOptions {
transaction: PreparedTransaction;
client: ThirdwebClient;
wallet: Wallet | undefined;
currency?: SupportedFiatCurrency;
currency: SupportedFiatCurrency | undefined;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
client,
transaction: uiOptions.transaction,
wallet,
currency: uiOptions.currency,

Check warning on line 92 in packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx#L92

Added line #L92 was not covered by tests
});

// We can't use useWalletBalance here because erc20Value is a possibly async value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
client: props.client,
transaction: props.uiOptions.transaction,
wallet: props.paymentMethod.payerWallet,
currency: props.uiOptions.currency,

Check warning on line 213 in packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx#L213

Added line #L213 was not covered by tests
});

if (!txInfo.data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,37 @@ export const TransactionLight: Story = {
},
};

/**
* Transaction mode in light theme showing an ERC20 token transfer.
*/
export const TransactionJPYCurrency: Story = {
args: {
connectLocale: undefined,
connectOptions: undefined,
onCancel: undefined,
onComplete: undefined,
onError: undefined,
paymentLinkId: undefined,
presetOptions: undefined,
purchaseData: undefined,
receiverAddress: undefined,
theme: "light",
uiOptions: {
...TRANSACTION_UI_OPTIONS.erc20Transfer,
currency: "JPY",
},
},
parameters: {
backgrounds: { default: "light" },
docs: {
description: {
story:
"Light theme version of transaction mode showing an ERC20 token transfer with proper token amount formatting and USD conversion.",
},
},
},
};

export const CustompresetOptions: Story = {
args: {
connectLocale: undefined,
Expand Down
Loading