Collect Fee and Rewards
You can collect fees from your positions in several ways:
// Build collect fee and reward transaction
const tx = await sdk.Position.collectRewardAndFeePayload([{
pool_id,
position_id,
reward_coins: reward_manager.rewards.map((reward) => reward.reward_coin),
coin_type_a,
coin_type_b
}])
// Simulate or send the transaction
const sim_result = await sdk.FullClient.sendSimulationTransaction(tx, wallet)
Last updated