Skip to content

Commit

Permalink
feat(CHANGELOG.md): introduce Transaction.safeSend() and PendingTrans…
Browse files Browse the repository at this point in the history
…action.safeWait() methods to handle transaction errors

refactor(CHANGELOG.md): rename Transaction.isSuccess to Transaction.status for better transaction state representation
  • Loading branch information
MartinMinkov committed Mar 5, 2024
1 parent 8d1554f commit 4ca39ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Breaking changes

- Improved on parity fix of `Mina.Localblockchain` and`Mina.Network` to make `.send()` and `.wait()` throw an error by default if the transaction was not successful. https://github.com/o1-labs/o1js/pull/1480
- Changed `Transaction.isSuccess` to `Transaction.status` to better represent the state of a transaction.
- `Transaction.safeSend()` and `PendingTransaction.safeWait()` are introduced to return a `IncludedTransaction` or `RejectedTransaction` object without throwing errors.
- Fixed parity between `Mina.LocalBlockchain` and `Mina.Network` to have the same behaviors https://github.com/o1-labs/o1js/pull/1422
- Changed the `TransactionId` type to `Transaction`. Additionally added `PendingTransaction` and `RejectedTransaction` types to better represent the state of a transaction.
- `transaction.send()` no longer throws an error if the transaction was not successful for `Mina.LocalBlockchain` and `Mina.Network`. Instead, it returns a `PendingTransaction` object that contains the error. Use `transaction.sendOrThrowIfError` to throw the error if the transaction was not successful.
Expand Down

0 comments on commit 4ca39ab

Please sign in to comment.