Ejemplo n.º 1
0
 public EthereumTransactionViewModel(EthereumTransaction tx, EthereumConfig ethereumConfig)
     : base(tx, ethereumConfig, GetAmount(tx), GetFee(tx))
 {
     From       = tx.From;
     To         = tx.To;
     GasPrice   = EthereumConfig.WeiToGwei((decimal)tx.GasPrice);
     GasLimit   = (decimal)tx.GasLimit;
     GasUsed    = (decimal)tx.GasUsed;
     Fee        = EthereumConfig.WeiToEth(tx.GasUsed * tx.GasPrice);
     IsInternal = tx.IsInternal;
 }
 public EthereumERC20TransactionViewModel(
     EthereumTransaction tx,
     Erc20Config erc20Config)
     : base(tx, erc20Config, GetAmount(tx, erc20Config), 0)
 {
     From       = tx.From;
     To         = tx.To;
     GasPrice   = EthereumConfig.WeiToGwei((decimal)tx.GasPrice);
     GasLimit   = (decimal)tx.GasLimit;
     GasUsed    = (decimal)tx.GasUsed;
     IsInternal = tx.IsInternal;
 }