Skip to content

Commit

Permalink
Fixed getSigner bug (ethers-io#3821).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo authored and Woodpile37 committed Jan 14, 2024
1 parent 18e117f commit 9ba59af
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 9ba59af

Please sign in to comment.