Skip to content

Commit 381d706

Browse files
authored
chore: fix celo e2e test for v4 (#1266)
1 parent 76b119f commit 381d706

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

test/mocha/e2e/quote.test.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
22
import { AllowanceTransfer, PERMIT2_ADDRESS, PermitSingle } from '@uniswap/permit2-sdk'
3-
import { ChainId, Currency, CurrencyAmount, Ether, Fraction, Rounding, Token, WETH9 } from '@uniswap/sdk-core'
3+
import {
4+
ChainId,
5+
Currency,
6+
CurrencyAmount,
7+
Ether,
8+
Fraction,
9+
NativeCurrencyName,
10+
Rounding,
11+
Token,
12+
WETH9,
13+
} from '@uniswap/sdk-core'
414
import {
515
CEUR_CELO,
616
CEUR_CELO_ALFAJORES,
@@ -3651,8 +3661,14 @@ describe('quote', function () {
36513661
: erc2
36523662
const amount = chain === ChainId.SEPOLIA ? (type === 'exactIn' ? '0.00000000000001' : '0.000001') : '0.1'
36533663

3664+
// CELO uses a different address for native token, and since we now support v4 we need to make this change in the test.
3665+
let tokenInAddress: NativeCurrencyName | string = native
3666+
if (chain === ChainId.CELO) {
3667+
tokenInAddress = '0x471EcE3750Da237f93B8E339c536989b8978a438'
3668+
}
3669+
36543670
const quoteReq: QuoteQueryParams = {
3655-
tokenInAddress: native,
3671+
tokenInAddress: tokenInAddress,
36563672
tokenInChainId: chain,
36573673
tokenOutAddress: tokenOut.address,
36583674
tokenOutChainId: chain,

0 commit comments

Comments
 (0)