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