mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Changed update nickname popover to remove proptype errors
This commit is contained in:
parent
3665c3718d
commit
29d87343fa
@ -124,12 +124,12 @@ AdvancedGasControls.propTypes = {
|
|||||||
gasEstimateType: PropTypes.oneOf(Object.values(GAS_ESTIMATE_TYPES)),
|
gasEstimateType: PropTypes.oneOf(Object.values(GAS_ESTIMATE_TYPES)),
|
||||||
setMaxPriorityFee: PropTypes.func,
|
setMaxPriorityFee: PropTypes.func,
|
||||||
setMaxFee: PropTypes.func,
|
setMaxFee: PropTypes.func,
|
||||||
maxPriorityFee: PropTypes.number,
|
maxPriorityFee: PropTypes.string,
|
||||||
maxFee: PropTypes.number,
|
maxFee: PropTypes.string,
|
||||||
onManualChange: PropTypes.func,
|
onManualChange: PropTypes.func,
|
||||||
gasLimit: PropTypes.number,
|
gasLimit: PropTypes.number,
|
||||||
setGasLimit: PropTypes.func,
|
setGasLimit: PropTypes.func,
|
||||||
gasPrice: PropTypes.number,
|
gasPrice: PropTypes.string,
|
||||||
setGasPrice: PropTypes.func,
|
setGasPrice: PropTypes.func,
|
||||||
maxPriorityFeeFiat: PropTypes.string,
|
maxPriorityFeeFiat: PropTypes.string,
|
||||||
maxFeeFiat: PropTypes.string,
|
maxFeeFiat: PropTypes.string,
|
||||||
|
@ -43,7 +43,7 @@ const NicknamePopovers = ({ address, onClose }) => {
|
|||||||
<UpdateNicknamePopover
|
<UpdateNicknamePopover
|
||||||
address={address}
|
address={address}
|
||||||
nickname={recipientNickname || null}
|
nickname={recipientNickname || null}
|
||||||
memo={addressBookEntryObject?.memo}
|
memo={addressBookEntryObject?.memo || null}
|
||||||
onClose={() => setPopoverToDisplay(SHOW_NICKNAME_POPOVER)}
|
onClose={() => setPopoverToDisplay(SHOW_NICKNAME_POPOVER)}
|
||||||
onAdd={(recipient, nickname, memo) =>
|
onAdd={(recipient, nickname, memo) =>
|
||||||
dispatch(addToAddressBook(recipient, nickname, memo))
|
dispatch(addToAddressBook(recipient, nickname, memo))
|
||||||
|
@ -20,8 +20,8 @@ export default function UpdateNicknamePopover({
|
|||||||
}) {
|
}) {
|
||||||
const t = useContext(I18nContext);
|
const t = useContext(I18nContext);
|
||||||
|
|
||||||
const [nicknameInput, setNicknameInput] = useState(nickname);
|
const [nicknameInput, setNicknameInput] = useState(nickname === null ? "" : nickname);
|
||||||
const [memoInput, setMemoInput] = useState(memo);
|
const [memoInput, setMemoInput] = useState(memo === null ? "" : memo);
|
||||||
|
|
||||||
const handleNicknameChange = (event) => {
|
const handleNicknameChange = (event) => {
|
||||||
setNicknameInput(event.target.value);
|
setNicknameInput(event.target.value);
|
||||||
|
@ -21,9 +21,6 @@ const AssetOptions = ({
|
|||||||
);
|
);
|
||||||
const [assetOptionsOpen, setAssetOptionsOpen] = useState(false);
|
const [assetOptionsOpen, setAssetOptionsOpen] = useState(false);
|
||||||
|
|
||||||
if (props.onRemove === undefined) { props.onRemove = noop; }
|
|
||||||
if (props.onViewTokenDetails === undefined) { props.onViewTokenDetails = noop; }
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<button
|
<button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user