From 4578ef088bf78d0edc4c548c754c69829d6f124a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=BF=97=E5=90=8C?= Date: Fri, 11 Sep 2020 15:54:35 +0800 Subject: [PATCH 1/2] Update RpcNep5Tracker.cs --- src/RpcNep5Tracker/RpcNep5Tracker.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/RpcNep5Tracker/RpcNep5Tracker.cs b/src/RpcNep5Tracker/RpcNep5Tracker.cs index 535fd4410..cf1407405 100644 --- a/src/RpcNep5Tracker/RpcNep5Tracker.cs +++ b/src/RpcNep5Tracker/RpcNep5Tracker.cs @@ -234,8 +234,7 @@ private void AddTransfers(byte dbPrefix, UInt160 userScriptHash, ulong startTime JObject transfer = new JObject(); transfer["timestamp"] = key.TimestampMS; transfer["assethash"] = key.AssetScriptHash.ToString(); - transfer["transferaddress"] = value.UserScriptHash.ToAddress(); - transfer["amount"] = value.Amount.ToString(); + transfer["transferaddress"] = value.UserScriptHash == UInt160.Zero ? null : value.UserScriptHash.ToAddress(); transfer["amount"] = value.Amount.ToString(); transfer["blockindex"] = value.BlockIndex; transfer["transfernotifyindex"] = key.BlockXferNotificationIndex; transfer["txhash"] = value.TxHash.ToString(); From 410be27dd7377704bd50203f6ca2d908deb388d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=BF=97=E5=90=8C?= Date: Fri, 11 Sep 2020 15:55:34 +0800 Subject: [PATCH 2/2] Update RpcNep5Tracker.cs --- src/RpcNep5Tracker/RpcNep5Tracker.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RpcNep5Tracker/RpcNep5Tracker.cs b/src/RpcNep5Tracker/RpcNep5Tracker.cs index cf1407405..2ad00b0d6 100644 --- a/src/RpcNep5Tracker/RpcNep5Tracker.cs +++ b/src/RpcNep5Tracker/RpcNep5Tracker.cs @@ -234,7 +234,8 @@ private void AddTransfers(byte dbPrefix, UInt160 userScriptHash, ulong startTime JObject transfer = new JObject(); transfer["timestamp"] = key.TimestampMS; transfer["assethash"] = key.AssetScriptHash.ToString(); - transfer["transferaddress"] = value.UserScriptHash == UInt160.Zero ? null : value.UserScriptHash.ToAddress(); transfer["amount"] = value.Amount.ToString(); + transfer["transferaddress"] = value.UserScriptHash == UInt160.Zero ? null : value.UserScriptHash.ToAddress(); + transfer["amount"] = value.Amount.ToString(); transfer["blockindex"] = value.BlockIndex; transfer["transfernotifyindex"] = key.BlockXferNotificationIndex; transfer["txhash"] = value.TxHash.ToString();