Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix(plutus): Fixed farm pls rdnt rewards (#3110)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpoulin committed Dec 8, 2023
1 parent 687a003 commit 9d3f0d6
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -72,6 +72,11 @@ export class ArbitrumPlutusFarmPlsRdntContractPositionFetcher extends SingleStak
}

async getRewardTokenBalances({ contract, address }: GetTokenBalancesParams<PlutusFarmPlsRdnt>) {
return contract.read.pendingRewards([address]).then(v => [v.pls, v.wbtc, v.usdt, v.usdc, v.dai, v.weth]);
try {
const rewards = await contract.read.pendingRewards([address]);
return [rewards.pls, rewards.wbtc, rewards.usdt, rewards.usdc, rewards.dai, rewards.weth];
} catch (error) {
return [0, 0, 0, 0, 0, 0];
}
}
}

0 comments on commit 9d3f0d6

Please sign in to comment.