This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug that returned an empty swap router 02 address for base chain (
#120) * Updated code to correctly access addresses * add test to ensure no regression --------- Co-authored-by: jsy1218 <91580504+jsy1218@users.noreply.github.com>
- Loading branch information
1 parent
27d7888
commit 10d0ad0
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {SWAP_ROUTER_02_ADDRESSES} from "./addresses"; | ||
import {ChainId} from "./chains"; | ||
|
||
describe('addresses', () => { | ||
describe('swap router 02 addresses', () => { | ||
it('should return the correct address for base', () => { | ||
const address = SWAP_ROUTER_02_ADDRESSES(ChainId.BASE) | ||
expect(address).toEqual('0x2626664c2603336E57B271c5C0b26F421741e481') | ||
}); | ||
|
||
it('should return the correct address for base goerli', () => { | ||
const address = SWAP_ROUTER_02_ADDRESSES(ChainId.BASE_GOERLI) | ||
expect(address).toEqual('0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d') | ||
}); | ||
|
||
it('should return the correct address for avalanche', () => { | ||
const address = SWAP_ROUTER_02_ADDRESSES(ChainId.AVALANCHE) | ||
expect(address).toEqual('0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE') | ||
}); | ||
|
||
it('should return the correct address for BNB', () => { | ||
const address = SWAP_ROUTER_02_ADDRESSES(ChainId.BNB) | ||
expect(address).toEqual('0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2') | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters