app/models/member.rb
def payment_address!(wallet_id)
    wallet = Wallet.find(wallet_id)

    return if wallet.blank?

    pa = PaymentAddress.find_by(member: self, wallet: wallet)

    # The address generation process is in progress.
    if pa.address.blank?
      pa
    else
      # allows user to have multiple addresses.
      pa = payment_addresses.create!(wallet: wallet)
    end
    pa
  end
# Attempts to create additional deposit address for account.
Attempts to create additional deposit address for account.
Attempts to create additional deposit address for account .
def payment_address!(wallet_id)
    wallet = Wallet.find(wallet_id)
    return if wallet.blank?
    pa = PaymentAddress.find_by(member: self, wallet: wallet)
    if pa.address.blank?
      pa
    else
      pa = payment_addresses.create!(wallet: wallet)
    end
    pa
  end
def payment_address! ( wallet_id ) wallet = Wallet . find ( wallet_id ) return if wallet . blank? pa = PaymentAddress . find_by ( member : self , wallet : wallet ) if pa . address . blank? pa else pa = payment_addresses . create! ( wallet : wallet ) end pa end
Attempts to create additional deposit address for account.
Attempts to create additional deposit address for account .
# The address generation process is in progress. # allows user to have multiple addresses.
wallet_id