1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Don't display DetectedTokenSelectionPopover if there are no detected tokens (#15877)

* Don't display DetectedTokenSelectionPopover if there are no detected tokens

* adding length greater than 0 check as a 0 is displayed at the end of teh page previously

Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com>
Co-authored-by: ryanml <ryanlanese@gmail.com>
This commit is contained in:
Dan J Miller 2022-09-19 15:10:05 -02:30 committed by GitHub
parent c8935c6951
commit d38ba20cca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,15 +155,17 @@ const DetectedToken = ({ setShowDetectedTokens }) => {
partiallyIgnoreDetectedTokens={partiallyIgnoreDetectedTokens}
/>
)}
<DetectedTokenSelectionPopover
detectedTokens={detectedTokens}
tokensListDetected={tokensListDetected}
handleTokenSelection={handleTokenSelection}
onImport={onImport}
onIgnoreAll={onIgnoreAll}
setShowDetectedTokens={setShowDetectedTokens}
sortingBasedOnTokenSelection={sortingBasedOnTokenSelection}
/>
{detectedTokens.length > 0 && (
<DetectedTokenSelectionPopover
detectedTokens={detectedTokens}
tokensListDetected={tokensListDetected}
handleTokenSelection={handleTokenSelection}
onImport={onImport}
onIgnoreAll={onIgnoreAll}
setShowDetectedTokens={setShowDetectedTokens}
sortingBasedOnTokenSelection={sortingBasedOnTokenSelection}
/>
)}
</>
);
};