lib/peatio/opendax_cloud/wallet.rb
# This method will translate deposit/withdraw states
# to transaction states (rejected, success, penging, rejected)
This method will translate deposit/withdraw states
to transaction states (rejected, success, penging, rejected)
This method will translate deposit / withdraw states to transaction states ( rejected success penging rejected )
def translate_state(event, state)
      states = OpendaxCloud::Wallet.const_get("#{event.upcase}_TRANSACTION_STATE_TRANSLATIONS")
      res = states.find { |key, values| values.include?(state) }
      res.first if res.present?
    end
def translate_state ( event , state ) states = OpendaxCloud :: Wallet . const_get ( "#{event.upcase}_TRANSACTION_STATE_TRANSLATIONS" ) res = states . find { | key , values | values . include? ( state ) } res . first if res . present? end
This method will translate deposit/withdraw states
to transaction states (rejected, success, penging, rejected)
This method will translate deposit / withdraw states to transaction states ( rejected success penging rejected )
# Get transaction state translation which depends on event # result consists of array [key, [values]]
event
state