diff --git a/lib/ckb/types/address_info.rb b/lib/ckb/types/address_info.rb index 9fdebebd..b371a2e0 100644 --- a/lib/ckb/types/address_info.rb +++ b/lib/ckb/types/address_info.rb @@ -22,8 +22,6 @@ def to_h def self.from_h(hash) return if hash.nil? - return hash if hash.is_a?(self.class) - new( address: hash[:address], score: hash[:score] diff --git a/lib/ckb/types/peer.rb b/lib/ckb/types/peer.rb index da2df778..973df9e6 100644 --- a/lib/ckb/types/peer.rb +++ b/lib/ckb/types/peer.rb @@ -28,8 +28,6 @@ def to_h def self.from_h(hash) return if hash.nil? - return hash if hash.is_a?(self.class) - new( addresses: hash[:addresses].map { |addr| AddressInfo.from_h(addr) }, is_outbound: hash[:is_outbound], diff --git a/lib/ckb/types/tx_pool_info.rb b/lib/ckb/types/tx_pool_info.rb index 5c1aa0ca..f77cf3ae 100644 --- a/lib/ckb/types/tx_pool_info.rb +++ b/lib/ckb/types/tx_pool_info.rb @@ -28,8 +28,6 @@ def to_h def self.from_h(hash) return if hash.nil? - return hash if hash.is_a?(self.class) - new( pending: hash[:pending], staging: hash[:staging],