Skip to content

Commit

Permalink
Replace new JArray with .ToArray (AccountState) (neo-project#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
im-kulikov authored and rodoufu committed Mar 3, 2019
1 parent da4ce5d commit b5d929b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions neo/Ledger/AccountState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ public override JObject ToJson()
JObject json = base.ToJson();
json["script_hash"] = ScriptHash.ToString();
json["frozen"] = IsFrozen;
json["votes"] = new JArray(Votes.Select(p => (JObject)p.ToString()));
json["balances"] = new JArray(Balances.Select(p =>
json["votes"] = Votes.Select(p => (JObject)p.ToString()).ToArray();
json["balances"] = Balances.Select(p =>
{
JObject balance = new JObject();
balance["asset"] = p.Key.ToString();
balance["value"] = p.Value.ToString();
return balance;
}));
}).ToArray();
return json;
}
}
Expand Down

0 comments on commit b5d929b

Please sign in to comment.