From b86aa7980bb9ca85fa415be4d427c384aa8da90c Mon Sep 17 00:00:00 2001 From: Alexandre ABRIOUX Date: Thu, 13 Mar 2025 10:26:25 +0100 Subject: [PATCH 1/2] fix(payment-processor): load hinkal lib asyncronously --- package.json | 3 ++- .../src/payment/erc-20-private-payment-hinkal.ts | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a1cf43326..cd3431cb5 100644 --- a/package.json +++ b/package.json @@ -69,5 +69,6 @@ "semver": "https://github.com/RequestNetwork/requestNetwork/security/dependabot/197", "json-schema": "https://github.com/RequestNetwork/requestNetwork/security/dependabot/51", "json5": "https://github.com/RequestNetwork/requestNetwork/security/dependabot/165" - } + }, + "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72" } diff --git a/packages/payment-processor/src/payment/erc-20-private-payment-hinkal.ts b/packages/payment-processor/src/payment/erc-20-private-payment-hinkal.ts index fa88e647e..97fd1ae81 100644 --- a/packages/payment-processor/src/payment/erc-20-private-payment-hinkal.ts +++ b/packages/payment-processor/src/payment/erc-20-private-payment-hinkal.ts @@ -18,9 +18,7 @@ import { validateRequest, } from './utils'; import { IPreparedPrivateTransaction } from './prepared-transaction'; - import type { IHinkal, RelayerTransaction } from '@hinkal/common'; -import { prepareEthersHinkal } from '@hinkal/common/providers/prepareEthersHinkal'; /** * This is a globally accessible state variable exported for use in other parts of the application or tests. @@ -39,6 +37,7 @@ export const hinkalStore: Record = {}; export async function addToHinkalStore(signer: Signer): Promise { const address = await signer.getAddress(); if (!hinkalStore[address]) { + const { prepareEthersHinkal } = await import('@hinkal/common/providers/prepareEthersHinkal'); hinkalStore[address] = await prepareEthersHinkal(signer); } return hinkalStore[address]; From 156c78e449150997e5e1c5e0eb37d7c1d9db4c06 Mon Sep 17 00:00:00 2001 From: Alexandre ABRIOUX Date: Thu, 13 Mar 2025 10:27:44 +0100 Subject: [PATCH 2/2] undo package.json change --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index cd3431cb5..a1cf43326 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,5 @@ "semver": "https://github.com/RequestNetwork/requestNetwork/security/dependabot/197", "json-schema": "https://github.com/RequestNetwork/requestNetwork/security/dependabot/51", "json5": "https://github.com/RequestNetwork/requestNetwork/security/dependabot/165" - }, - "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72" + } }