public TransactionInfo(int idx, string id, TestApi.Transaction tr) { Index = idx; Id = id; Value = ConvUtils.FormatAmount(tr.Amount); FromAccount = Base58Encoding.Encode(tr.Source); ToAccount = Base58Encoding.Encode(tr.Target); Currency = tr.Currency; Fee = "0"; if (tr.SmartContract == null) { return; } SmartContractSource = tr.SmartContract.SourceCode; SmartContractHashState = tr.SmartContract.HashState; }
public TransactionInfo(int idx, TestApi.TransactionId id, TestApi.Transaction tr) { Index = idx; if (id != null) { Id = $"{ConvUtils.ConvertHash(id.PoolHash)}.{id.Index + 1}"; } Value = ConvUtils.FormatAmount(tr.Amount); FromAccount = Base58Encoding.Encode(tr.Source); ToAccount = Base58Encoding.Encode(tr.Target); Currency = tr.Currency; Fee = "0"; if (tr.SmartContract == null) { return; } SmartContractSource = tr.SmartContract.SourceCode; SmartContractHashState = tr.SmartContract.HashState; }