Skip to content

Commit

Permalink
Remove pkh check in RemoteWallet constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
perekopskiy committed Feb 7, 2022
1 parent 867224a commit 612fb97
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion sdk/zksync.js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zksync",
"version": "0.12.0-alpha.3",
"version": "0.12.0-alpha.4",
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
15 changes: 0 additions & 15 deletions sdk/zksync.js/src/remote-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,6 @@ export class RemoteWallet extends AbstractWallet {
);
wallet.connect(provider);
await wallet.verifyNetworks();

// Before creating the account, we should check that the private key is indeed managed remotely.
try {
wallet.syncSignerPubKeyHash();
} catch (e) {
// TODO: Catching general error is a bad idea, as a lot of things can throw an exception.
// Generally we should catch a concrete error stating that such a method is not supported, and throw an
// exception only in that case. And, probably, have a retry mechanism, so we don't create the wallet if it
// was just a WalletConnect glitch.
throw new Error(
"There was an attempt to create a wallet that manages user keys remotely, \
but the server doesn't seem to have required capabilities"
);
}

return wallet;
}

Expand Down

0 comments on commit 612fb97

Please sign in to comment.