Skip to content

Commit

Permalink
receipt is missing on error event (web3#3129)
Browse files Browse the repository at this point in the history
* receipt added for error event listener on sending of a transaction

* packages updated in package-lock because of security warnings from npm

* passing of parameters to _fireError updated in Method object of the web3-core-method module

* CHANGELOG.md updated

* documentation for sendTransaction and contract.methods.myMethod.send() updated

* Update packages/web3-core-method/src/index.js

Co-Authored-By: cgewecke <christophergewecke@gmail.com>

* Update docs/web3-eth.rst

Co-Authored-By: cgewecke <christophergewecke@gmail.com>

* wrongly passed parameters for the _fireError function fixed

* Update docs/web3-eth-contract.rst

Co-Authored-By: cgewecke <christophergewecke@gmail.com>
  • Loading branch information
2 people authored and nachomazzara committed Jun 4, 2020
1 parent 9bcdb35 commit a0038cc
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 69 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ Released with 1.0.0-beta.37 code base.
- Gas check fixed (#2381)
- Signing issues #1998, #2033, and #1074 fixed (#3125)
- Fix hexToNumber and hexToNumberString prefix validation (#3086)
- The receipt will now returned on a EVM error (this got removed on beta.18) (#3129)
2 changes: 1 addition & 1 deletion docs/web3-eth-contract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ The **callback** will return the 32 bytes transaction hash.
- ``"transactionHash"`` returns ``String``: is fired right after the transaction is sent and a transaction hash is available.
- ``"receipt"`` returns ``Object``: is fired when the transaction *receipt* is available. Receipts from contracts will have no ``logs`` property, but instead an ``events`` property with event names as keys and events as properties. See :ref:`getPastEvents return values <contract-events-return>` for details about the returned event object.
- ``"confirmation"`` returns ``Number``, ``Object``: is fired for every confirmation up to the 24th confirmation. Receives the confirmation number as the first and the receipt as the second argument. Fired from confirmation 1 on, which is the block where it's minded.
- ``"error"`` returns ``Error``: is fired if an error occurs during sending. If a out of gas error, the second parameter is the receipt.
``"error"`` returns ``Error`` and ``Object|undefined``: Is fired if an error occurs during sending. If the transaction was rejected by the network with a receipt, the second parameter will be the receipt.


-------
Expand Down
2 changes: 1 addition & 1 deletion docs/web3-eth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ The **callback** will return the 32 bytes transaction hash.
- ``"transactionHash"`` returns ``String``: Is fired right after the transaction is sent and a transaction hash is available.
- ``"receipt"`` returns ``Object``: Is fired when the transaction receipt is available.
- ``"confirmation"`` returns ``Number``, ``Object``: Is fired for every confirmation up to the 12th confirmation. Receives the confirmation number as the first and the :ref:`receipt <eth-gettransactionreceipt-return>` as the second argument. Fired from confirmation 0 on, which is the block where its minded.
- ``"error"`` returns ``Error``: Is fired if an error occurs during sending. If a out of gas error, the second parameter is the receipt.
``"error"`` returns ``Error`` and ``Object|undefined``: Is fired if an error occurs during sending. If the transaction was rejected by the network with a receipt, the second parameter will be the receipt.


-------
Expand Down
104 changes: 50 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a0038cc

Please sign in to comment.