|
1 | 1 | import { describe, expect, it, vi } from "vitest"; |
2 | 2 | import { TEST_CLIENT } from "~test/test-clients.js"; |
3 | | -import { TEST_ACCOUNT_A } from "~test/test-wallets.js"; |
4 | 3 | import { base } from "../../chains/chain-definitions/base.js"; |
5 | 4 | import { ethereum } from "../../chains/chain-definitions/ethereum.js"; |
6 | 5 | import { sepolia } from "../../chains/chain-definitions/sepolia.js"; |
7 | | -import { NATIVE_TOKEN_ADDRESS } from "../../constants/addresses.js"; |
| 6 | +import { |
| 7 | + NATIVE_TOKEN_ADDRESS, |
| 8 | + ZERO_ADDRESS, |
| 9 | +} from "../../constants/addresses.js"; |
8 | 10 | import { convertCryptoToFiat } from "./cryptoToFiat.js"; |
9 | 11 |
|
10 | 12 | describe.runIf(process.env.TW_SECRET_KEY)("Pay: crypto-to-fiat", () => { |
@@ -49,7 +51,7 @@ describe.runIf(process.env.TW_SECRET_KEY)("Pay: crypto-to-fiat", () => { |
49 | 51 | expect(data.result).toBe(0); |
50 | 52 | }); |
51 | 53 |
|
52 | | - it("should throw error for testnet chain (because testnets are not supported", async () => { |
| 54 | + it("should throw error for testnet chain (because testnets are not supported)", async () => { |
53 | 55 | await expect( |
54 | 56 | convertCryptoToFiat({ |
55 | 57 | chain: sepolia, |
@@ -81,13 +83,13 @@ describe.runIf(process.env.TW_SECRET_KEY)("Pay: crypto-to-fiat", () => { |
81 | 83 | await expect( |
82 | 84 | convertCryptoToFiat({ |
83 | 85 | chain: base, |
84 | | - fromTokenAddress: TEST_ACCOUNT_A.address, |
| 86 | + fromTokenAddress: ZERO_ADDRESS, |
85 | 87 | fromAmount: 1, |
86 | 88 | to: "USD", |
87 | 89 | client: TEST_CLIENT, |
88 | 90 | }), |
89 | 91 | ).rejects.toThrowError( |
90 | | - `Error: ${TEST_ACCOUNT_A.address} on chainId: ${base.id} is not a valid contract address.`, |
| 92 | + `Error: ${ZERO_ADDRESS} on chainId: ${base.id} is not a valid contract address.`, |
91 | 93 | ); |
92 | 94 | }); |
93 | 95 | it("should throw if response is not OK", async () => { |
|
0 commit comments