Skip to content

Commit

Permalink
Replace new JArray with .ToArray (AccountState) (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
im-kulikov authored and jsolman committed Feb 19, 2019
1 parent 48890b6 commit d9fc9e9
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 d9fc9e9

Please sign in to comment.