app/models/wallet.rb
def deposit_wallets(currency_id, blockchain_key=nil)
      if blockchain_key
        Wallet.active_retired.deposit.joins(:currencies).where(currencies: { id: currency_id }, blockchain_key: blockchain_key)
      else
        Wallet.active_retired.deposit.joins(:currencies).where(currencies: { id: currency_id })
      end
    end
# Returns active/retired deposit wallets per network
Returns active/retired deposit wallets per network
Returns active / retired deposit wallets per network
def deposit_wallets(currency_id, blockchain_key=nil)
      if blockchain_key
        Wallet.active_retired.deposit.joins(:currencies).where(currencies: { id: currency_id }, blockchain_key: blockchain_key)
      else
        Wallet.active_retired.deposit.joins(:currencies).where(currencies: { id: currency_id })
      end
    end
def deposit_wallets ( currency_id , blockchain_key = nil ) if blockchain_key Wallet . active_retired . deposit . joins ( :currencies ) . where ( currencies : { id : currency_id } , blockchain_key : blockchain_key ) else Wallet . active_retired . deposit . joins ( :currencies ) . where ( currencies : { id : currency_id } ) end end
Returns active/retired deposit wallets per network
Returns active / retired deposit wallets per network
currency_id
blockchain_key