File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -874,13 +874,22 @@ def show_about(self):
874874 def show_bitcoin_paper (self ):
875875 filename = os .path .join (self .config .path , 'bitcoin.pdf' )
876876 if not os .path .exists (filename ):
877- s = self ._fetch_tx_from_network ("54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713" )
878- if not s :
879- return
880- s = s .split ("0100000000000000" )[1 :- 1 ]
881- out = '' .join (x [6 :136 ] + x [138 :268 ] + x [270 :400 ] if len (x ) > 136 else x [6 :] for x in s )[16 :- 20 ]
882- with open (filename , 'wb' ) as f :
883- f .write (bytes .fromhex (out ))
877+ def fetch_bitcoin_paper ():
878+ s = self ._fetch_tx_from_network ("54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713" )
879+ if not s :
880+ return
881+ s = s .split ("0100000000000000" )[1 :- 1 ]
882+ out = '' .join (x [6 :136 ] + x [138 :268 ] + x [270 :400 ] if len (x ) > 136 else x [6 :] for x in s )[16 :- 20 ]
883+ with open (filename , 'wb' ) as f :
884+ f .write (bytes .fromhex (out ))
885+ WaitingDialog (
886+ self ,
887+ _ ("Fetching Bitcoin Paper..." ),
888+ fetch_bitcoin_paper ,
889+ on_success = lambda _ : webopen ('file:///' + filename ),
890+ on_error = self .on_error ,
891+ )
892+ return
884893 webopen ('file:///' + filename )
885894
886895 def show_update_check (self , version = None ):
You can’t perform that action at this time.
0 commit comments