Use tx receipt from wait call

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2021-10-29 14:03:42 +02:00
parent b2949d9910
commit 0b64723836
+1 -2
View File
@@ -216,10 +216,9 @@ async function commit(
state.set({ connection: State.Committing });
await tx.wait(1);
const receipt = await tx.wait(1);
session.state.updateBalance(fee.mul(-1));
const receipt = await config.provider.getTransactionReceipt(tx.hash);
// Save commitment in local storage in case the user refreshes or closes
// the page.
window.localStorage.setItem('commitment', JSON.stringify({