Skip to content

Commit

Permalink
Merge branch 'main' into feat/billing-history-table
Browse files Browse the repository at this point in the history
  • Loading branch information
devinxl authored Nov 16, 2023
2 parents 374a5e2 + f3d61d4 commit c51ee68
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/dcellar-web-ui/src/store/slices/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,13 @@ export const setupPaymentAccounts =
let totalPANetflowRate = BN(0);
const newPAs = data.paymentAccounts.map((address, index) => {
const detail = keyAccountDetail[address];
totalPANetflowRate = totalPANetflowRate.plus(BN(detail.StreamRecord.NetflowRate).abs());
// Some PAs existed in the chain but are missing in the SP service.
totalPANetflowRate = totalPANetflowRate.plus(BN(detail?.StreamRecord?.NetflowRate || 0).abs());
return {
name: `Payment Account ${index + 1}`,
address,
streamRecord: detail.StreamRecord,
refundable: detail.PaymentAccount.Refundable,
streamRecord: detail?.StreamRecord || {},
refundable: detail?.PaymentAccount?.Refundable || true,
bufferTime: CLIENT_FROZEN__ACCOUNT_BUFFER_TIME,
};
});
Expand Down

0 comments on commit c51ee68

Please sign in to comment.