diff --git a/packages/canonical-bridge-widget/src/modules/aggregator/shared/sortTokens.ts b/packages/canonical-bridge-widget/src/modules/aggregator/shared/sortTokens.ts index 460514b9..7162342c 100644 --- a/packages/canonical-bridge-widget/src/modules/aggregator/shared/sortTokens.ts +++ b/packages/canonical-bridge-widget/src/modules/aggregator/shared/sortTokens.ts @@ -52,13 +52,15 @@ export function sortTokens({ return 1; } - if (a.balance && b.balance) { + const aBalance = Number(a.balance); + const bBalance = Number(b.balance); + if (aBalance && bBalance) { return sortWithPredefinedOrders(); } - if (a.balance && !b.balance) { + if (aBalance && !bBalance) { return -1; } - if (!a.balance && b.balance) { + if (!aBalance && bBalance) { return 1; } }