Skip to content

Commit 8ad2fc3

Browse files
committed
test: token naming convention for cosmos tokens
Ticket: [COIN-5281]
1 parent ed0b391 commit 8ad2fc3

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) {
@@ -196,8 +197,11 @@ describe('Token Naming Convention Tests', function () {
196197
if (testnetVersions.length > 0 && mainnetVersions.length > 0) {
197198
testnetVersions.forEach((testnetVersion: any) => {
198199
mainnetVersions.forEach((mainnetVersion: any) => {
199-
// Special case for ofcerc20 tokens which don't follow the pattern
200-
if (testnetVersion.networkPrefix === 'ofct' && mainnetVersion.networkPrefix === 'ofc') {
200+
// Special cases for tokens which don't follow the pattern
201+
if (
202+
(testnetVersion.networkPrefix === 'ofct' && mainnetVersion.networkPrefix === 'ofc') ||
203+
(testnetVersion.networkPrefix === 'thash' && mainnetVersion.networkPrefix === 'hash')
204+
) {
201205
return; // Skip the check for these special cases
202206
}
203207

0 commit comments

Comments
 (0)