public EditTransactionSection(IPresenter presenter, ITransactionView transactionView) { _transactionToRemove = -1; Presenter = presenter; Form = transactionView; GridViewManager = new TransactionViewService(Form.TransactionGrid, Form, this); InitTransactionDbManagers(); }
protected static void EnsureCorrectStoredValues( Transaction transaction, TransactionReceipt receipt, HexBigInteger blockTimestamp, string address, string error, string newContractAddress, bool hasVmStack, ITransactionView storedTransaction) { Assert.Equal(transaction.BlockHash, storedTransaction.BlockHash); Assert.Equal(transaction.TransactionHash, storedTransaction.Hash); Assert.Equal(transaction.From, storedTransaction.AddressFrom); Assert.Equal(transaction.TransactionIndex.Value.ToString(), storedTransaction.TransactionIndex); Assert.Equal(transaction.Value.Value.ToString(), storedTransaction.Value); Assert.Equal(transaction.To, storedTransaction.AddressTo); Assert.Equal(newContractAddress ?? string.Empty, storedTransaction.NewContractAddress); Assert.Equal(transaction.BlockNumber.Value.ToString(), storedTransaction.BlockNumber); Assert.Equal(transaction.Gas.Value.ToString(), storedTransaction.Gas); Assert.Equal(transaction.GasPrice.Value.ToString(), storedTransaction.GasPrice); Assert.Equal(transaction.Input, storedTransaction.Input); Assert.Equal(transaction.Nonce.Value.ToString(), storedTransaction.Nonce); Assert.False(storedTransaction.Failed); Assert.Equal(receipt.GasUsed.Value.ToString(), storedTransaction.GasUsed); Assert.Equal(receipt.CumulativeGasUsed.Value.ToString(), storedTransaction.CumulativeGasUsed); Assert.False(storedTransaction.HasLog); Assert.Equal(blockTimestamp.Value.ToString(), storedTransaction.TimeStamp); Assert.Equal(hasVmStack, storedTransaction.HasVmStack); if (error == null) { Assert.True(string.IsNullOrEmpty(storedTransaction.Error)); } else { Assert.Equal(error, storedTransaction.Error); } }