mirror of
https://github.com/logos-blockchain/logos-blockchain-module.git
synced 2026-07-14 02:59:52 +00:00
Use TX_HASH_BYTES
This commit is contained in:
parent
04ac9d1bd5
commit
7ca59a0a1a
@ -663,12 +663,12 @@ std::string LogosBlockchainModule::wallet_get_notes(
|
||||
}
|
||||
|
||||
json obj;
|
||||
obj["tip"] = bytes_to_hex(reinterpret_cast<const uint8_t*>(value.tip), ADDRESS_BYTES);
|
||||
obj["tip"] = bytes_to_hex(reinterpret_cast<const uint8_t*>(value.tip), TX_HASH_BYTES);
|
||||
json notes = json::array();
|
||||
for (size_t i = 0; i < value.len; ++i) {
|
||||
const WalletNote& note = value.notes[i];
|
||||
json n;
|
||||
n["id"] = bytes_to_hex(reinterpret_cast<const uint8_t*>(note.id), ADDRESS_BYTES);
|
||||
n["id"] = bytes_to_hex(reinterpret_cast<const uint8_t*>(note.id), TX_HASH_BYTES);
|
||||
// Value is u64; serialized as a string to avoid JSON number precision loss.
|
||||
n["value"] = std::to_string(note.value);
|
||||
notes.push_back(std::move(n));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user