From 270b275264ecee25c1aaf18440b7b64cad02ca6b Mon Sep 17 00:00:00 2001 From: Eric Zhong Date: Mon, 6 Nov 2023 14:48:41 -0500 Subject: [PATCH] fix: use staticJsonRpcProvider (#333) change all json rpc provider to static rpc provider --- lib/handlers/check-order-status/injector.ts | 4 ++-- lib/handlers/post-order/injector.ts | 2 +- test/integ/order.test.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/handlers/check-order-status/injector.ts b/lib/handlers/check-order-status/injector.ts index 2f78753c..7ed73252 100644 --- a/lib/handlers/check-order-status/injector.ts +++ b/lib/handlers/check-order-status/injector.ts @@ -16,7 +16,7 @@ export interface RequestInjected extends BaseRInj { orderStatus: string getFillLogAttempts: number retryCount: number - provider: ethers.providers.JsonRpcProvider + provider: ethers.providers.StaticJsonRpcProvider orderWatcher: EventWatcher orderQuoter: OrderValidator } @@ -47,7 +47,7 @@ export class CheckOrderStatusInjector extends SfnInjector { jest.retryTimes(2) let alice: Wallet let filler: Wallet - let provider: ethers.providers.JsonRpcProvider + let provider: ethers.providers.StaticJsonRpcProvider let aliceAddress: string let nonce: BigNumber let URL: string @@ -69,7 +69,7 @@ describe('/dutch-auction/order', () => { } URL = process.env.UNISWAPX_SERVICE_URL - provider = new ethers.providers.JsonRpcProvider(process.env.RPC_5) + provider = new ethers.providers.StaticJsonRpcProvider(process.env.RPC_5) alice = new ethers.Wallet(process.env.TEST_WALLET_PK).connect(provider) filler = new ethers.Wallet(process.env.TEST_FILLER_PK).connect(provider) aliceAddress = (await alice.getAddress()).toLowerCase()