Do not deprecate Transaction#hash as it offers support for deserializing websocket responses #308
theotherian
started this conversation in
General
Replies: 1 comment
-
Interesting, and nice catch @theotherian! @nkramer44 -- do you remember why we moved the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, the
hash
method onTransaction
is marked as deprecated, both inmain
and the v3 preview:xrpl4j/xrpl4j-model/src/main/java/org/xrpl/xrpl4j/model/transactions/Transaction.java
Line 275 in 4255c50
https://github.com/XRPLF/xrpl4j/blob/df/v3-dev-preview/xrpl4j-model/src/main/java/org/xrpl/xrpl4j/model/transactions/Transaction.java#L267
The reason given is:
This isn't true though. When subscribing to a transaction stream via websocket, the only place to find the transaction hash is on the transaction:
https://xrpl.org/subscribe.html#transaction-streams
If someone wants to use xrpl4j to help deserialize results from a websocket stream, losing this field would make it more painful to uniquely identify in upstream eventing.
By default, unless you ask for "proposed" transactions as well, all transactions should be finalized on the ledger.
Let me know if there's another or better way to identify the transaction.
Beta Was this translation helpful? Give feedback.
All reactions