@@ -3,10 +3,11 @@ import { cosmosTokens } from '../../src/coins/cosmosTokens';
33import { avaxTokens } from '../../src/coins/avaxTokens' ;
44import { bscTokens } from '../../src/coins/bscTokens' ;
55import { nep141Tokens } from '../../src/coins/nep141Tokens' ;
6+ import { polygonTokens } from '../../src/coins/polygonTokens' ;
67import { NetworkType } from '../../src/networks' ;
78
89describe ( 'Token Naming Convention Tests' , function ( ) {
9- const allTokens = [ ...erc20Coins , ...cosmosTokens , ...avaxTokens , ...bscTokens , ...nep141Tokens ] ;
10+ const allTokens = [ ...erc20Coins , ...cosmosTokens , ...avaxTokens , ...bscTokens , ...nep141Tokens , ... polygonTokens ] ;
1011
1112 // Helper function to filter tokens by network type
1213 function getTokensByNetworkType ( networkType : NetworkType ) {
@@ -209,7 +210,8 @@ describe('Token Naming Convention Tests', function () {
209210 // Special cases for tokens which don't follow the pattern
210211 if (
211212 ( testnetVersion . networkPrefix === 'ofct' && mainnetVersion . networkPrefix === 'ofc' ) ||
212- ( testnetVersion . networkPrefix === 'thash' && mainnetVersion . networkPrefix === 'hash' )
213+ ( testnetVersion . networkPrefix === 'thash' && mainnetVersion . networkPrefix === 'hash' ) ||
214+ ( testnetVersion . networkPrefix === 'tpolygon' && mainnetVersion . networkPrefix === 'polygon' )
213215 ) {
214216 return ; // Skip the check for these special cases
215217 }
@@ -319,8 +321,15 @@ describe('Token Naming Convention Tests', function () {
319321 } ) ;
320322
321323 it ( 'should ensure all token names are lowercase' , function ( ) {
324+ // List of tokens that are exceptions to the lowercase rule
325+ const lowercaseExceptions : string [ ] = [ 'tpolygon:BitGoTest' ] ;
326+
322327 allTokens . forEach ( ( token ) => {
323328 const tokenName = token . name ;
329+ // Skip known exceptions
330+ if ( lowercaseExceptions . includes ( tokenName ) ) {
331+ return ;
332+ }
324333 tokenName . should . equal ( tokenName . toLowerCase ( ) , `Token "${ tokenName } " should be lowercase` ) ;
325334 } ) ;
326335 } ) ;
0 commit comments