Skip to content

Ensure that priceSlippage fiat amounts are always shown in view-quote.js#10762

Merged
danjm merged 1 commit intodevelopfrom
use-eth-fiat-override-showfiat
Mar 30, 2021
Merged

Ensure that priceSlippage fiat amounts are always shown in view-quote.js#10762
danjm merged 1 commit intodevelopfrom
use-eth-fiat-override-showfiat

Conversation

@danjm
Copy link
Contributor

@danjm danjm commented Mar 29, 2021

This PR fixes an issue found by @tmashuang when QAing v9.3.0: "Market Price unavailable" were always showing up on the second screen of the swaps flow while on the bsc network.

This is because priceSlippageFromSource and priceSlippageFromDestination were always undefined, because useEthFiatAmount returns undefined if not on mainnet nor on a testnet while have set the "show fiat in testnet" setting to true.

To ensure the calls to useEthFiatAmount from view-quote.js behave on other networks the same as they do on mainnet, this PR adds the overrides.showFiat parameter to those calls.

@danjm danjm requested a review from a team as a code owner March 29, 2021 23:34
@danjm danjm requested a review from NiranjanaBinoy March 29, 2021 23:34
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot
Copy link
Collaborator

Builds ready [374020c]
Page Load Metrics (498 ± 51 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint45715784
domContentLoaded34360649610651
load34460749810651
domInteractive34360649610651

@danjm danjm force-pushed the use-eth-fiat-override-showfiat branch from 374020c to 1fb4540 Compare March 30, 2021 10:25
@metamaskbot
Copy link
Collaborator

Builds ready [1fb4540]
Page Load Metrics (582 ± 41 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint45745984
domContentLoaded3806555808541
load3816575828441
domInteractive3806555808541

@danjm danjm merged commit f7a328a into develop Mar 30, 2021
@danjm danjm deleted the use-eth-fiat-override-showfiat branch March 30, 2021 15:25
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants