⚛️ React Environment Properties

Environmental settings that determine how the withdrawal process functions


walletYSet the Solana wallet adapter
blockchainYThe blockchain for the withdrawal (solana)
merchantIdYThe merchant identifier - the source of the withdraw (Contact Coinflow support for this)
connectionYThe Solana connection
envNThe environment - defaults to prod, for testing set it to staging
onSuccessNSpecify a function to run when the withdrawal process succeeds
lockAmountNBy default, the user is allowed to select the amount to withdraw, setting to true disables the input
amountN/YThe amount of the withdrawal - only required if lockAmount=true
tokensNDefine the list of available tokens - the UI will only show items from this list
lockDefaultTokenNDefaults to false but when true, the UI will not allow the token to be changed from the default (for example, USDC)
emailNSet the default email to use in email entry fields
bankAccountLinkRedirectNThe URL to use for bank account setup instead of the default
supportsVersionedTransactionsNInstruct the system that you support versioned transactions
additionalWalletsNDefine additional wallets beyond the active wallet to associate with the user (see usage pattern below)



import {useWallet} from '@solana/wallet-adapter-react';
const wallet = useWallet();
const connection = useConnection();

<CoinflowWithdraw wallet={wallet} merchantId='<YOUR MERCHANT ID>' env='prod|sandbox|staging' connection={connection} />;

Additional Wallets

const additionalWallets = [
    wallet: '1111111111111111111111111111111111111111111',
    blockchain: 'solana'