Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-1868 Save gas price sources to the database and use when estimatin… #1880

Merged

Conversation

DmitryBespalov
Copy link
Contributor

…g transaction

Handles #1868

Changes proposed in this pull request:

  • Add new "ChainGasPriceSource" core data object that will store the result of the chain info
  • Use the fixed 'gasPrice' if it exists in the sources during transaction estimation for executing.

// find the first 'fixed' gas price
var fixedGasPrice: Sol.UInt256? = nil

for case SCGModels.GasPrice.fixed(let fixed) in chain.gasPrice where Sol.UInt256(fixed.weiValue) != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something new in Swift for me today

@codecov
Copy link

codecov bot commented Feb 1, 2022

Codecov Report

Merging #1880 (d6f32f4) into main (5a2901f) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1880      +/-   ##
==========================================
- Coverage   10.31%   10.29%   -0.03%     
==========================================
  Files         519      519              
  Lines       24792    24842      +50     
==========================================
  Hits         2557     2557              
- Misses      22235    22285      +50     
Impacted Files Coverage Δ
Multisig/App/SceneDelegate.swift 51.07% <0.00%> (ø)
Multisig/Cross-layer/Analytics/Tracker.swift 39.39% <0.00%> (-0.61%) ⬇️
Multisig/Logic/Models/Chain.swift 2.41% <0.00%> (-0.53%) ⬇️
Multisig/UI/Dapps/DappsViewController.swift 1.27% <0.00%> (-0.01%) ⬇️
...on/Execution/TransactionEstimationController.swift 0.00% <0.00%> (ø)
...ver/Safes/WalletConnectSafesServerController.swift 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f05e64d...d6f32f4. Read the comment docs.

@DmitryBespalov DmitryBespalov merged commit fb4c482 into main Feb 1, 2022
@DmitryBespalov DmitryBespalov deleted the gh-1868/support-fixed-gas-prices-based-on-chain branch February 1, 2022 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants