mirror of
https://github.com/Xahau/xahaud.git
synced 2026-06-02 16:26:37 +00:00
cleanup and fix rpc call test
This commit is contained in:
committed by
Richard Holland
parent
f49dce56b0
commit
d492ffd04e
@@ -886,10 +886,8 @@ private:
|
||||
|
||||
// parse string
|
||||
Json::Value amountJson = jvParseSTAmount(jvParams[index].asString());
|
||||
// std::cout << "AMT JSON: " << amountJson << "\n";
|
||||
if (!amountJson) {
|
||||
// amount is string
|
||||
// std::cout << "IS STRING: " << "\n";
|
||||
if (!to_uint64(jvParams[index].asString()))
|
||||
return rpcError(rpcCHANNEL_AMT_MALFORMED);
|
||||
|
||||
@@ -898,7 +896,6 @@ private:
|
||||
else
|
||||
{
|
||||
// amount is json
|
||||
// std::cout << "IS JSON: " << "\n";
|
||||
STAmount amount;
|
||||
bool isAmount = amountFromJsonNoThrow(amount, amountJson);
|
||||
if (!isAmount)
|
||||
@@ -939,7 +936,6 @@ private:
|
||||
return rpcError(rpcCHANNEL_AMT_MALFORMED);
|
||||
// parse string
|
||||
Json::Value amountJson = jvParseSTAmount(jvParams[2u].asString());
|
||||
// std::cout << "AMT JSON: " << amountJson << "\n";
|
||||
if (!amountJson) {
|
||||
// amount is string
|
||||
if (!to_uint64(jvParams[2u].asString()))
|
||||
@@ -960,7 +956,6 @@ private:
|
||||
}
|
||||
|
||||
jvRequest[jss::signature] = jvParams[3u].asString();
|
||||
|
||||
return jvRequest;
|
||||
}
|
||||
|
||||
|
||||
@@ -2036,9 +2036,9 @@ static RPCCallTestData const rpcCallTestArray[] = {
|
||||
{
|
||||
"api_version" : %MAX_API_VER%,
|
||||
"amount" : {
|
||||
"value: "1000",
|
||||
"currency: "USD",
|
||||
"issuer: "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
|
||||
"currency" : "USD",
|
||||
"issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
|
||||
"value" : "1000"
|
||||
},
|
||||
"channel_id" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
|
||||
"secret" : "secret_can_be_anything"
|
||||
@@ -2222,9 +2222,9 @@ static RPCCallTestData const rpcCallTestArray[] = {
|
||||
{
|
||||
"api_version" : %MAX_API_VER%,
|
||||
"amount" : {
|
||||
"value: "1000",
|
||||
"currency: "USD",
|
||||
"issuer: "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA"
|
||||
"currency" : "USD",
|
||||
"issuer" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
|
||||
"value" : "1000"
|
||||
},
|
||||
"channel_id" : "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF",
|
||||
"public_key" : "aB4BXXLuPu8DpVuyq1DBiu3SrPdtK9AYZisKhu8mvkoiUD8J9Gov",
|
||||
|
||||
Reference in New Issue
Block a user