π°Monetization
How to enable affiliate in Rango Widget?
Last updated
import { Widget, WidgetConfig } from "@rango-dev/widget-embedded";
export default function App() {
const config = {
// This API key is only for test purpose. Don't use it in production.
apiKey: 'c6381a79-2817-4602-83bf-6a641a409e32',
affiliate: {
// The affilaite ref code you've created on step above
ref: 'YOUR_AFFILIATE_REF_CODE',
// The affiliate percent you want to charge users based on input amount
// Setting 0.1 means 0.1% of input amount
percent: 0.1,
// If you want to change the default wallet that you want to earn reward,
// you could pass your desired wallets in this property
wallets: {
'ETH': 'your wallet',
'BSC': 'your wallet',
'POLYGON': 'your wallet',
// ...
}
}
}
return (
<div className="App">
<Widget config={config} />
</div>
);
}