2
0
mirror of synced 2025-02-24 03:58:06 +00:00

Fixed resolveName when name is an address with an invalid checksum (#694).

This commit is contained in:
Richard Moore 2020-01-07 19:41:43 -05:00
parent a21c430c7a
commit 1e72fc7d6f
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

View File

@ -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);