SharedStake / SharedStake-ui

SharedStake User Interface using vue.js
https://www.sharedstake.org/
GNU General Public License v3.0
15 stars 15 forks source link

Gas price fix #145 #168 + StakeGuage format #171

Closed mystic-mango closed 11 months ago

mystic-mango commented 11 months ago

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:

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 Screenshot 2023-07-25 at 00 27 17

Type of change

Testing

aws-amplify-us-east-2[bot] commented 11 months ago

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-171.df86yn386iuh7.amplifyapp.com

mystic-mango commented 11 months ago

New approach taken with improved API calls