public static Task <ApiResponse <WalletAddressesResult> > GetDepositAddressesAsync(IDepositProvider provider, WalletAddressAssetContext context) { // TODO: HH: review. //if (provider.CanGenerateDepositAddress && !provider.CanPeekDepositAddress) // throw new Exception($"{provider.Title} cannot 'peek' deposit addresses."); return(ApiHelpers.WrapExceptionAsync(() => provider.GetAddressesForAssetAsync(context), nameof(GetDepositAddresses), provider, context)); }
private void GetAddressesForAsset(IDepositProvider provider, WalletAddressAssetContext context) { if (context == null) { return; } var r = AsyncContext.Run(() => provider.GetAddressesForAssetAsync(context)); Assert.IsTrue(r != null); Trace.WriteLine($"Deposit addresses for {context.Asset}:"); foreach (var walletAddress in r) { Trace.WriteLine($"\"{walletAddress.Address}\""); } }