Skip to content

Commit 066e670

Browse files
authored
fix: add hash field to TransactionStream (#2939)
* Update subscribe.ts * add history
1 parent 7fe27f3 commit 066e670

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/xrpl/HISTORY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr
55
## Unreleased
66

77
### Fixed
8-
* Fix `OracleSet` transaction to accept hexadecimal string values for `AssetPrice` field
8+
* `OracleSet` transaction accepts hexadecimal string values for `AssetPrice` field
9+
* `TransactionStream` model includes `hash` field in APIv2
10+
* `TransactionStream` model includes `close_time_iso` field only for APIv2
911

1012
## 4.2.0 (2025-2-13)
1113

packages/xrpl/src/models/methods/subscribe.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,17 @@ interface TransactionStreamBase<
275275
* The approximate time this ledger was closed, in date time string format.
276276
* Always uses the UTC time zone.
277277
*/
278-
close_time_iso: string
278+
close_time_iso: Version extends typeof RIPPLED_API_V2 ? string : never
279279
/** String Transaction result code. */
280280
engine_result: string
281281
/** Numeric transaction response code, if applicable. */
282282
engine_result_code: number
283283
/** Human-readable explanation for the transaction response. */
284284
engine_result_message: string
285+
/**
286+
* The unique hash identifier of the transaction.
287+
*/
288+
hash?: Version extends typeof RIPPLED_API_V2 ? string : never
285289
/**
286290
* The ledger index of the current in-progress ledger version for which this
287291
* transaction is currently proposed.

0 commit comments

Comments
 (0)