Magic Spend
With Magic Spend, Smart Wallet users can use their Coinbase balances onchain. This means users can easily start using onchain apps without needing to onramp funds into their wallet.
This also means that apps might not have all the balance information typically available to them by reading onchain data. Smart Wallet indicates that this is the case by responding to wallet_getCapabilities
RPC calls with the auxiliaryFunds
capability for each chain Smart Wallet users can use their Coinbase balances on.
If your app supports Smart Wallet, it should not assume it knows the full balances available to a user if the auxiliaryFunds
capability is present on a given chain.
Using Wagmi
import { useCapabilities } from 'wagmi/experimental'
function App() {
const { data: capabilities } = useCapabilities()
{ 84532: { auxiliaryFunds: { supported: true, }, } } return <div />
}
If your app supports Smart Wallet and sees that the auxiliaryFunds
capability is supported on a given chain,
it means that a user might have funds available for use onchain on Coinbase.
As a result, your app should not block user actions on the basis of balance checks.