getYieldRewards
Gets a wallet’s accrued bonus rewards in an Earn vault. Rewards are separate from base yield — base yield accrues automatically and never needs claiming, but rewards sit here until you callclaimYieldRewards.
Returns an empty array when the wallet has no accrued rewards in this vault. A vault can run more than one reward campaign at once, each paying out in a different token, so each entry carries its own token identity (address, symbol, decimals) alongside the amount.
Usage
Parameters
Returns
Promise<YieldVaultReward[]> - The wallet’s accrued rewards in the vault, one entry per reward token/campaign.
Examples
Sum rewards by token
React
useGetYieldRewards is a query hook that stays disabled until walletAccount is defined.
Related
claimYieldRewards- Claim these rewardsgetYieldPosition- The wallet’s share balance and asset value