mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix swap prop type errors (#9532)
* Fix swap prop type errors * Fix prop type of sortColumn in sort-list
This commit is contained in:
parent
3353c33981
commit
0ebc465221
@ -324,7 +324,7 @@ export default function Swap () {
|
||||
return aggregatorMetadata
|
||||
? (
|
||||
<LoadingQuote
|
||||
loadingComplete={!fetchingQuotes && Object.values(quotes).length}
|
||||
loadingComplete={!fetchingQuotes && Boolean(Object.values(quotes).length)}
|
||||
onDone={async () => {
|
||||
await dispatch(setBackgroundSwapRouteState(''))
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user