mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-01 00:28:06 +01:00
5789bd86c0
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.
95 lines
2.4 KiB
JavaScript
95 lines
2.4 KiB
JavaScript
const quoteDataRows = [
|
|
{
|
|
aggId: 'Agg1',
|
|
amountReceiving: '100 DAI',
|
|
destinationTokenDecimals: 18,
|
|
destinationTokenSymbol: 'DAI',
|
|
destinationTokenValue: '100000000000000000000',
|
|
isBestQuote: false,
|
|
networkFees: '$15.25',
|
|
quoteSource: 'AGG',
|
|
rawNetworkFees: 10.25,
|
|
slippage: '1%',
|
|
sourceTokenDecimals: 18,
|
|
sourceTokenSymbol: 'ETH',
|
|
sourceTokenValue: '250000000000000000',
|
|
},
|
|
{
|
|
aggId: 'Agg2',
|
|
amountReceiving: '101 DAI',
|
|
destinationTokenDecimals: 18,
|
|
destinationTokenSymbol: 'DAI',
|
|
destinationTokenValue: '101000000000000000000',
|
|
isBestQuote: false,
|
|
networkFees: '$14.26',
|
|
quoteSource: 'RFQ',
|
|
rawNetworkFees: 10.26,
|
|
slippage: '1%',
|
|
sourceTokenDecimals: 18,
|
|
sourceTokenSymbol: 'ETH',
|
|
sourceTokenValue: '250000000000000000',
|
|
},
|
|
{
|
|
aggId: 'Agg3',
|
|
amountReceiving: '102 DAI',
|
|
destinationTokenDecimals: 18,
|
|
destinationTokenSymbol: 'DAI',
|
|
destinationTokenValue: '102000000000000000000',
|
|
isBestQuote: false,
|
|
networkFees: '$13.27',
|
|
quoteSource: 'DEX',
|
|
rawNetworkFees: 10.27,
|
|
slippage: '1%',
|
|
sourceTokenDecimals: 18,
|
|
sourceTokenSymbol: 'ETH',
|
|
sourceTokenValue: '250000000000000000',
|
|
},
|
|
{
|
|
aggId: 'Agg4',
|
|
amountReceiving: '150 DAI',
|
|
destinationTokenDecimals: 18,
|
|
destinationTokenSymbol: 'DAI',
|
|
destinationTokenValue: '150000000000000000000',
|
|
isBestQuote: true,
|
|
networkFees: '$12.28',
|
|
quoteSource: 'AGG',
|
|
rawNetworkFees: 10.28,
|
|
slippage: '1%',
|
|
sourceTokenDecimals: 18,
|
|
sourceTokenSymbol: 'ETH',
|
|
sourceTokenValue: '250000000000000000',
|
|
},
|
|
{
|
|
aggId: 'Agg5',
|
|
amountReceiving: '104 DAI',
|
|
destinationTokenDecimals: 18,
|
|
destinationTokenSymbol: 'DAI',
|
|
destinationTokenValue: '104000000000000000000',
|
|
isBestQuote: false,
|
|
networkFees: '$11.29',
|
|
quoteSource: 'RFQ',
|
|
rawNetworkFees: 10.29,
|
|
slippage: '1%',
|
|
sourceTokenDecimals: 18,
|
|
sourceTokenSymbol: 'ETH',
|
|
sourceTokenValue: '250000000000000000',
|
|
},
|
|
{
|
|
aggId: 'Agg6',
|
|
amountReceiving: '105 DAI',
|
|
destinationTokenDecimals: 18,
|
|
destinationTokenSymbol: 'DAI',
|
|
destinationTokenValue: '105000000000000000000',
|
|
isBestQuote: false,
|
|
networkFees: '$10.30',
|
|
quoteSource: 'DEX',
|
|
rawNetworkFees: 10.30,
|
|
slippage: '1%',
|
|
sourceTokenDecimals: 18,
|
|
sourceTokenSymbol: 'ETH',
|
|
sourceTokenValue: '250000000000000000',
|
|
},
|
|
]
|
|
|
|
export default quoteDataRows
|