Dapp developer with some smart contract knowledge

Job ID: 31293880

Budget: $30 – $250 USD

Need to use https://github.com/ArmorFi/arCore/blob/d0bc34cea566b2a341727e427d30003dde7c368f/contracts/core/RewardManagerV2.sol#L391 to get totalPendingRewards.

I'm not sure exactly what the most efficient way to find all protocols the user has had is. Maybe just look through the past and getTotalPending for all protocols they've had in the past?

We need to getTotalPending and get reward from the last contract (that it currently does) in case that one is greater than 0.

If the old one is greater than 0 and we also have to get reward from there, we need a modal that pops up to explain that two transactions will be needed because the old reward contract still has funds, then both txs need to be done (second using https://github.com/ArmorFi/arCore/blob/d0bc34cea566b2a341727e427d30003dde7c368f/contracts/core/RewardManagerV2.sol#L307)
Related categories: JavaScript React.js Smart Contracts