Skip to content

Commit

Permalink
destructure is valid sig args
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Nov 29, 2023
1 parent 99347e9 commit 028c3aa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/protocol-sdk/src/premint/premint-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,16 +525,20 @@ class PremintClient {
* @param data Signature data from the API
* @returns isValid = signature is valid or not, recoveredSigner = signer from contract
*/
async isValidSignature(data: PremintSignatureResponse): Promise<{
async isValidSignature({
signature,
premint,
collection,
}: PremintSignatureResponse): Promise<{
isValid: boolean;
recoveredSigner: Address | undefined;
}> {
const { isAuthorized, recoveredAddress } = await isValidSignature({
chainId: this.chain.id,
signature: data.signature as Hex,
premintConfig: convertPremintV1(data.premint),
signature: signature as Hex,
premintConfig: convertPremintV1(premint),
premintConfigVersion: PremintConfigVersion.V1,
collection: convertCollection(data.collection),
collection: convertCollection(collection),
publicClient: this.publicClient,
});

Expand Down

0 comments on commit 028c3aa

Please sign in to comment.