mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Removing the token detection announcement when the token detection is ON (#12776)
This commit is contained in:
parent
4b975adc85
commit
3f8cbd5202
@ -44,6 +44,7 @@ class ImportToken extends Component {
|
|||||||
chainId: PropTypes.string,
|
chainId: PropTypes.string,
|
||||||
rpcPrefs: PropTypes.object,
|
rpcPrefs: PropTypes.object,
|
||||||
tokenList: PropTypes.object,
|
tokenList: PropTypes.object,
|
||||||
|
useTokenDetection: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
@ -391,26 +392,28 @@ class ImportToken extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderSearchToken() {
|
renderSearchToken() {
|
||||||
const { tokenList, history } = this.props;
|
const { tokenList, history, useTokenDetection } = this.props;
|
||||||
const { tokenSelectorError, selectedTokens, searchResults } = this.state;
|
const { tokenSelectorError, selectedTokens, searchResults } = this.state;
|
||||||
return (
|
return (
|
||||||
<div className="import-token__search-token">
|
<div className="import-token__search-token">
|
||||||
<ActionableMessage
|
{!useTokenDetection && (
|
||||||
message={this.context.t('tokenDetectionAnnouncement', [
|
<ActionableMessage
|
||||||
<Button
|
message={this.context.t('tokenDetectionAnnouncement', [
|
||||||
type="link"
|
<Button
|
||||||
key="token-detection-announcement"
|
type="link"
|
||||||
className="import-token__link"
|
key="token-detection-announcement"
|
||||||
onClick={() => history.push(EXPERIMENTAL_ROUTE)}
|
className="import-token__link"
|
||||||
>
|
onClick={() => history.push(EXPERIMENTAL_ROUTE)}
|
||||||
{this.context.t('enableFromSettings')}
|
>
|
||||||
</Button>,
|
{this.context.t('enableFromSettings')}
|
||||||
])}
|
</Button>,
|
||||||
withRightButton
|
])}
|
||||||
useIcon
|
withRightButton
|
||||||
iconFillColor="#037DD6"
|
useIcon
|
||||||
className="import-token__token-detection-announcement"
|
iconFillColor="#037DD6"
|
||||||
/>
|
className="import-token__token-detection-announcement"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<TokenSearch
|
<TokenSearch
|
||||||
onSearch={({ results = [] }) =>
|
onSearch={({ results = [] }) =>
|
||||||
this.setState({ searchResults: results })
|
this.setState({ searchResults: results })
|
||||||
|
@ -34,6 +34,7 @@ const mapStateToProps = (state) => {
|
|||||||
chainId,
|
chainId,
|
||||||
rpcPrefs: getRpcPrefsForCurrentProvider(state),
|
rpcPrefs: getRpcPrefsForCurrentProvider(state),
|
||||||
tokenList,
|
tokenList,
|
||||||
|
useTokenDetection,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__search-token {
|
&__search-token {
|
||||||
padding: 0 16px 16px 16px;
|
padding: 16px 16px 16px 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__token-list {
|
&__token-list {
|
||||||
@ -57,5 +57,6 @@
|
|||||||
|
|
||||||
&__token-detection-announcement {
|
&__token-detection-announcement {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user