Fixed getEtherPrice for EtherscanProvider (#776).

This commit is contained in:
Richard Moore 2020-03-31 23:17:10 -04:00
parent 70cffb6a51
commit 6c71b51512
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

@ -290,7 +290,7 @@ export class EtherscanProvider extends BaseProvider{
if (this.network.name !== "homestead") { return 0.0; } if (this.network.name !== "homestead") { return 0.0; }
url += "/api?module=stats&action=ethprice"; url += "/api?module=stats&action=ethprice";
url += apiKey; url += apiKey;
return parseFloat(await get(url, getResult)); return parseFloat((await get(url, getResult)).ethusd);
default: default:
break; break;