Skip to content

Commit 3d9284f

Browse files
committed
Fix getting spender
1 parent f6c0239 commit 3d9284f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/chains/ethereum/ethereum.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import { OpenoceanConfig } from '../../connectors/openocean/openocean.config';
1717
import { Curve } from '../../connectors/curve/curve';
1818
import { CarbonConfig } from '../../connectors/carbon/carbon.config';
1919
import { BalancerConfig } from '../../connectors/balancer/balancer.config';
20+
import { ShibaswapConfig } from '../../connectors/shibaswap/shibaswap.config';
21+
import { ChewyswapConfig } from '../../connectors/chewyswap/chewyswap.config';
2022

2123
// MKR does not match the ERC20 perfectly so we need to use a separate ABI.
2224
const MKR_ADDRESS = '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2';
@@ -191,8 +193,13 @@ export class Ethereum extends EthereumBase implements Ethereumish {
191193
spender = PancakeSwapConfig.config.pancakeswapV3NftManagerAddress(
192194
this._chain,
193195
);
194-
} else if (['shibaswap', 'chewyswap'].includes(reqSpender)) {
195-
spender = SushiswapConfig.config.sushiswapRouterAddress(
196+
} else if (reqSpender === 'shibaswap') {
197+
spender = ShibaswapConfig.config.routerAddress(
198+
this.chainName,
199+
this._chain,
200+
);
201+
} else if (reqSpender === 'chewyswap') {
202+
spender = ChewyswapConfig.config.routerAddress(
196203
this.chainName,
197204
this._chain,
198205
);

0 commit comments

Comments
 (0)