mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Added PR feedback changes
This commit is contained in:
parent
8b09f84502
commit
d882835cae
@ -12,10 +12,10 @@ import Identicon from '../identicon/identicon.component';
|
||||
import { getUseTokenDetection, getTokenList } from '../../../selectors';
|
||||
|
||||
export default function UpdateNicknamePopover({
|
||||
nickname,
|
||||
address,
|
||||
nickname = '',
|
||||
memo = '',
|
||||
onAdd,
|
||||
memo,
|
||||
onClose,
|
||||
}) {
|
||||
const t = useContext(I18nContext);
|
||||
|
@ -85,7 +85,7 @@ const AssetOptions = ({
|
||||
);
|
||||
};
|
||||
|
||||
const isntFunc = (p) => {
|
||||
const isNotFunc = (p) => {
|
||||
return typeof p !== 'function';
|
||||
};
|
||||
|
||||
@ -95,14 +95,14 @@ AssetOptions.propTypes = {
|
||||
onClickBlockExplorer: PropTypes.func.isRequired,
|
||||
onViewAccountDetails: PropTypes.func.isRequired,
|
||||
onRemove: (props) => {
|
||||
if (props.isNativeAsset === false && isntFunc(props.onRemove)) {
|
||||
if (props.isNativeAsset === false && isNotFunc(props.onRemove)) {
|
||||
throw new Error(
|
||||
'When isNativeAsset is true, onRemove is a required prop',
|
||||
);
|
||||
}
|
||||
},
|
||||
onViewTokenDetails: (props) => {
|
||||
if (props.isNativeAsset === false && isntFunc(props.onViewTokenDetails)) {
|
||||
if (props.isNativeAsset === false && isNotFunc(props.onViewTokenDetails)) {
|
||||
throw new Error(
|
||||
'When isNativeAsset is true, onViewTokenDetails is a required prop',
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user