Skip to content

Commit

Permalink
Fixed getSigner bug (#3821).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Feb 23, 2023
1 parent 3a0d868 commit 388edf6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src.ts/providers/provider-jsonrpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export class JsonRpcSigner extends AbstractSigner<JsonRpcApiProvider> {

constructor(provider: JsonRpcApiProvider, address: string) {
super(provider);
address = getAddress(address);
defineProperties<JsonRpcSigner>(this, { address });
}

Expand Down Expand Up @@ -932,8 +933,8 @@ export abstract class JsonRpcApiProvider extends AbstractProvider {
// Account address
address = getAddress(address);
for (const account of accounts) {
if (getAddress(account) === account) {
return new JsonRpcSigner(this, account);
if (getAddress(account) === address) {
return new JsonRpcSigner(this, address);
}
}

Expand Down

0 comments on commit 388edf6

Please sign in to comment.