Set correct is signing key
@@ -874,7 +874,7 @@ export class Wallet {
return submitSignedTransaction(signedWithdrawTransaction, this.provider, withdraw.fastProcessing);
}
- async isSigningKeySet(): Promise<boolean> {
+ async isCorrectSigningKeySet(): Promise<boolean> {
if (!this.signer) {
throw new Error('ZKSync signer is required for current pubkey calculation.');
}
@@ -883,6 +883,15 @@ export class Wallet {
return currentPubKeyHash === signerPubKeyHash;
}
+ async isSigningKeySet(): Promise<boolean> {
+ if (!this.signer) {
+ throw new Error('ZKSync signer is required for current pubkey calculation.');
+ }
+ const currentPubKeyHash = await this.getCurrentPubKeyHash();
+ const zeroPubKeyHash = 'sync:0000000000000000000000000000000000000000';
+ return zeroPubKeyHash !== currentPubKeyHash;
+ }
+
async getChangePubKey(changePubKey: {
feeToken: TokenLike;
fee: BigNumberish;
