Skip to content

Commit

Permalink
Add gasPrice to Polygon feeData for type 0 and type 1 legacy transact…
Browse files Browse the repository at this point in the history
…ions (ethers-io#4315).
  • Loading branch information
ricmoo authored and Woodpile37 committed Jan 14, 2024
1 parent 6d355e4 commit b0e6c31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src.ts/providers/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,13 @@ function getGasStationPlugin(url: string) {

let response;
try {
response = await request.send();
const [ _response, _feeData ] = await Promise.all([
request.send(), fetchFeeData()
]);
response = _response;
const payload = response.bodyJson.standard;
const feeData = {
gasPrice: _feeData.gasPrice,
maxFeePerGas: parseUnits(payload.maxFee, 9),
maxPriorityFeePerGas: parseUnits(payload.maxPriorityFee, 9),
};
Expand Down

0 comments on commit b0e6c31

Please sign in to comment.