module Peatio::Ripple::Hooks

Public Class Methods

check_compatibility() click to toggle source
# File lib/peatio/ripple/hooks.rb, line 5
def check_compatibility
  if Peatio::Blockchain::VERSION >= '2.0'
    [
      "Ripple plugin was designed for work with 1.x. Blockchain.",
      "You have #{Peatio::Ripple::Blockchain::VERSION}."
    ].join('\n').tap { |s| Kernel.abort s }
  end

  if Peatio::Wallet::VERSION >= '2.0'
    [
      "Ripple plugin was designed for work with 1.x. Wallet.",
      "You have #{Peatio::Ripple::Wallet::VERSION}."
    ].join('\n').tap { |s| Kernel.abort s }
  end
end
register() click to toggle source
# File lib/peatio/ripple/hooks.rb, line 21
def register
  Peatio::Blockchain.registry[:ripple] = Ripple::Blockchain
  Peatio::Wallet.registry[:rippled] = Ripple::Wallet
end