Skip to content

Commit

Permalink
fix: Handles case when getFundingBalanceTotalFees returns undefined (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoloaiza authored Nov 13, 2024
1 parent 1b0e3b1 commit 5241d77
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,17 @@ export function OrderReview({
return;
}

const [[, fee]] = Object.entries(
getFundingBalanceTotalFees(fundingBalance),
);
const totalFees = getFundingBalanceTotalFees(fundingBalance);
if (!totalFees) {
return;
}

const entries = Object.entries(totalFees);
if (!entries.length) {
return;
}

const [[, fee]] = entries;
if (!fee || !fee.token) {
return;
}
Expand Down

0 comments on commit 5241d77

Please sign in to comment.