diff --git a/.github/workflows/js-build.yml b/.github/workflows/js-build.yml index b2c2db39b..e083e91a0 100644 --- a/.github/workflows/js-build.yml +++ b/.github/workflows/js-build.yml @@ -26,21 +26,16 @@ jobs: - name: Typecheck run: pnpm run typecheck-all - # Run Anvil node in background for e2e tests - # - name: Anvil - # run: | - # anvil & - - name: Test run: anvil & pnpm run test-all - env: # Or as an environment variable + env: API_PUBLIC_KEY: ${{ secrets.API_PUBLIC_KEY }} API_PRIVATE_KEY: ${{ secrets.API_PRIVATE_KEY }} - BASE_URL: ${{ secrets.BASE_URL }} + BASE_URL: "https://api.turnkey.com" ORGANIZATION_ID: ${{ secrets.ORGANIZATION_ID }} PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }} EXPECTED_ETH_ADDRESS: ${{ secrets.EXPECTED_ETH_ADDRESS }} - BANNED_TO_ADDRESS: ${{ secrets.BANNED_TO_ADDRESS }} + BANNED_TO_ADDRESS: "0x6F72eDB2429820c2A0606a9FC3cA364f5E9b2375" - name: Prettier run: pnpm run prettier-all:check diff --git a/packages/viem/src/__tests__/index-test.ts b/packages/viem/src/__tests__/index-test.ts index 6fbaff4d3..48637a12d 100644 --- a/packages/viem/src/__tests__/index-test.ts +++ b/packages/viem/src/__tests__/index-test.ts @@ -253,36 +253,37 @@ describe("TurnkeyAccount", () => { expect(verified).toBeTruthy(); }); - describe("it signs walletconnect v1 payloads, bridged via EIP-1193", () => { - // https://docs.walletconnect.com/1.0/json-rpc-api-methods/ethereum - - testCase("Uniswap payload", async () => { - const payload: any = { - id: 1683062025301507, - jsonrpc: "2.0", - method: "eth_sendTransaction", - params: [ - { - gas: "0x2fe08", // See comment below - value: "0xf4240", - from: expectedEthAddress, // See comment below - to: "0x4648a43b2c14da09fdf82b161150d3f634f40491", - data: "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000006451840800000000000000000000000000000000000000000000000000000000000000020b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000677493600000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002bb4fbf271143f4fbf7b91a5ded31805e42b2208d6000bb81f9840a85d5af5bf1d1762f925bdaddc4201f984000000000000000000000000000000000000000000", - }, - ], - }; - - // Looks like here, too, we are subject to similar issues as described below: - // See https://github.com/ethers-io/ethers.js/issues/1683 - delete payload.params[0].gas; - // In a real-world scenario you should also verify that `from` matches the wallet's address - delete payload.params[0].from; - - // Anvil client seems to be able to host eip1193 requests just fine - const tx = await walletClient.request(payload); - expect(tx).toMatch(/^0x/); - }); - }); + // NOTE: disabling this test case for now until we can also test via React Native app + // describe("it signs walletconnect v1 payloads, bridged via EIP-1193", () => { + // // https://docs.walletconnect.com/1.0/json-rpc-api-methods/ethereum + + // testCase("Uniswap payload", async () => { + // const payload: any = { + // id: 1683062025301507, + // jsonrpc: "2.0", + // method: "eth_sendTransaction", + // params: [ + // { + // gas: "0x2fe08", // See comment below + // value: "0xf4240", + // from: expectedEthAddress, // See comment below + // to: "0x4648a43b2c14da09fdf82b161150d3f634f40491", + // data: "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000006451840800000000000000000000000000000000000000000000000000000000000000020b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000677493600000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002bb4fbf271143f4fbf7b91a5ded31805e42b2208d6000bb81f9840a85d5af5bf1d1762f925bdaddc4201f984000000000000000000000000000000000000000000", + // }, + // ], + // }; + + // // Looks like here, too, we are subject to similar issues as described below: + // // See https://github.com/ethers-io/ethers.js/issues/1683 + // delete payload.params[0].gas; + // // In a real-world scenario you should also verify that `from` matches the wallet's address + // delete payload.params[0].from; + + // // Anvil client seems to be able to host eip1193 requests just fine + // const tx = await walletClient.request(payload); + // expect(tx).toMatch(/^0x/); + // }); + // }); // Use `pnpm run compile:contracts` to update the ABI if needed testCase("ERC-721", async () => {