lib/bitcoin/payment_code.rb in bitcoinrb-1.2.1 vs lib/bitcoin/payment_code.rb in bitcoinrb-1.3.0
- old
+ new
@@ -59,10 +59,10 @@
payment_code = hex[0...-8]
raise ArgumentError, 'invalid version byte' unless hex[0..1] == VERSION_BYTE
raise ArgumentError, 'invalid version' unless PaymentCode.support_version?(version)
raise ArgumentError, 'invalid sign' unless PaymentCode.support_sign?(sign)
- raise ArgumentError, Errors::Messages::INVALID_PUBLIC_KEY unless Bitcoin::Key.new(priv_key: nil, pubkey: sign + public_key).fully_valid_pubkey?
+ raise ArgumentError, Errors::Messages::INVALID_PUBLIC_KEY unless Bitcoin::Key.new(pubkey: sign + public_key).fully_valid_pubkey?
raise ArgumentError, Errors::Messages::INVALID_CHECKSUM unless Bitcoin.calc_checksum(payment_code) == hex[-8..-1]
x_value = payment_code[8..71]
chain_code_hex = payment_code[72..135]
\ No newline at end of file