@ -424,6 +424,18 @@ describe('Swaps Util', () => {
) . toBe ( true ) ;
) . toBe ( true ) ;
} ) ;
} ) ;
it ( 'returns true if swapping from ETH with uppercase chars to WETH' , ( ) => {
const ethAddressWithUpperCaseChars =
'0X0000000000000000000000000000000000000000' ;
expect (
shouldEnableDirectWrapping (
MAINNET _CHAIN _ID ,
ethAddressWithUpperCaseChars ,
WETH _CONTRACT _ADDRESS ,
) ,
) . toBe ( true ) ;
} ) ;
it ( 'returns true if swapping from WETH to ETH' , ( ) => {
it ( 'returns true if swapping from WETH to ETH' , ( ) => {
expect (
expect (
shouldEnableDirectWrapping (
shouldEnableDirectWrapping (
@ -434,6 +446,18 @@ describe('Swaps Util', () => {
) . toBe ( true ) ;
) . toBe ( true ) ;
} ) ;
} ) ;
it ( 'returns true if swapping from WETH with uppercase chars to ETH' , ( ) => {
const wethContractAddressWithUpperCaseChars =
'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2' ;
expect (
shouldEnableDirectWrapping (
MAINNET _CHAIN _ID ,
wethContractAddressWithUpperCaseChars ,
SWAPS _CHAINID _DEFAULT _TOKEN _MAP [ MAINNET _CHAIN _ID ] ? . address ,
) ,
) . toBe ( true ) ;
} ) ;
it ( 'returns false if swapping from ETH to a non-WETH token' , ( ) => {
it ( 'returns false if swapping from ETH to a non-WETH token' , ( ) => {
expect (
expect (
shouldEnableDirectWrapping (
shouldEnableDirectWrapping (