Exemplo n.º 1
0
        public IHttpActionResult VerifyManually([FromBody] TransactionVerificationArgs args)
        => this.Log(() =>
        {
            Operation <BlockChainTransaction> opr;
            if (args?.TransactionId > 0)
            {
                opr = _blockChain.VerifyManually(args.TransactionId ?? 0);
            }
            else if (!string.IsNullOrWhiteSpace(args?.TransactionHash))
            {
                opr = _blockChain.VerifyManually(args.TransactionHash);
            }
            else
            {
                opr = Operation.Fail <BlockChainTransaction>("Invalid arguments");
            }

            return(opr.OperationResult(Request));
        });