示例#1
0
        public IActionResult AddCoinIn(HomeAddCoinInViewModel vm)
        {
            CoinInput coinInput = new CoinInput
            {
                PublicKey = vm.OwnerPublicKey,
                Signature = "placeholder signature",
                Amount    = vm.Amount,
                WalletId  = vm.WalletId
            };

            _transactionservice.AddCoinIn(coinInput);

            Block block = new Block
            {
                Data = HashHelper.CalculateHash(coinInput.ToString()),
            };

            _blockservice.AddNextBlock(block);

            return(RedirectToAction("Index", "Home"));
        }