on master help sign in
txs: consider transaction broadcasted instantly

This removes the annoying 5-30 second wait before the state change on the "send transaction" button, now instead making the button unclickable right away.

commit78dc17ef7a1570ba34386ce5de8bf8234061d885 authorfang <git@fang.io> dateFri 9 Oct 2020, 15:53 (6 years ago) parenta2dd484
1 file changed+1−1
src/lib/useEthereumTransaction.js+1−1
src/lib/useEthereumTransaction.js+1−1
@@ -145,6 +145,7 @@ export default function useEthereumTransaction(
145145 try {
146146 setConfirmationProgress(0.0);
147147 setError(undefined);
148+ setState(STATE.BROADCASTED);
148149
149150 const rawTxs = signedTransactions.map(stx => hexify(stx.serialize()));
150151
@@ -182,7 +183,6 @@ export default function useEthereumTransaction(
182183 );
183184
184185 setTxHashes(txHashes);
185− setState(STATE.BROADCASTED);
186186
187187 await timeout(PROGRESS_ANIMATION_DELAY_MS);
188188