Skip to content

Commit 3bf3174

Browse files
authored
Merge pull request #6727 from BitGo/COIN-5281
test: token naming convention for cosmos tokens
2 parents b55c773 + 8ad2fc3 commit 3bf3174

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

modules/statics/test/unit/tokenNamingConvention.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { erc20Coins } from '../../src/coins/erc20Coins';
2+
import { cosmosTokens } from '../../src/coins/cosmosTokens';
23
import { NetworkType } from '../../src/networks';
34

45
describe('Token Naming Convention Tests', function () {
5-
const allTokens = erc20Coins; //TODO: Include other token sources
6+
const allTokens = [...erc20Coins, ...cosmosTokens];
67

78
// Helper function to filter tokens by network type
89
function getTokensByNetworkType(networkType: NetworkType) {
@@ -197,8 +198,11 @@ describe('Token Naming Convention Tests', function () {
197198
if (testnetVersions.length > 0 && mainnetVersions.length > 0) {
198199
testnetVersions.forEach((testnetVersion: any) => {
199200
mainnetVersions.forEach((mainnetVersion: any) => {
200-
// Special case for ofcerc20 tokens which don't follow the pattern
201-
if (testnetVersion.networkPrefix === 'ofct' && mainnetVersion.networkPrefix === 'ofc') {
201+
// Special cases for tokens which don't follow the pattern
202+
if (
203+
(testnetVersion.networkPrefix === 'ofct' && mainnetVersion.networkPrefix === 'ofc') ||
204+
(testnetVersion.networkPrefix === 'thash' && mainnetVersion.networkPrefix === 'hash')
205+
) {
202206
return; // Skip the check for these special cases
203207
}
204208

0 commit comments

Comments
 (0)