File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -2029,4 +2029,41 @@ describe('#getConnectedSitesList', () => {
2029
2029
expect ( selectors . getSelectedEvmInternalAccount ( state ) ) . toBe ( undefined ) ;
2030
2030
} ) ;
2031
2031
} ) ;
2032
+
2033
+ describe ( 'getSwapsDefaultToken' , ( ) => {
2034
+ it ( 'returns the token object for the current chainId when no overrideChainId is provided' , ( ) => {
2035
+ const expectedToken = {
2036
+ symbol : 'ETH' ,
2037
+ name : 'Ether' ,
2038
+ address : '0x0000000000000000000000000000000000000000' ,
2039
+ decimals : 18 ,
2040
+ balance : '966987986469506564059' ,
2041
+ string : '966.988' ,
2042
+ iconUrl : './images/black-eth-logo.svg' ,
2043
+ } ;
2044
+
2045
+ const result = selectors . getSwapsDefaultToken ( mockState ) ;
2046
+
2047
+ expect ( result ) . toStrictEqual ( expectedToken ) ;
2048
+ } ) ;
2049
+
2050
+ it ( 'returns the token object for the overridden chainId when overrideChainId is provided' , ( ) => {
2051
+ const expectedToken = {
2052
+ symbol : 'POL' ,
2053
+ name : 'Polygon' ,
2054
+ address : '0x0000000000000000000000000000000000000000' ,
2055
+ decimals : 18 ,
2056
+ balance : '966987986469506564059' ,
2057
+ string : '966.988' ,
2058
+ iconUrl : './images/pol-token.svg' ,
2059
+ } ;
2060
+
2061
+ const result = selectors . getSwapsDefaultToken (
2062
+ mockState ,
2063
+ CHAIN_IDS . POLYGON ,
2064
+ ) ;
2065
+
2066
+ expect ( result ) . toStrictEqual ( expectedToken ) ;
2067
+ } ) ;
2068
+ } ) ;
2032
2069
} ) ;
You can’t perform that action at this time.
0 commit comments