Fix PropType warning about `quoteDataRows[0].rawNetworkFees` (#9842)

The property `quoteDataRows[0]rawNetworkFees` was described as a number
rather than a string. In practice it is a string in all cases. The
PropType and the tests have both been updated to expect it to be a
string.
feature/default_network_editable
Mark Stacey 4 years ago committed by GitHub
parent bcd5f2a7c1
commit 65fb18e1aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      ui/app/pages/swaps/select-quote-popover/mock-quote-data.js
  2. 2
      ui/app/pages/swaps/select-quote-popover/select-quote-popover-constants.js

@ -8,7 +8,7 @@ const quoteDataRows = [
isBestQuote: false,
networkFees: '$15.25',
quoteSource: 'AGG',
rawNetworkFees: 10.25,
rawNetworkFees: '10.25',
slippage: '1%',
sourceTokenDecimals: 18,
sourceTokenSymbol: 'ETH',
@ -23,7 +23,7 @@ const quoteDataRows = [
isBestQuote: false,
networkFees: '$14.26',
quoteSource: 'RFQ',
rawNetworkFees: 10.26,
rawNetworkFees: '10.26',
slippage: '1%',
sourceTokenDecimals: 18,
sourceTokenSymbol: 'ETH',
@ -38,7 +38,7 @@ const quoteDataRows = [
isBestQuote: false,
networkFees: '$13.27',
quoteSource: 'DEX',
rawNetworkFees: 10.27,
rawNetworkFees: '10.27',
slippage: '1%',
sourceTokenDecimals: 18,
sourceTokenSymbol: 'ETH',
@ -53,7 +53,7 @@ const quoteDataRows = [
isBestQuote: true,
networkFees: '$12.28',
quoteSource: 'AGG',
rawNetworkFees: 10.28,
rawNetworkFees: '10.28',
slippage: '1%',
sourceTokenDecimals: 18,
sourceTokenSymbol: 'ETH',
@ -68,7 +68,7 @@ const quoteDataRows = [
isBestQuote: false,
networkFees: '$11.29',
quoteSource: 'RFQ',
rawNetworkFees: 10.29,
rawNetworkFees: '10.29',
slippage: '1%',
sourceTokenDecimals: 18,
sourceTokenSymbol: 'ETH',
@ -83,7 +83,7 @@ const quoteDataRows = [
isBestQuote: false,
networkFees: '$10.30',
quoteSource: 'DEX',
rawNetworkFees: 10.3,
rawNetworkFees: '10.3',
slippage: '1%',
sourceTokenDecimals: 18,
sourceTokenSymbol: 'ETH',

@ -9,7 +9,7 @@ export const QUOTE_DATA_ROWS_PROPTYPES_SHAPE = PropTypes.shape({
isBestQuote: PropTypes.bool,
networkFees: PropTypes.string.isRequired,
quoteSource: PropTypes.string.isRequired,
rawNetworkFees: PropTypes.number.isRequired,
rawNetworkFees: PropTypes.string.isRequired,
slippage: PropTypes.string.isRequired,
sourceTokenDecimals: PropTypes.number.isRequired,
sourceTokenSymbol: PropTypes.string.isRequired,

Loading…
Cancel
Save