From 0ebc465221923a8c341a0dc4a5c1dfe43fb275bd Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Fri, 9 Oct 2020 13:08:01 -0230 Subject: [PATCH] Fix swap prop type errors (#9532) * Fix swap prop type errors * Fix prop type of sortColumn in sort-list --- ui/app/pages/swaps/index.js | 2 +- .../swaps/select-quote-popover/quote-details/quote-details.js | 2 +- .../select-quote-popover/select-quote-popover-constants.js | 2 +- .../pages/swaps/select-quote-popover/sort-list/sort-list.js | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/app/pages/swaps/index.js b/ui/app/pages/swaps/index.js index 45907859d..f4e295735 100644 --- a/ui/app/pages/swaps/index.js +++ b/ui/app/pages/swaps/index.js @@ -324,7 +324,7 @@ export default function Swap () { return aggregatorMetadata ? ( { await dispatch(setBackgroundSwapRouteState('')) diff --git a/ui/app/pages/swaps/select-quote-popover/quote-details/quote-details.js b/ui/app/pages/swaps/select-quote-popover/quote-details/quote-details.js index 3944996f4..bff69cbb5 100644 --- a/ui/app/pages/swaps/select-quote-popover/quote-details/quote-details.js +++ b/ui/app/pages/swaps/select-quote-popover/quote-details/quote-details.js @@ -96,7 +96,7 @@ const QuoteDetails = ({ } QuoteDetails.propTypes = { - slippage: PropTypes.string.isRequired, + slippage: PropTypes.number.isRequired, sourceTokenValue: PropTypes.string.isRequired, sourceTokenSymbol: PropTypes.string.isRequired, destinationTokenValue: PropTypes.string.isRequired, diff --git a/ui/app/pages/swaps/select-quote-popover/select-quote-popover-constants.js b/ui/app/pages/swaps/select-quote-popover/select-quote-popover-constants.js index 7002ce485..2812b68d5 100644 --- a/ui/app/pages/swaps/select-quote-popover/select-quote-popover-constants.js +++ b/ui/app/pages/swaps/select-quote-popover/select-quote-popover-constants.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types' export const QUOTE_DATA_ROWS_PROPTYPES_SHAPE = PropTypes.shape({ - aggregatorId: PropTypes.string.isRequired, + aggId: PropTypes.string.isRequired, amountReceiving: PropTypes.string.isRequired, destinationTokenDecimals: PropTypes.number.isRequired, destinationTokenSymbol: PropTypes.string.isRequired, diff --git a/ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.js b/ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.js index 64ec8ffce..c113a5863 100644 --- a/ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.js +++ b/ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.js @@ -21,7 +21,7 @@ export default function SortList ({ swapToSymbol, sortDirection, setSortDirection, - sortColumn, + sortColumn = null, setSortColumn, }) { const t = useContext(I18nContext) @@ -171,6 +171,6 @@ SortList.propTypes = { quoteDataRows: PropTypes.arrayOf(QUOTE_DATA_ROWS_PROPTYPES_SHAPE).isRequired, sortDirection: PropTypes.number.isRequired, setSortDirection: PropTypes.func.isRequired, - sortColumn: PropTypes.string.isRequired, + sortColumn: PropTypes.string, setSortColumn: PropTypes.func.isRequired, }