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
});

ParamRequiredTypeDescription

rewardId

required

number

the rewardId you are setting a custom percentage for

percentage

required

number

the custom percentage to apply for the given user and reward

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