The Dynamic SDK provides methods to show and hide a funding options UI that allows users to add funds to their wallets.

Show Funding Options

client.ui.fundingOptions.show()

Shows the funding options UI overlay where users can select different methods to fund their wallet.

Hide Funding Options

client.ui.fundingOptions.hide()

Dismisses the funding options UI overlay if it’s currently visible.

Usage Example

Here’s a basic example of how to implement funding options in your React Native application:

import { useDynamicContext } from '@dynamic-labs/sdk-react-native'

const FundingComponent = () => {
  const { client } = useDynamicContext()

  const handleShowFunding = () => {
    client.ui.fundingOptions.show()
  }

  const handleHideFunding = () => {
    client.ui.fundingOptions.hide()
  }

  return (
    <>
      <Button onPress={handleShowFunding} title="Add Funds" />
      <Button onPress={handleHideFunding} title="Close Funding Options" />
    </>
  )
}