Skip to content

Commit f1a14d7

Browse files
committed
fix(contracts-sdk): claimAndMint(...) missing stakingContractAddress argument
1 parent 6fb9791 commit f1a14d7

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

packages/contracts-sdk/src/lib/contracts-sdk.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,13 +2021,23 @@ https://developer.litprotocol.com/v3/sdk/wallets/auth-methods/#auth-method-scope
20212021
claimAndMint: async (
20222022
derivedKeyId: BytesLike,
20232023
signatures: IPubkeyRouter.SignatureStruct[],
2024-
txOpts: ethers.CallOverrides = {}
2024+
txOpts: ethers.CallOverrides = {},
2025+
stakingContractAddress?: string
20252026
) => {
2027+
2028+
let params = [2, derivedKeyId, signatures];
2029+
2030+
if (stakingContractAddress) {
2031+
params.push(stakingContractAddress);
2032+
}
2033+
20262034
try {
20272035
const tx = await this._callWithAdjustedOverrides(
20282036
this.pkpNftContract.write,
20292037
'claimAndMint',
2030-
[2, derivedKeyId, signatures],
2038+
// @ts-ignore - upcoming refactor will include inferred types from the ABIs instead of using the generated types, which in this case are incorrect/out-of-date
2039+
// Thanks zach-is-my-name for reporting this issue :)
2040+
params,
20312041
{
20322042
...txOpts,
20332043
value:

0 commit comments

Comments
 (0)