Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ namespace ledger {
bodyRequest.pushParameter("account", addresses[0]);
bodyRequest.pushParameterBool("forward", true);
if (fromBlockHash.hasValue() && _paginationMarker.empty()) {
bodyRequest.pushParameter("ledger_index_min", fromBlockHash.getValue());
BigInt blockHash{fromBlockHash.getValue()};
bodyRequest.pushParameter("ledger_index_min", blockHash.toUint64());
}

// handle transaction pagination in the case we have a pagination marker, which happens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ namespace ledger {
return *this;
};

NodeRippleLikeBodyRequest &pushParameter(const std::string &key, uint64_t value) {
rapidjson::Document::AllocatorType &allocator = _document.GetAllocator();
rapidjson::Value vKeyParam(rapidjson::kStringType);
vKeyParam.SetString(key.c_str(), static_cast<rapidjson::SizeType>(key.length()), allocator);
rapidjson::Value vParam(rapidjson::kNumberType);
vParam.SetUint64(value);
_params.AddMember(vKeyParam, vParam, allocator);
return *this;
};

NodeRippleLikeBodyRequest &pushParameterBool(const std::string &key, bool value) {
// TODO: C++17 group all 3 pushParameter in a single one with a if constexpr ()
rapidjson::Document::AllocatorType &allocator = _document.GetAllocator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ namespace ledger {
_transaction->sender = value;
} else if (_lastKey == "Destination") {
_transaction->receiver = value;
} else if (_lastKey == "Amount") {
} else if (_lastKey == "Amount" || _lastKey == "DeliveredAmount") {
BigInt valueBigInt = BigInt::fromString(value);
_transaction->value = valueBigInt;
} else if (_lastKey == "Fee") {
Expand Down