Skip to content

Commit

Permalink
chore: logging transaction hash
Browse files Browse the repository at this point in the history
  • Loading branch information
JeneaVranceanu committed May 16, 2024
1 parent c0a9d21 commit 2405ddd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/compositions/useWeb3Connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,11 @@ const sendTransaction = (
): Promise<TransactionReceipt> => {
return web3.eth
.sendTransaction(transaction)
.on('transactionHash', hash => {
console.log('Transaction hash:', hash)
})
.on('receipt', (receipt: any) => {
console.log(receipt)
console.log('Transaction receipt:', receipt)
})
.once('sending', payload => {
console.log(JSON.stringify(payload, null, 2))
Expand Down

0 comments on commit 2405ddd

Please sign in to comment.