We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbe545c commit e75cd7bCopy full SHA for e75cd7b
lib/mastercoin-wallet/gui/first_run_window.rb
@@ -82,10 +82,15 @@ def on_private_key_input_textChanged(text)
82
@address = Bitcoin::Key.from_base58(@priv_key).addr
83
@address_label.setText("Address for private key: #{@address}")
84
check_valid
85
- rescue RuntimeError
86
- @address = nil
87
- @address_label.setText("Cannot get Bitcoin address from private key.")
88
- invalid!
+ rescue ArgumentError, RuntimeError, OpenSSL::BNError
+ begin
+ @address = Bitcoin::Key.new(@priv_key).addr
+ @address_label.setText("Address for private key: #{@address}")
89
+ check_valid
90
+ rescue RuntimeError, OpenSSL::BNError
91
+ @address_label.setText("Cannot get Bitcoin address from private key.")
92
+ invalid!
93
+ end
94
end
95
96
0 commit comments