Exemple #1
0
        public async Task <ResultWrapper <bool> > vault_deleteKey(string vaultId, string keyId)
        {
            try
            {
                await _vaultService.DeleteKey(Guid.Parse(vaultId), Guid.Parse(keyId));

                return(ResultWrapper <bool> .Success(true));
            }
            catch (Exception e)
            {
                return(ResultWrapper <bool> .Fail(e));
            }
        }
Exemple #2
0
        public async Task DeleteAccount(Address address)
        {
            Guid?keyId = await RetrieveId(address);

            if (keyId is null)
            {
                throw new KeyNotFoundException($"Account with the given address {address} could not be found");
            }

            if (_logger.IsTrace)
            {
                _logger.Trace($"Deleting key {keyId} from vault {_vaultId}");
            }
            await _vaultService.DeleteKey(_vaultId, keyId.Value);
        }