Skip to content
Merged
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
14 changes: 7 additions & 7 deletions packages/contracts-sdk/src/lib/contracts-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export class LitContracts {
(!this.privateKey && this.randomPrivateKey) ||
this.options?.storeOrUseStorageKey
) {
console.warn('THIS.SIGNER:', this.signer);
this.log('THIS.SIGNER:', this.signer);

const STORAGE_KEY = 'lit-contracts-sdk-private-key';

Expand Down Expand Up @@ -384,7 +384,7 @@ export class LitContracts {

// -- (OPTION) store private key in local storage
if (this.options?.storeOrUseStorageKey) {
console.warn(
this.log(
"You've set the option to store your private key in local storage."
);
localStorage.setItem(STORAGE_KEY, storagePrivateKey);
Expand Down Expand Up @@ -1261,13 +1261,13 @@ https://developer.litprotocol.com/v3/sdk/wallets/auth-methods/#auth-method-scope
}

const tokenId = events[0].topics[1];
console.warn('tokenId:', tokenId);
this.log('tokenId:', tokenId);
let tries = 0;
const maxAttempts = 10;
let publicKey = '';
while (tries < maxAttempts) {
publicKey = await this.pkpNftContract.read.getPubkey(tokenId);
console.log('pkp pub key: ', publicKey);
this.log('pkp pub key: ', publicKey);
if (publicKey !== '0x') {
break;
}
Expand Down Expand Up @@ -1798,15 +1798,15 @@ https://developer.litprotocol.com/v3/sdk/wallets/auth-methods/#auth-method-scope
const events = 'events' in res ? res.events : res.logs;

const tokenIdFromEvent = events[0].topics[1];
console.warn('tokenIdFromEvent:', tokenIdFromEvent);
this.log('tokenIdFromEvent:', tokenIdFromEvent);
let tries = 0;
const maxAttempts = 10;
let publicKey = '';
while (tries < maxAttempts) {
publicKey = await this.pkpNftContract.read.getPubkey(
tokenIdFromEvent
);
console.log('pkp pub key: ', publicKey);
this.log('pkp pub key: ', publicKey);
if (publicKey !== '0x') {
break;
}
Expand All @@ -1816,7 +1816,7 @@ https://developer.litprotocol.com/v3/sdk/wallets/auth-methods/#auth-method-scope
});
}

console.warn('public key from token id', publicKey);
this.log('public key from token id', publicKey);
if (publicKey.startsWith('0x')) {
publicKey = publicKey.slice(2);
}
Expand Down
Loading