diff --git a/packages/x-client/src/utils/stark/legacy/crypto/constants.ts b/packages/x-client/src/utils/stark/legacy/crypto/constants.ts index 6e4af9117f..466c15bc7b 100644 --- a/packages/x-client/src/utils/stark/legacy/crypto/constants.ts +++ b/packages/x-client/src/utils/stark/legacy/crypto/constants.ts @@ -26,9 +26,12 @@ const order = new BN( 16, ); +// eslint-disable-next-line @typescript-eslint/naming-convention +const { PresetCurve }: typeof elliptic.curves = elliptic.curves; + // eslint-disable-next-line new-cap const starkEc = new elliptic.ec( - new elliptic.curves.PresetCurve({ + new PresetCurve({ type: 'short', prime: null, p: prime as any, diff --git a/packages/x-client/src/utils/stark/starkCurve.ts b/packages/x-client/src/utils/stark/starkCurve.ts index a977dec789..b678a3a3dd 100644 --- a/packages/x-client/src/utils/stark/starkCurve.ts +++ b/packages/x-client/src/utils/stark/starkCurve.ts @@ -41,9 +41,12 @@ export const starkEcOrder = new BN( 16, ); +// eslint-disable-next-line @typescript-eslint/naming-convention +const { PresetCurve }: typeof elliptic.curves = elliptic.curves; + // eslint-disable-next-line new-cap export const starkEc = new elliptic.ec( - new elliptic.curves.PresetCurve({ + new PresetCurve({ type: 'short', prime: null, p: '08000000 00000011 00000000 00000000 00000000 00000000 00000000 00000001',