Skip to content

Commit

Permalink
Fix derive.balances.all when data is undefined (#5961)
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul authored Aug 21, 2024
1 parent 72d1326 commit 8cddcd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api-derive/src/balances/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function calcShared (api: DeriveApi, bestNumber: BlockNumber, data: DeriveBalanc
const { allLocked, lockedBalance, lockedBreakdown, vestingLocked } = calcLocked(api, bestNumber, locks);
let transferable = null;

if (data.frameSystemAccountInfo?.frozen) {
if (data?.frameSystemAccountInfo?.frozen) {
const { frameSystemAccountInfo, freeBalance, reservedBalance } = data;
const noFrozenReserved = frameSystemAccountInfo.frozen.isZero() && reservedBalance.isZero();
const ED = api.consts.balances.existentialDeposit;
Expand Down

0 comments on commit 8cddcd2

Please sign in to comment.