Skip to content

Commit

Permalink
added cryptoCurrencyList and fiatAmount transak query params (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
andygruening authored Nov 18, 2024
1 parent 2ef4f33 commit 2812be3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/checkout/src/contexts/AddFundsModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import { createGenericContext } from './genericContext'

export interface AddFundsSettings {
walletAddress: string | Hex
fiatAmount?: string
fiatCurrency?: string
defaultFiatAmount?: string
defaultCryptoCurrency?: string
cryptoCurrencyList?: string
networks?: string
onClose?: () => void
}
Expand Down
2 changes: 2 additions & 0 deletions packages/checkout/src/utils/transak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ export const getTransakLink = (addFundsSettings: AddFundsSettings) => {
apiKey: TRANSAK_API_KEY,
referrerDomain: window.location.origin,
walletAddress: addFundsSettings.walletAddress,
fiatAmount: addFundsSettings?.fiatAmount,
fiatCurrency: addFundsSettings?.fiatCurrency,
disableWalletAddressForm: 'true',
defaultFiatAmount: addFundsSettings?.defaultFiatAmount || '50',
defaultCryptoCurrency: addFundsSettings?.defaultCryptoCurrency || 'USDC',
cryptoCurrencyList: addFundsSettings?.cryptoCurrencyList,
networks: addFundsSettings?.networks || defaultNetworks
}

Expand Down

0 comments on commit 2812be3

Please sign in to comment.