Skip to content

Commit

Permalink
fix(suite): solana staking balance has no delegation
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-pvl committed Jan 16, 2025
1 parent 28f0437 commit cd30a64
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion suite-common/wallet-utils/src/solanaStakingUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ export const calculateTotalSolStakingBalance = (stakingAccounts: SolanaStakingAc
const { account } = solAccount;

if ('parsed' in account.data) {
return acc.plus(account.data.parsed.info.stake.delegation.stake);
const delegationStake = account.data.parsed?.info?.stake?.delegation?.stake;

if (delegationStake != null) {
return acc.plus(delegationStake);
}
}

return acc;
Expand Down

0 comments on commit cd30a64

Please sign in to comment.