Skip to content

Commit

Permalink
fix: param optionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansonhkg committed Jul 2, 2024
1 parent 7450f8b commit a6e145d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/contracts-sdk/src/lib/contracts-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@ https://developer.litprotocol.com/v3/sdk/wallets/auth-methods/#auth-method-scope
},
},
write: {
mint: async ({ gasLimit }: GasLimitParam) => {
mint: async (param?: GasLimitParam) => {
if (!this.connected) {
throw new Error(
'Contracts are not connected. Please call connect() first'
Expand Down Expand Up @@ -1650,7 +1650,7 @@ https://developer.litprotocol.com/v3/sdk/wallets/auth-methods/#auth-method-scope
const tx =
await this.pkpNftContract.write.populateTransaction.mintNext(2, {
value: mintCost,
gasLimit: gasLimit || GAS_LIMIT,
gasLimit: param?.gasLimit || GAS_LIMIT,
});
this.log('tx:', tx);

Expand All @@ -1665,7 +1665,7 @@ https://developer.litprotocol.com/v3/sdk/wallets/auth-methods/#auth-method-scope
} else {
sentTx = await this.pkpNftContract.write.mintNext(2, {
value: mintCost,
gasLimit: gasLimit || GAS_LIMIT,
gasLimit: param?.gasLimit || GAS_LIMIT,
});
}

Expand Down

0 comments on commit a6e145d

Please sign in to comment.