From be9e9db89ac670a534bb4f48f93f8824d9466b01 Mon Sep 17 00:00:00 2001 From: Dan Oved Date: Wed, 29 Nov 2023 14:18:33 -0800 Subject: [PATCH] lint fix --- .../protocol-sdk/src/premint/premint-client.ts | 14 +++++++++++--- packages/protocol-sdk/src/premint/preminter.ts | 13 ++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/packages/protocol-sdk/src/premint/premint-client.ts b/packages/protocol-sdk/src/premint/premint-client.ts index 66848c478..60361b23c 100644 --- a/packages/protocol-sdk/src/premint/premint-client.ts +++ b/packages/protocol-sdk/src/premint/premint-client.ts @@ -530,7 +530,7 @@ class PremintClient { isValid: boolean; recoveredSigner: Address | undefined; }> { - const {isAuthorized, recoveredAddress }= await isValidSignature({ + const { isAuthorized, recoveredAddress } = await isValidSignature({ chainId: this.chain.id, signature: data.signature as Hex, premintConfig: convertPremintV1(data.premint), @@ -599,7 +599,12 @@ class PremintClient { quantityToMint: number; mintComment?: string; }; - }): Promise> { + }): Promise< + SimulateContractParameters< + typeof zoraCreator1155PremintExecutorImplABI, + "premint" + > + > { if (mintArguments && mintArguments?.quantityToMint < 1) { throw new Error("Quantity to mint cannot be below 1"); } @@ -626,7 +631,10 @@ class PremintClient { value, address: getPremintExecutorAddress(), args, - } satisfies SimulateContractParameters; + } satisfies SimulateContractParameters< + typeof zoraCreator1155PremintExecutorImplABI, + "premint" + >; return request; } diff --git a/packages/protocol-sdk/src/premint/preminter.ts b/packages/protocol-sdk/src/premint/preminter.ts index b1fa331df..3cfbd272d 100644 --- a/packages/protocol-sdk/src/premint/preminter.ts +++ b/packages/protocol-sdk/src/premint/preminter.ts @@ -200,11 +200,7 @@ export async function isAuthorizedToCreatePremint({ abi: preminterAbi, address: getPremintExecutorAddress(), functionName: "isAuthorizedToCreatePremint", - args: [ - signer, - collection.contractAdmin, - collectionAddress - ], + args: [signer, collection.contractAdmin, collectionAddress], }); } @@ -257,7 +253,10 @@ export async function isValidSignature({ chainId: number; publicClient: PublicClient; } & PremintConfigAndVersion): Promise { - const tokenContract = await getPremintCollectionAddress({ collection, publicClient }); + const tokenContract = await getPremintCollectionAddress({ + collection, + publicClient, + }); const recoveredAddress = await tryRecoverPremintSigner({ ...premintConfigAndVersion, signature, @@ -277,7 +276,7 @@ export async function isValidSignature({ collectionAddress: tokenContract, publicClient, signature, - ...premintConfigAndVersion + ...premintConfigAndVersion, }); return {