1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-24 20:32:02 +02:00
metamask-extension/ui/app/pages/swaps/select-quote-popover/select-quote-popover-constants.js
Mark Stacey 5789bd86c0
Fix sorting Quote Source column of quote sort list (#9658)
Sorting was broken for the "Quote Source" column of the quote sort
list. Attempting to sort by this column would arrange the quotes in a
seemingly random order.

It appears that this was due to this column being programmed to sort by
a property called `liquiditySource`, which does not exist in the quote
data. I'm unsure what the difference between `liquiditySource` and
`quoteSource` was supposed to be; the values in the mocks are all
identical.

All references to `liquiditySource` have been updated to refer to
`quoteSource` instead, and the sorting now works correctly.
2020-10-20 12:14:04 -02:30

18 lines
714 B
JavaScript

import PropTypes from 'prop-types'
export const QUOTE_DATA_ROWS_PROPTYPES_SHAPE = PropTypes.shape({
aggId: PropTypes.string.isRequired,
amountReceiving: PropTypes.string.isRequired,
destinationTokenDecimals: PropTypes.number.isRequired,
destinationTokenSymbol: PropTypes.string.isRequired,
destinationTokenValue: PropTypes.string.isRequired,
isBestQuote: PropTypes.bool,
networkFees: PropTypes.string.isRequired,
quoteSource: PropTypes.string.isRequired,
rawNetworkFees: PropTypes.number.isRequired,
slippage: PropTypes.string.isRequired,
sourceTokenDecimals: PropTypes.number.isRequired,
sourceTokenSymbol: PropTypes.string.isRequired,
sourceTokenValue: PropTypes.string.isRequired,
})