We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe5f85c commit 0a158b5Copy full SHA for 0a158b5
ui/components/app/modals/customize-nonce/customize-nonce.component.js
@@ -27,7 +27,9 @@ const CustomizeNonce = ({
27
updateCustomNonce,
28
getNextNonce,
29
}) => {
30
- const [customNonce, setCustomNonce] = useState('');
+ const defaultNonce =
31
+ customNonceValue || (typeof nextNonce === 'number' && nextNonce.toString());
32
+ const [customNonce, setCustomNonce] = useState(defaultNonce);
33
const t = useI18nContext();
34
35
return (
@@ -107,10 +109,7 @@ const CustomizeNonce = ({
107
109
type="number"
108
110
data-testid="custom-nonce-input"
111
min="0"
- placeholder={
- customNonceValue ||
112
- (typeof nextNonce === 'number' && nextNonce.toString())
113
- }
+ placeholder={defaultNonce}
114
onChange={(e) => {
115
setCustomNonce(e.target.value);
116
}}
0 commit comments