Merge pull request #17 from chriseth/decimal

Use decimal values and rename keys
This commit is contained in:
chriseth 2023-02-25 18:06:08 +01:00 committed by GitHub
commit 4a3e89963a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -162,13 +162,13 @@ fn compute_transfer(
&(jsonrpc_result(
request.id.clone(),
json::object! {
flow: flow.to_string(),
maxFlowValue: flow.to_decimal(),
final: max_distance.is_none(),
transfers: transfers.into_iter().map(|e| json::object! {
transferSteps: transfers.into_iter().map(|e| json::object! {
from: e.from.to_checksummed_hex(),
to: e.to.to_checksummed_hex(),
token_owner: e.token.to_checksummed_hex(),
value: e.capacity.to_string()
value: e.capacity.to_decimal(),
}).collect::<Vec<_>>(),
},
) + "\r\n"),