Skip to content

Commit

Permalink
getBalances refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Mar 5, 2024
1 parent 1fd3156 commit e0efa94
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions packages/client/src/getBalances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,9 @@ export const getBalances = async function (

tokens = tokens.map((token: any) => {
const ticker = token.symbol.split("-")[0];
let chain_name;
if (token.chain_id === 7001) {
chain_name = "zeta_testnet";
} else if (token.chain_id === 7000) {
chain_name = "zeta_mainnet";
} else {
chain_name = supportedChains.find(
(c: any) => c.chain_id === token.chain_id
)?.chain_name;
}
const { chain_name } = supportedChains.find(
(c: any) => c.chain_id === token.chain_id.toString()
);
return {
...token,
chain_name,
Expand Down

0 comments on commit e0efa94

Please sign in to comment.