Hardcoded gas fee has been replaced with the web3.js getGasPrice call (doc).
Breakdown of multiplies for gas fees and values of priority fee:
low: lowGasPrice, // Here we're assuming low is 80% of the current gas price but a min of 2100wei.
medium: gasPriceInGwei,
high: gasPriceInGwei * 1.2, // Here we're assuming high is 120% of the current gas price.
tip: {
low: 1, // Adjust these priority fees as you see fit.
medium: 2,
high: 5,
},
The Infura API key has also been exported from the onboard.js file and imported into the common.js where the web3 instance is initiated.
Some error handling was also added.
Fixes #145 #168
Stakeguage slid in with a commit too, fixed some formatting
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
Testing
[x] Printing gas + tip to console
Note: debugging has been removed for prod.
[ ] Unable to confirm with transaction ... I don't have any tokens to test with... yet
Description
Modified:
Hardcoded gas fee has been replaced with the web3.js getGasPrice call (doc).
Breakdown of multiplies for gas fees and values of priority fee:
The Infura API key has also been exported from the onboard.js file and imported into the common.js where the web3 instance is initiated.
Some error handling was also added.
Fixes #145 #168
Stakeguage slid in with a commit too, fixed some formatting![Screenshot 2023-07-25 at 00 27 17](https://github.com/SharedStake/SharedStake-ui/assets/52243165/13cd953d-97a2-427b-8a36-5402a9c6180f)
Type of change
Testing
[x] Printing gas + tip to console Note: debugging has been removed for prod.![image](https://github.com/SharedStake/SharedStake-ui/assets/52243165/d0e8f231-2139-40ce-99ce-0b8ec8bf497c)
[ ] Unable to confirm with transaction ... I don't have any tokens to test with... yet