public (string assetId, string address, string addressExtension, double minCashOut) GetBlockchainCashoutData(BlockchainSettings blockchain) { try { var currentAsset = lykkePrivateApi.Assets.GetAssets().GetResponseObject().FirstOrDefault(a => { if (a.BlockchainIntegrationLayerId != null) { return(a.BlockchainIntegrationLayerId.ToString().ToLower() == blockchain.Type.ToLower()); } else { return(false); } }); var currentAssetId = currentAsset?.Id; var minCashout = currentAsset?.CashoutMinimalAmount; blockchain.SignServiceUrl = blockchain.SignServiceUrl.TrimEnd('/'); blockchainSign = new BlockchainSign(blockchain.SignServiceUrl + "/api"); WalletCreationResponse wallet = blockchainSign.PostWallet().GetResponseObject(); return(currentAssetId, wallet.PublicAddress, wallet.AddressContext, minCashout.Value); } catch (Exception e) { return($"error with {blockchain.Type}", $"error with {blockchain.Type}", $"error with {blockchain.Type}", 0); } }
public void SetUp() { wallet = Wallets().Dequeue(); TestContext.Out.WriteLine($"wallet {wallet.PublicAddress} balance: {blockchainApi.Balances.GetBalances("500", null).GetResponseObject().Items.FirstOrDefault(w => w.Address == wallet.PublicAddress)?.Balance}"); }
public void SetUp() { wallet = Wallets().Dequeue(); TestContext.Out.WriteLine($"wallet {wallet.PublicAddress} balance: {blockchainApi.Balances.GetBalances("500", null).GetResponseObject().Items.FirstOrDefault(w => w.Address == wallet.PublicAddress)?.Balance}"); Assert.That(blockchainApi.Balances.GetBalances("500", null).GetResponseObject().Items.FirstOrDefault(w => w.Address == wallet.PublicAddress)?.Balance, Is.Not.Null.Or.Empty.And.Not.EqualTo("0"), "Unxpected balance"); }
public void SetUp() { wallet = blockchainSign.PostWallet().GetResponseObject(); }