Skip to content

Commit

Permalink
Fixed resolveName when name is an address with an invalid checksum (#694
Browse files Browse the repository at this point in the history
).
  • Loading branch information
ricmoo committed Jan 8, 2020
1 parent a21c430 commit 1e72fc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/providers/src.ts/base-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,10 @@ export class BaseProvider extends Provider {
// If it is already an address, nothing to resolve
try {
return Promise.resolve(this.formatter.address(name));
} catch (error) { }
} catch (error) {
// If is is a hexstring, the address is bad (See #694)
if (isHexString(name)) { throw error; }
}

// Get the addr from the resovler
const resolverAddress = await this._getResolver(name);
Expand Down

0 comments on commit 1e72fc7

Please sign in to comment.