mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Prevent React warning for custom slippage (#9706)
This commit is contained in:
parent
d0d7a3d01f
commit
5b67cf1009
@ -74,7 +74,7 @@ export default function SlippageButtons ({
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setCustomValue(undefined)
|
||||
setCustomValue('')
|
||||
setEnteringCustomValue(false)
|
||||
setActiveButtonIndex(1)
|
||||
onSelect(2)
|
||||
@ -108,12 +108,12 @@ export default function SlippageButtons ({
|
||||
ref={setInputRef}
|
||||
onBlur={() => {
|
||||
setEnteringCustomValue(false)
|
||||
if (customValue === '' || customValue === '0') {
|
||||
setCustomValue(null)
|
||||
if (customValue === '0') {
|
||||
setCustomValue('')
|
||||
setActiveButtonIndex(1)
|
||||
}
|
||||
}}
|
||||
value={customValue}
|
||||
value={customValue || ''}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user