lib/peatio/goldcash/hooks.rb in peatio-goldcash-2.6.6 vs lib/peatio/goldcash/hooks.rb in peatio-goldcash-2.6.7

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Peatio module Goldcash module Hooks BLOCKCHAIN_VERSION_REQUIREMENT = "~> 1.0.0" WALLET_VERSION_REQUIREMENT = "~> 1.0.0" @@ -10,30 +12,30 @@ .satisfied_by?(Gem::Version.new(Peatio::Blockchain::VERSION)) [ "Goldcash blockchain version requiremnt was not suttisfied by Peatio::Blockchain.", "Goldcash blockchain requires #{BLOCKCHAIN_VERSION_REQUIREMENT}.", "Peatio::Blockchain version is #{Peatio::Blockchain::VERSION}" - ].join('\n').tap { |s| Kernel.abort s } + ].join('\n').tap {|s| Kernel.abort s } end unless Gem::Requirement.new(WALLET_VERSION_REQUIREMENT) .satisfied_by?(Gem::Version.new(Peatio::Wallet::VERSION)) [ "Goldcash wallet version requiremnt was not suttisfied by Peatio::Wallet.", "Goldcash wallet requires #{WALLET_VERSION_REQUIREMENT}.", "Peatio::Wallet version is #{Peatio::Wallet::VERSION}" - ].join('\n').tap { |s| Kernel.abort s } + ].join('\n').tap {|s| Kernel.abort s } end end def register - Peatio::Blockchain.registry[:goldcash] = Goldcash::Blockchain - Peatio::Wallet.registry[:goldcashd] = Goldcash::Wallet + Peatio::Blockchain.registry[:goldcashcash] = Goldcash::Blockchain + Peatio::Wallet.registry[:goldcashcashd] = Goldcash::Wallet end end if defined?(Rails::Railtie) - require "peatio/goldcash/railtie" + require "peatio/goldcashcash/railtie" else check_compatibility register end end