public async Task <string> GenerateWallet(Guid clientId, string assetId)
        {
            var asset = await _assetsServiceWithCache.TryGetAssetAsync(assetId);

            if (asset == null)
            {
                throw new InvalidOperationException($"Unknown asset {assetId}");
            }

            var(isErc20, bcnRowKey) = GetAssetInfo(asset);
            var current = await _firstGenerationBlockchainWalletRepository.GetBcnCredsAsync(bcnRowKey, clientId);

            if (current != null)
            {
                return(current.AssetAddress);
            }

            string address = null;

            if (string.IsNullOrEmpty(asset.BlockchainIntegrationLayerId))
            {
                var walletCreds = await _firstGenerationBlockchainWalletRepository.GetAsync(clientId);

                address = asset.Blockchain != Blockchain.Ethereum
                    ? (walletCreds?.GetDepositAddressForAsset(asset.Id) ??
                       await ObsoleteGenerateAddress(assetId, clientId))
                    : null;
                if (address == null)
                {
                    EthereumResponse <GetContractModel> assetAddress;

                    #region Generate ETH key for erc223 deposit address

                    var key           = Nethereum.Signer.EthECKey.GenerateKey();
                    var publicAddress = key.GetPublicAddress().ToLower();

                    #endregion

                    if (!isErc20)
                    {
                        throw new NotImplementedException("Can't create ETH deposit yet");
                        //assetAddress = await _srvEthereumHelper.GetContractAsync(asset.Id,
                        //    request.BcnWallet.Address);
                    }
                    else
                    {
                        //Get erc20 deposit address here!
                        assetAddress = await _srvEthereumHelper.GetErc20DepositContractAsync(publicAddress);
                    }

                    if (assetAddress.HasError)
                    {
                        throw new Exception(assetAddress.Error.ToJson());
                    }

                    address = assetAddress.Result.Contract;

                    await _firstGenerationBlockchainWalletRepository.SaveAsync(new BcnCredentialsRecord
                    {
                        Address      = publicAddress,
                        AssetAddress = address?.ToLower(),
                        ClientId     = clientId.ToString(),
                        EncodedKey   = "",       //request.BcnWallet.EncodedKey,
                        PublicKey    = "",       //request.BcnWallet.PublicKey,
                        AssetId      = bcnRowKey //Or Asset or Erc20 const
                    });
                }
            }

            return(address);
        }