Skip to content

Documentation / react-auth / useFundWallet

Function: useFundWallet()

useFundWallet(callbacks?): UseFundWalletInterface

Hook to fund a wallet via Privy's fiat on-ramp integration given the wallet address.

Parameters

callbacks?: Object

callbacks.onUserExited?: (params) => void

Callback that will execute when a funding flow is exited. This fires when a user closes a funding flow modal, for any reason.

Param {string} The address of the wallet being funded

Param {Chain} The chain of the wallet being funded

Param [FundingMethod]([object Object]) The funding method associated with the flow at time of exit. If the user had not yet selected a recovery method, this will be null.

Param {bigint} The value for the funded wallet at the point of user exit.

Returns

UseFundWalletInterface

fundWallet - function to on-ramp funds to any given wallet