diff --git a/package.json b/package.json index 9578632..7b43249 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@project-serum/swap-ui", - "version": "0.1.2", + "version": "0.1.3", "main": "dist/index.js", "types": "dist/index.d.ts", "homepage": "https://github.com/project-serum/swap-ui", diff --git a/src/context/Token.tsx b/src/context/Token.tsx index 523a3fe..4984387 100644 --- a/src/context/Token.tsx +++ b/src/context/Token.tsx @@ -69,9 +69,9 @@ export function useOwnedTokenAccount( // Take the account with the most tokens in it. tokenAccounts.sort((a, b) => - a.account.amount < b.account.amount + a.account.amount > b.account.amount ? -1 - : a.account.amount > b.account.amount + : a.account.amount < b.account.amount ? 1 : 0 );