Skip to content

Commit 851ba18

Browse files
authored
Convert wei to gwei in Optimism gas fetcher (#98)
1 parent 740fb5f commit 851ba18

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "set.js",
3-
"version": "0.4.6",
3+
"version": "0.4.7",
44
"description": "A javascript library for interacting with the Set Protocol v2",
55
"keywords": [
66
"set.js",

src/api/utils/gasOracle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class GasOracleService {
7979
private async getOptimismGasPrice(): Promise<number> {
8080
const url = 'https://api-optimistic.etherscan.io/api?module=proxy&action=eth_gasPrice';
8181
const data = (await axios.get(url)).data;
82-
const price = Number(data.result);
82+
const price = Number(data.result) / 1000000000; // wei to gwei
8383

8484
return price;
8585
}

0 commit comments

Comments
 (0)