app/models/wallet.rb
# Returns current active deposit wallet per network
Returns current active deposit wallet per network
Returns current active deposit wallet per network
def active_deposit_wallet(currency_id, blockchain_key=nil)
      if blockchain_key
        Wallet.active.deposit.joins(:currencies).find_by(currencies: { id: currency_id }, blockchain_key: blockchain_key)
      else
        Wallet.active.deposit.joins(:currencies).find_by(currencies: { id: currency_id })
      end
    end
def active_deposit_wallet ( currency_id , blockchain_key = nil ) if blockchain_key Wallet . active . deposit . joins ( :currencies ) . find_by ( currencies : { id : currency_id } , blockchain_key : blockchain_key ) else Wallet . active . deposit . joins ( :currencies ) . find_by ( currencies : { id : currency_id } ) end end
Returns current active deposit wallet per network
Returns current active deposit wallet per network
currency_id
blockchain_key