Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kanatliemre committed Jul 21, 2021
1 parent c3c2d09 commit f85d257
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions src/Asset/Erc20.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { Erc20Store, Erc20TokenData } from '@/Asset/types';
import { activeNetwork } from '@/Network/network';
import Erc20Token from '@/Asset/Erc20Token';
import { WalletBalanceERC20 } from '@/Wallet/types';
import { bnToLocaleString } from '@/utils/utils';

export let erc20Cache: Erc20Store = {};

Expand Down Expand Up @@ -61,40 +58,3 @@ export async function getErc20Token(address: string): Promise<Erc20Token> {
return await addErc20Token(address);
}
}

/**
* Returns the balance of the given address for each ERC20 Token in the SDK.
* @param address EVM address `0x...`
*/
// export async function balanceOf(address: string): Promise<WalletBalanceERC20> {
// let balance: WalletBalanceERC20 = {};
//
// let store = {
// ...erc20Store,
// ...erc20StoreCustom,
// };
//
// for (let tokenAddress in store) {
// let token = store[tokenAddress];
// if (token.chainId === activeNetwork?.evmChainID) {
// let bal = await token.balanceOf(address);
// balance[tokenAddress] = {
// name: token.name,
// symbol: token.symbol,
// denomination: token.decimals,
// balance: bal,
// balanceParsed: bnToLocaleString(bal, token.decimals),
// address: tokenAddress,
// };
// }
// }
//
// return balance;
// }

// function initStore() {
// DEFAULT_TOKENS.forEach((token) => {
// addErc20TokenFromData(token, erc20Store);
// });
// }
// initStore();

0 comments on commit f85d257

Please sign in to comment.