You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to send "sendmany" rpc command, but my response is:
Unhandled exception. NBitcoin.RPC.RPCException: Wrong type passed:
{
"Position 2 (amounts)": "JSON value of type string is not of expected type object"
}
My attempt:
var toAddresses = new Dictionary<string, string>
{
{ "XXX", "0.0001" }
};
List parameters = new List();
parameters.Add("");
parameters.Add(JsonSerializer.Serialize(toAddresses));
parameters.Add(2);
parameters.Add("testing");
var response = await rpcClient.SendCommandAsync(RPCOperations.sendmany, parameters.ToArray());
P.S:
For parameters.Add(toAddresses) (without serialization)
Unhandled exception. Newtonsoft.Json.JsonWriterException: Unsupported type: System.Collections.Generic.Dictionary`2[System.String,System.String]. Use the JsonSerializer class to get the object's JSON representation. Path 'params'.
The text was updated successfully, but these errors were encountered:
I try to send "sendmany" rpc command, but my response is:
Unhandled exception. NBitcoin.RPC.RPCException: Wrong type passed:
{
"Position 2 (amounts)": "JSON value of type string is not of expected type object"
}
My attempt:
var toAddresses = new Dictionary<string, string>
{
{ "XXX", "0.0001" }
};
List parameters = new List();
parameters.Add("");
parameters.Add(JsonSerializer.Serialize(toAddresses));
parameters.Add(2);
parameters.Add("testing");
var response = await rpcClient.SendCommandAsync(RPCOperations.sendmany, parameters.ToArray());
P.S:
For parameters.Add(toAddresses) (without serialization)
Unhandled exception. Newtonsoft.Json.JsonWriterException: Unsupported type: System.Collections.Generic.Dictionary`2[System.String,System.String]. Use the JsonSerializer class to get the object's JSON representation. Path 'params'.
The text was updated successfully, but these errors were encountered: