1
0
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:
Dan J Miller 2020-10-09 13:08:01 -02:30 committed by GitHub
parent 3353c33981
commit 0ebc465221
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -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(''))

View File

@ -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,

View File

@ -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,

View File

@ -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,
}