Skip to content

Commit c80eeec

Browse files
committed
[trivial] address PR comments
1 parent ae07971 commit c80eeec

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [[Unreleased]]
99

10-
## [[4.5.0]]
11-
1210
### Added
1311
- Support for XLS-82d MPT-DEX
1412
- The `ledger_entry` RPC can now accept `AMM` input along with the two asset definitions.

xrpl/core/binarycodec/types/path_set.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException
1313
from xrpl.core.binarycodec.types.account_id import AccountID
1414
from xrpl.core.binarycodec.types.currency import Currency
15-
from xrpl.core.binarycodec.types.hash192 import Hash192
15+
from xrpl.core.binarycodec.types.hash192 import HASH192_BYTES, Hash192
1616
from xrpl.core.binarycodec.types.serialized_type import SerializedType
1717

1818
# Constant for masking types of a PathStep
@@ -21,8 +21,6 @@
2121
_TYPE_ISSUER: Final[int] = 0x20
2222
_TYPE_MPT: Final[int] = 0x40
2323

24-
_HASH192_BYTES: Final[int] = 24
25-
2624
# Constants for separating Paths in a PathSet
2725
_PATHSET_END_BYTE: Final[int] = 0x00
2826
_PATH_SEPARATOR_BYTE: Final[int] = 0xFF
@@ -121,7 +119,7 @@ def from_parser(
121119
currency = parser.read(Currency.LENGTH)
122120
buffer += currency
123121
elif data_type & _TYPE_MPT:
124-
mpt_id = parser.read(_HASH192_BYTES)
122+
mpt_id = parser.read(HASH192_BYTES)
125123
buffer += mpt_id
126124
if data_type & _TYPE_ISSUER:
127125
issuer = parser.read(AccountID.LENGTH)
@@ -147,7 +145,7 @@ def to_json(self: Self) -> Dict[str, str]:
147145
currency = Currency.from_parser(parser).to_json()
148146
json["currency"] = currency
149147
elif data_type & _TYPE_MPT:
150-
mpt_id = parser.read(_HASH192_BYTES).hex().upper()
148+
mpt_id = parser.read(HASH192_BYTES).hex().upper()
151149
json["mpt_issuance_id"] = mpt_id
152150
if data_type & _TYPE_ISSUER:
153151
issuer = AccountID.from_parser(parser).to_json()

0 commit comments

Comments
 (0)