public TransactionInfo(int idx, string id, NodeApi.Transaction tr) { Index = idx; Id = id; Value = ConvUtils.FormatAmount(tr.Amount); FromAccount = tr.Source.Trim(); ToAccount = tr.Target.Trim(); Currency = tr.Currency; Fee = "0"; if (tr.SmartContract == null) { return; } SmartContractSource = tr.SmartContract.SourceCode; SmartContractHashState = tr.SmartContract.HashState; }