Skip to content

Commit

Permalink
Merge pull request #17 from ParadigmFoundation/fix/gas-price
Browse files Browse the repository at this point in the history
Fix broken gas price API request
  • Loading branch information
Henry Harder authored Sep 23, 2019
2 parents 17a6329 + d406325 commit 875314a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zaidan-dealer-client",
"version": "0.3.8",
"version": "0.3.9",
"main": "dist/index.js",
"repository": "https://github.com/ParadigmFoundation/zaidan-dealer-client",
"license": "MIT",
Expand Down Expand Up @@ -66,4 +66,4 @@
"publishConfig": {
"access": "public"
}
}
}
4 changes: 2 additions & 2 deletions src/DealerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ export class DealerClient {

private async _getGasPrice(priority: GasPriority): Promise<BigNumber> {
const gasPriceApi = "https://www.etherchain.org/api/gasPriceOracle";
const prices = await this._callAny(gasPriceApi, "GET");
return new BigNumber(prices[priority]);
const prices = await axios(gasPriceApi);
return new BigNumber(prices.data[priority]);
}

private async _loadAssets(): Promise<any> {
Expand Down

0 comments on commit 875314a

Please sign in to comment.