Ejemplo n.º 1
0
        public async Task <string> CreateAddressAsync()
        {
            LykkePayWallet wallet = await _bitcoinServiceClient.GenerateLykkePayWallet();

            if (wallet.HasError)
            {
                await _log.WriteWarningAsync(nameof(CreateAddressAsync), "New bitcoin address generation", wallet.Error?.Message);

                throw new WalletAddressAllocationException(BlockchainType.Bitcoin);
            }

            return(wallet.Address);
        }
Ejemplo n.º 2
0
        public async Task <string> CreateAddressAsync()
        {
            LykkePayWallet wallet = await _bitcoinServiceClient.GenerateLykkePayWallet();

            if (wallet.HasError)
            {
                _log.Warning("New bitcoin address generation", context: wallet.ToJson());

                throw new WalletAddressAllocationException(BlockchainType.Bitcoin);
            }

            return(wallet.Address);
        }