From 3a231c64c2c845d1a00ab9117fe8ef845f31bfb0 Mon Sep 17 00:00:00 2001 From: Sebastian Pape <0xneo11@gmail.com> Date: Thu, 7 Nov 2024 11:37:24 +0100 Subject: [PATCH] fix worldcoin tests --- package.json | 1 + test/worldchain/pay_to_contract_receiver.spec.ts | 6 +++--- .../pay_with_exchange_conversion.spec.ts | 6 +++--- yarn.lock | 14 ++++++++++++++ 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index e98dd29..3594b88 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@types/mocha": "^5.2.7", "@types/sinon-chai": "^3.2.9", "chai": "^4.2.0", + "cross-fetch": "^3.1.5", "decimal.js": "^10.2.1", "dotenv": "^16.3.0", "ethereum-waffle": "^3.0.2", diff --git a/test/worldchain/pay_to_contract_receiver.spec.ts b/test/worldchain/pay_to_contract_receiver.spec.ts index 7bcebd5..8aafa76 100644 --- a/test/worldchain/pay_to_contract_receiver.spec.ts +++ b/test/worldchain/pay_to_contract_receiver.spec.ts @@ -2,8 +2,8 @@ import payToContractReceiver from '../_pay-to-contract-receiver' payToContractReceiver({ blockchain: 'worldchain', - fromToken: '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1', // USDCe - fromAccount: '0xDc927Bd56CF9DfC2e3779C7E3D6d28dA1C219969', // needs to hold enough fromToken, will be impersonated - toToken: '0x2cFc85d8E48F8EAB294be644d9E25C3030863003', // WDL + fromToken: '0x2cFc85d8E48F8EAB294be644d9E25C3030863003', + fromAccount: '0x3b9Ce4B73fB57181194d83EC44544c0ccc77319a', // needs to hold enough fromToken, will be impersonated + toToken: '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1', exchange: { name: 'uniswap_v3', type: 'pull' }, }) diff --git a/test/worldchain/pay_with_exchange_conversion.spec.ts b/test/worldchain/pay_with_exchange_conversion.spec.ts index d3abf16..5f00317 100644 --- a/test/worldchain/pay_with_exchange_conversion.spec.ts +++ b/test/worldchain/pay_with_exchange_conversion.spec.ts @@ -2,9 +2,9 @@ import payWithExchangeConversion from '../_pay-with-exchange-conversion' payWithExchangeConversion({ blockchain: 'worldchain', - fromToken: '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1', // USDCe - fromAccount: '0xDc927Bd56CF9DfC2e3779C7E3D6d28dA1C219969', // needs to hold enough fromToken, will be impersonated - toToken: '0x2cFc85d8E48F8EAB294be644d9E25C3030863003', // WDL + fromToken: '0x2cFc85d8E48F8EAB294be644d9E25C3030863003', + fromAccount: '0x3b9Ce4B73fB57181194d83EC44544c0ccc77319a', // needs to hold enough fromToken, will be impersonated + toToken: '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1', exchanges: [ { name: 'uniswap_v3', type: 'pull' }, ] diff --git a/yarn.lock b/yarn.lock index 50cf57c..fa3919f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3305,6 +3305,13 @@ cross-fetch@^2.1.0, cross-fetch@^2.1.1: node-fetch "^2.6.7" whatwg-fetch "^2.0.4" +cross-fetch@^3.1.5: + version "3.1.8" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" + integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== + dependencies: + node-fetch "^2.6.12" + cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -6803,6 +6810,13 @@ node-fetch@^2.6.1, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" +node-fetch@^2.6.12: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + node-fetch@~1.7.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"