mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
@@ -10,7 +10,7 @@ Each ledger's state tree contain [ledger objects](https://xrpl.org/ledger-object
|
||||
|
||||
## Fields
|
||||
|
||||
These are Serialization Fields (`sf`) [defined in rippled's SField.cpp](https://github.com/ripple/rippled/blob/develop/src/ripple/protocol/impl/SField.cpp).
|
||||
These are Serialization Fields (`sf`) [defined in rippled's SField.cpp](https://github.com/ripple/rippled/blob/develop/src/ripple/protocol/impl/SField.cpp). Fields with undefined values are omitted before encoding.
|
||||
|
||||
### Key
|
||||
|
||||
|
||||
@@ -109,7 +109,12 @@ class STObject extends SerializedType {
|
||||
|
||||
let sorted = Object.keys(xAddressDecoded)
|
||||
.map((f: string): FieldInstance => Field[f] as FieldInstance)
|
||||
.filter((f: FieldInstance): boolean => f !== undefined && f.isSerialized)
|
||||
.filter(
|
||||
(f: FieldInstance): boolean =>
|
||||
f !== undefined &&
|
||||
xAddressDecoded[f.name] !== undefined &&
|
||||
f.isSerialized
|
||||
)
|
||||
.sort((a, b) => {
|
||||
return a.ordinal - b.ordinal;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user