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 @@ -89,7 +89,6 @@ export function RightSection(props: {
}
name={props.options.payOptions.title || "Your Product Name"}
paymentMethods={props.options.payOptions.paymentMethods}
presetOptions={[1, 2, 3]}
seller={props.options.payOptions.sellerAddress}
theme={themeObj}
tokenAddress={props.options.payOptions.buyTokenAddress}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as Bridge from "../../../../bridge/index.js";
import type { Chain } from "../../../../chains/types.js";
import type { BuyWithCryptoStatus } from "../../../../pay/buyWithCrypto/getStatus.js";
import type { BuyWithFiatStatus } from "../../../../pay/buyWithFiat/getStatus.js";
import type { SupportedFiatCurrency } from "../../../../pay/convert/type.js";
import type { PurchaseData } from "../../../../pay/types.js";
import type { FiatProvider } from "../../../../pay/utils/commonTypes.js";
import type { GaslessOptions } from "../../../../transaction/actions/gasless/types.js";
Expand Down Expand Up @@ -94,6 +95,11 @@ export type SendTransactionPayModalConfig =
* The user's ISO 3166 alpha-2 country code. This is used to determine onramp provider support.
*/
country?: string;
/**
* The currency to use for showing the fiat values
* @default "USD"
*/
currency?: SupportedFiatCurrency;
}
| false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getThirdwebBaseUrl } from "../../../utils/domains.js";
import { getClientFetch } from "../../../utils/fetch.js";
import { toTokens, toUnits } from "../../../utils/units.js";
import type { Wallet } from "../../../wallets/interfaces/wallet.js";
import type { PaymentMethod } from "../machines/paymentMachine.js";
import type { PaymentMethod } from "../../web/ui/Bridge/types.js";
import type { SupportedTokens } from "../utils/defaultTokens.js";
import { useActiveWallet } from "./wallets/useActiveWallet.js";

Expand All @@ -33,15 +33,13 @@ export function usePaymentMethods(options: {
destinationAmount: string;
client: ThirdwebClient;
payerWallet?: Wallet;
includeDestinationToken?: boolean;
supportedTokens?: SupportedTokens;
}) {
const {
destinationToken,
destinationAmount,
client,
payerWallet,
includeDestinationToken,
supportedTokens,
} = options;
const localWallet = useActiveWallet(); // TODO (bridge): get all connected wallets
Expand Down Expand Up @@ -135,7 +133,6 @@ export function usePaymentMethods(options: {
destinationToken.address,
destinationAmount,
payerWallet?.getAccount()?.address,
includeDestinationToken,
supportedTokens,
], // 5 minutes
refetchOnWindowFocus: false,
Expand Down
Loading
Loading