Skip to content

Commit

Permalink
Fix RpcClient TxConflict (#830)
Browse files Browse the repository at this point in the history
* init

* support not valid before
  • Loading branch information
Ashuaidehao authored Sep 25, 2023
1 parent 63e3ec3 commit d36dcbb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/RpcClient/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ public static TransactionAttribute TransactionAttributeFromJson(JObject json)
Code = Enum.Parse<OracleResponseCode>(json["code"].AsString()),
Result = Convert.FromBase64String(json["result"].AsString()),
},
TransactionAttributeType.NotValidBefore => new NotValidBefore()
{
Height = (uint)json["height"].AsNumber(),
},
TransactionAttributeType.Conflicts => new Conflicts()
{
Hash = UInt256.Parse(json["hash"].AsString())
},
_ => throw new FormatException(),
};
}
Expand Down

0 comments on commit d36dcbb

Please sign in to comment.