Ejemplo n.º 1
0
        public async Task <ActionResult> DeleteObservation(string address)
        {
            if (!Validators.ValidateAzureKey(address) ||
                !_api.AddressIsValid(address))
            {
                return(BadRequest(BlockchainErrorResponse.Create("'address' must be valid blockchain address")));
            }

            if (await _depositWallets.TryDeleteObservationAsync(address))
            {
                _chaosKitty?.Meow($"{nameof(DeleteObservation)}_Data");

                await _api.DeleteAddressObservationAsync(address);

                _chaosKitty?.Meow($"{nameof(DeleteObservation)}_Blockchain");

                return(Ok());
            }
            else
            {
                return(NoContent());
            }
        }