Configure the onramp to use USDC as the asset and set the default experience to buy (onrampOptions)
Copy
Ask AI
const onrampOptions = (defaultOnrampOptions) => { // Detect if we have a coinbase onramp option available const coinbaseOption = defaultOnrampOptions.find(option => option.id === "coinbaseOnramp"); if (coinbaseOption) { // Use the coinbase onramp option as a base and add a new option with the USDC asset and buy experience const newOption = { ...coinbaseOption, id: "coinbaseUsdc", displayName: "Buy USDC", url: `${coinbaseOption.url}&defaultAsset=USDC&defaultExperience=buy` }; return [...defaultOnrampOptions, newOption]; } return defaultOnrampOptions;};