Class: Launchpad::IEO::SalePair

Inherits:
ApplicationRecord show all
Defined in:
app/models/launchpad/ieo/sale_pair.rb

Overview

TODO: We need to validate that currency exists on peatio side on sale creation step.

Instance Method Summary collapse

Instance Method Details

#enqueue_list_jobObject



59
60
61
# File 'app/models/launchpad/ieo/sale_pair.rb', line 59

def enqueue_list_job
  Launchpad::IEO::SalePairListWorker.perform_async(to_sgid(for: "sale_pair_list"))
end

#list_marketObject

Instance Methods =====================================================



52
53
54
55
56
57
# File 'app/models/launchpad/ieo/sale_pair.rb', line 52

def list_market
  Peatio::ManagementAPIV2::Client.new.update_market(
    id:    sale.currency_id + quote_currency_id,
    state: "enabled"
  )
end