Skip to content

Commit 1d27dad

Browse files
fix(payment-processor): load hinkal lib asyncronously (#1585)
1 parent ac63e08 commit 1d27dad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/payment-processor/src/payment/erc-20-private-payment-hinkal.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ import {
1818
validateRequest,
1919
} from './utils';
2020
import { IPreparedPrivateTransaction } from './prepared-transaction';
21-
2221
import type { IHinkal, RelayerTransaction } from '@hinkal/common';
23-
import { prepareEthersHinkal } from '@hinkal/common/providers/prepareEthersHinkal';
2422

2523
/**
2624
* 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<string, IHinkal> = {};
3937
export async function addToHinkalStore(signer: Signer): Promise<IHinkal> {
4038
const address = await signer.getAddress();
4139
if (!hinkalStore[address]) {
40+
const { prepareEthersHinkal } = await import('@hinkal/common/providers/prepareEthersHinkal');
4241
hinkalStore[address] = await prepareEthersHinkal(signer);
4342
}
4443
return hinkalStore[address];

0 commit comments

Comments
 (0)