setRewardTiersOverride([payload,])

We allow tier percentage overriding should you wish to specify a custom percentage reward for specific users

const rewardId = 1; //Your reward ID to override

await userClient.setRewardTiersOverride({
   rewardId,
   percentage: 25 //the custom reward % for the given user
});

import { ChainvineClient } from '@chainvine/sdk';

const userWalletAddress = '0x293kdo0ij0';

// Generate your ChainvineClient instance
const client = new ChainvineClient(); //Make sure to whitelist your domain
const userClient = await client.syncUser(userWalletAddress);

const rewardId = 1; //Your reward ID to override

await userClient.setRewardTiersOverride({
   rewardId,
   percentage: 25 //the custom reward % for the given user
});

Last updated