app/models/deposit.rb
# Creates dependant operations for deposit.
Creates dependant operations for deposit.
Creates dependant operations for deposit .
def record_submit_operations!
    transaction do
      Operations::Asset.credit!(
        amount: amount + fee,
        currency: currency,
        reference: self
      )
      Operations::Revenue.credit!(
        amount: fee,
        currency: currency,
        reference: self,
        member_id: member_id
      )
      locked_kind_check = currency.coin? && (Peatio::App.config.deposit_funds_locked || Peatio::App.config.manual_deposit_approval)
      kind = locked_kind_check ? :locked : :main
      Operations::Liability.credit!(
        amount: amount,
        currency: currency,
        reference: self,
        member_id: member_id,
        kind: kind
      )
    end
  end
def record_submit_operations! transaction do Operations :: Asset . credit! ( amount : amount + fee , currency : currency , reference : self ) Operations :: Revenue . credit! ( amount : fee , currency : currency , reference : self , member_id : member_id ) locked_kind_check = currency . coin? && ( Peatio :: App . config . deposit_funds_locked || Peatio :: App . config . manual_deposit_approval ) kind = locked_kind_check ? :locked : :main Operations :: Liability . credit! ( amount : amount , currency : currency , reference : self , member_id : member_id , kind : kind ) end end
Creates dependant operations for deposit.
Creates dependant operations for deposit .
# Credit main fiat/crypto Asset account. # Credit main fiat/crypto Revenue account. # Credit locked fiat/crypto Liability account.