@@ -30,7 +30,7 @@ import {
30
30
XrpCoin ,
31
31
ZkethERC20Token ,
32
32
} from './account' ;
33
- import { CoinFamily , CoinKind , BaseCoin , CoinFeature } from './base' ;
33
+ import { CoinFamily , CoinKind , BaseCoin } from './base' ;
34
34
import { coins } from './coins' ;
35
35
import { Networks , NetworkType } from './networks' ;
36
36
import { OfcCoin } from './ofc' ;
@@ -748,23 +748,6 @@ export const getFormattedAlgoTokens = (customCoinMap = coins) =>
748
748
return acc ;
749
749
} , [ ] ) ;
750
750
751
- // Get the list of ERC-20 tokens from statics and format it properly
752
- // TODO: use it instead of getFormatteCoredaoTokens
753
- // const getFormattedEthLikeTokens = (customCoinMap = coins) =>
754
- // customCoinMap.reduce((acc: EthLikeTokenConfig[], coin) => {
755
- // if (coin instanceof EthLikeERC20Token && coin.features.includes(CoinFeature.SHARED_EVM_SDK)) {
756
- // acc.push({
757
- // type: coin.name,
758
- // coin: coin.network.type === NetworkType.MAINNET ? coin.coinNames.Mainnet : coin.coinNames.Testnet,
759
- // network: coin.network.type === NetworkType.MAINNET ? 'Mainnet' : 'Testnet',
760
- // name: coin.fullName,
761
- // tokenContractAddress: coin.contractAddress.toString().toLowerCase(),
762
- // decimalPlaces: coin.decimalPlaces,
763
- // });
764
- // }
765
- // return acc;
766
- // }, []);
767
-
768
751
function getHbarTokenConfig ( coin : HederaToken ) : HbarTokenConfig {
769
752
return {
770
753
type : coin . name ,
@@ -1012,59 +995,6 @@ function getCosmosTokenConfig(coin: CosmosChainToken): CosmosTokenConfig {
1012
995
} ;
1013
996
}
1014
997
1015
- export interface FormattedTokensByChain {
1016
- bitcoin : {
1017
- [ chainName : string ] : {
1018
- tokens : EthLikeTokenConfig [ ] ;
1019
- nfts ?: EthLikeTokenConfig [ ] ;
1020
- } ;
1021
- } ;
1022
- testnet : {
1023
- [ chainName : string ] : {
1024
- tokens : EthLikeTokenConfig [ ] ;
1025
- nfts ?: EthLikeTokenConfig [ ] ;
1026
- } ;
1027
- } ;
1028
- }
1029
-
1030
- /**
1031
- * Dynamically populate tokens by looping through coins once
1032
- */
1033
- function populateEthLikeTokens ( customCoinMap = coins ) : FormattedTokensByChain {
1034
- const tokensMap : FormattedTokensByChain = {
1035
- bitcoin : { } ,
1036
- testnet : { } ,
1037
- } ;
1038
-
1039
- customCoinMap . forEach ( ( coin ) => {
1040
- if ( coin . features . includes ( CoinFeature . SUPPORTS_ERC20 ) ) {
1041
- const isMainnet = coin . network . type === NetworkType . MAINNET ;
1042
- const networkKey = isMainnet ? 'bitcoin' : 'testnet' ;
1043
- const chainKey = isMainnet ? coin . coinNames . Mainnet : coin . coinNames . Testnet ;
1044
-
1045
- const formattedToken : EthLikeTokenConfig = {
1046
- type : coin . name ,
1047
- coin : chainKey ,
1048
- network : isMainnet ? 'Mainnet' : 'Testnet' ,
1049
- name : coin . fullName ,
1050
- tokenContractAddress : coin . contractAddress . toString ( ) . toLowerCase ( ) ,
1051
- decimalPlaces : coin . decimalPlaces ,
1052
- } ;
1053
-
1054
- // Initialize chain tokens array if it doesn't exist
1055
- if ( ! tokensMap [ networkKey ] [ chainKey ] ) {
1056
- tokensMap [ networkKey ] [ chainKey ] = { tokens : [ ] } ;
1057
- }
1058
-
1059
- tokensMap [ networkKey ] [ chainKey ] . tokens . push ( formattedToken ) ;
1060
- }
1061
- } ) ;
1062
-
1063
- return tokensMap ;
1064
- }
1065
-
1066
- const ethLikeTokens = populateEthLikeTokens ( coins ) ;
1067
-
1068
998
export const getFormattedTokens = ( coinMap = coins ) : Tokens => {
1069
999
const formattedAptNFTCollections = getFormattedAptNFTCollections ( coinMap ) ;
1070
1000
return {
@@ -1162,7 +1092,6 @@ export const getFormattedTokens = (coinMap = coins): Tokens => {
1162
1092
cosmos : {
1163
1093
tokens : getFormattedCosmosChainTokens ( coinMap ) . filter ( ( token ) => token . network === 'Mainnet' ) ,
1164
1094
} ,
1165
- ...ethLikeTokens . bitcoin ,
1166
1095
} ,
1167
1096
testnet : {
1168
1097
eth : {
@@ -1258,7 +1187,6 @@ export const getFormattedTokens = (coinMap = coins): Tokens => {
1258
1187
cosmos : {
1259
1188
tokens : getFormattedCosmosChainTokens ( coinMap ) . filter ( ( token ) => token . network === 'Testnet' ) ,
1260
1189
} ,
1261
- ...ethLikeTokens . testnet ,
1262
1190
} ,
1263
1191
} ;
1264
1192
} ;
0 commit comments