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>
feature/default_network_editable
Dan J Miller 2 years ago committed by PeterYinusa
parent 5c41ff0aa1
commit e6017ee2a4
  1. 20
      ui/components/app/detected-token/detected-token.js

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

Loading…
Cancel
Save