public static TransactionOutputModel MapToTransactionOutputModel(this Transaction transaction)
        {
            TransactionOutputModel model = new TransactionOutputModel()
            {
                Amount   = transaction.Amount,
                Comment  = transaction.Comment,
                Date     = transaction.Date,
                From     = transaction.From.Name,
                To       = transaction.To.Name,
                Currency = CurrencyTools.GetCurrencySymbol(transaction.Currency),
                Id       = transaction.Id
            };

            return(model);
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            TransactionOutputModel tom = (TransactionOutputModel)obj;

            if (Id == tom.Id &&
                AccountId == tom.AccountId &&
                Type == tom.Type &&
                Amount == tom.Amount &&
                AccountIdReceiver == tom.AccountIdReceiver)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
 public TransactionInputModel(Transaction.TransactionInput inp)
 {
     TransactionOutputId = inp.TransactionOutputId;
     UTXO = new TransactionOutputModel(inp.UTXO);
 }