Skip to content

Commit

Permalink
Fix custom address handling in chain rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotkk committed Nov 21, 2024
1 parent 2495bc1 commit 435d99e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/delegation/ChainRewards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ const ChainRewards: React.FC<ChainRewardsProps> = ({
const { data: walletClient } = useWagmiWalletClient()
const { switchChainAsync } = useWagmiSwitchNetwork()

const addr = customAddress ?? address

useEffect(() => {
loadData()
const intervalId = setInterval(loadData, DEFAULT_UPDATE_INTERVAL_MS)
Expand Down Expand Up @@ -121,7 +123,7 @@ const ChainRewards: React.FC<ChainRewardsProps> = ({
setTokenUrl(getExplorerUrlForAddress(network, paymasterChain, tokenAddress))
setSklToken(skl)
}
setTokenBalance(await skl.balanceOf(address))
setTokenBalance(await skl.balanceOf(addr))
}

async function retrieveRewards() {
Expand Down

0 comments on commit 435d99e

Please sign in to comment.