Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(contracts-sdk): claimAndMint(...) missing stakingContractAddress … #765

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ jobs:
node-version: '20'
cache: 'yarn'
- name: Install rust
uses: dtolnay/[email protected]
uses: actions-rs/toolchain@v1
with:
toolchain: 1.83.0
override: true
components: rust-std
- uses: jetli/[email protected]
with:
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
Expand Down
13 changes: 11 additions & 2 deletions packages/contracts-sdk/src/lib/contracts-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2021,13 +2021,22 @@ https://developer.litprotocol.com/v3/sdk/wallets/auth-methods/#auth-method-scope
claimAndMint: async (
derivedKeyId: BytesLike,
signatures: IPubkeyRouter.SignatureStruct[],
txOpts: ethers.CallOverrides = {}
txOpts: ethers.CallOverrides = {},
stakingContractAddress?: string
) => {
let params = [2, derivedKeyId, signatures];

if (stakingContractAddress) {
params.push(stakingContractAddress);
}

try {
const tx = await this._callWithAdjustedOverrides(
this.pkpNftContract.write,
'claimAndMint',
[2, derivedKeyId, signatures],
// @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
// Thanks zach-is-my-name for reporting this issue :)
params,
{
...txOpts,
value:
Expand Down
Loading