blockcypher / ruby-client

Ruby SDK for BlockCypher
Apache License 2.0
45 stars 54 forks source link

objc error in send_money() method #39

Open 5anchezzz opened 4 years ago

5anchezzz commented 4 years ago

When I use send_money() method and pass all of required params (from_address as string, to_address as string, satoshi_amount as integer, private_key as string), then get an error:

objc[62090]: +[NSString initialize] may have been in progress in another thread when fork() was called.
objc[62090]: +[NSString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

It looks like the reason for the error is in the nested method signer(). The same error when I call it through the console

    def signer(private_key, tosign)
      key = Bitcoin::Key.new(private_key, nil, compressed = true)
      signatures = []
      tosign.each do |to_sign_hex|
        to_sign_binary = [to_sign_hex].pack('H*')
        sig_binary = key.sign(to_sign_binary)
        sig_hex = sig_binary.unpack1('H*')
        signatures << sig_hex
      end
      signatures
    end

photo_2020-06-09_21-47-17

quentinlesceller commented 4 years ago

I'll have a look. Thank for notifying us.

Demas2117 commented 2 weeks ago

⁹hg