From d204dae69500faef2c4c167e4aba5e1566a5ed86 Mon Sep 17 00:00:00 2001 From: Bruno Barbieri Date: Wed, 19 May 2021 22:55:51 -0400 Subject: [PATCH] fix speed up send asset (#2037) --- src/screens/SpeedUpAndCancelSheet.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/screens/SpeedUpAndCancelSheet.js b/src/screens/SpeedUpAndCancelSheet.js index 5f4343a3a10..994ecbf9bc0 100644 --- a/src/screens/SpeedUpAndCancelSheet.js +++ b/src/screens/SpeedUpAndCancelSheet.js @@ -126,6 +126,7 @@ export default function SpeedUpAndCancelSheet() { ); const fetchedTx = useRef(false); const [gasLimit, setGasLimit] = useState(tx.gasLimit); + const [to, setTo] = useState(tx.to); const [data, setData] = useState(tx.data); const [value, setValue] = useState(tx.value); const [nonce, setNonce] = useState(tx.nonce); @@ -201,7 +202,7 @@ export default function SpeedUpAndCancelSheet() { gasLimit, gasPrice, nonce, - to: tx.to, + to, value, }; existingWallet = await loadWallet(); @@ -224,7 +225,7 @@ export default function SpeedUpAndCancelSheet() { } finally { goBack(); } - }, [data, dispatch, gasLimit, getNewGasPrice, goBack, nonce, tx, value]); + }, [data, dispatch, gasLimit, getNewGasPrice, goBack, nonce, to, tx, value]); useEffect(() => { InteractionManager.runAfterInteractions(async () => { @@ -241,6 +242,7 @@ export default function SpeedUpAndCancelSheet() { setNonce(txObj.nonce); setValue(hexValue); setData(hexData); + setTo(txObj.to); setGasLimit(hexGasLimit); setMinGasPrice(calcMinGasPriceAllowed(hexGasPrice)); }