private void SetAndCheckCryptocurrencyAddress() { var WalletAddressCryptocurrencyType = SelectedCryptocurrency; cryptocurrencyAddress = CryptocurrencyWithdrawalAddress.GetAddress(Member.CurrentId, WalletAddressCryptocurrencyType); if (cryptocurrencyAddress != null) { WithdrawCryptocurrencyAddressTextBox.Text = cryptocurrencyAddress.Address; if (SelectedCryptocurrency == CryptocurrencyType.XRP) { var rippleAddress = RippleAddress.FromString(WithdrawCryptocurrencyAddressTextBox.Text); WithdrawCryptocurrencyAddressTextBox.Text = rippleAddress.ToDisplayString(); } ChangeCryptocurrencyAddressButton.Text = U6007.CHANGE; } else { ChangeCryptocurrencyAddressButton.Text = L1.ADDNEW; } }
protected void PaymentSettingsView_Activate(object sender, EventArgs e) { tokenImage.ImageUrl = AppSettings.Ethereum.ERC20TokenImageUrl; //Coinbase addresses policy if (BtcCryptocurrency.WithdrawalApiProcessor == CryptocurrencyAPIProvider.Coinbase) { switch (AppSettings.Cryptocurrencies.CoinbaseAddressesPolicy) { case CoinbaseAddressesPolicy.BTCWallet: BtcAddressTextBox.Text = CoinbaseAddressHelper.GetAddress(User.Id); break; case CoinbaseAddressesPolicy.CoinbaseEmail: SetCoinbaseEmailControls(); btcSettings.Visible = false; break; case CoinbaseAddressesPolicy.CoinbaseEmailOrBTCWallet: SetCoinbaseEmailControls(); BtcAddressTextBox.Text = CoinbaseAddressHelper.GetAddress(User.Id, 2); CoinbaseEmailTextBox.Text = CoinbaseAddressHelper.GetAddress(User.Id, 1); break; } } else { var currentAddress = CryptocurrencyWithdrawalAddress.GetAddress(User.Id, CryptocurrencyType.BTC); if (currentAddress != null) { BtcAddressTextBox.Text = currentAddress.Address; } else { BtcAddressWarning.Visible = false; } //Ripple if (XrpCryptocurrency.WithdrawalEnabled) { var currentRippleAddress = CryptocurrencyWithdrawalAddress.GetAddress(User.Id, CryptocurrencyType.XRP); if (currentRippleAddress != null) { var rippleAddress = RippleAddress.FromString(currentRippleAddress.Address); XrpAddressTextBox.Text = rippleAddress.Address; XrpDestTagTextBox.Text = rippleAddress.DestinationTag; } else { XrpAddressWarning.Visible = false; } } } //Ethereum if (EthCryptocurrency.WithdrawalEnabled) { var currentEthereumAddress = CryptocurrencyWithdrawalAddress.GetAddress(User.Id, CryptocurrencyType.ETH); if (currentEthereumAddress != null) { EthAddressTextBox.Text = currentEthereumAddress.Address; } else { EthAddressWarning.Visible = false; } } }