Bitcoin Forum

Bitcoin => Electrum => Topic started by: dkbit98 on January 27, 2021, 12:05:09 PM



Title: Electrum Wallet Bitcoin Whitepaper
Post by: dkbit98 on January 27, 2021, 12:05:09 PM
Github member CodeForcer suggested to allow people to download Bitcoin whitepaper from the blockchain using Electrum, and very quickly commit d7515b9 was created and from next Electrum release everyone will be able to view and download Bitcoin whitepaper directly from Electrum wallet.

Perfect reply for pathetic CSW Faketoshi  :D

Code:
        help_menu.addAction(_("&Official website"), lambda: webopen("https://electrum.org"))
        help_menu.addSeparator()
        help_menu.addAction(_("&Documentation"), lambda: webopen("http://docs.electrum.org/")).setShortcut(QKeySequence.HelpContents)
        help_menu.addAction(_("&Bitcoin Paper"), self.show_bitcoin_paper)
        help_menu.addAction(_("&Report Bug"), self.show_report_bug)
        help_menu.addSeparator()
        help_menu.addAction(_("&Donate to server"), self.donate_to_server)
@@ -790,6 +791,17 @@ def show_about(self):
                              "servers that handle the most complicated parts of the Bitcoin system.") + "\n\n" +
                           _("Uses icons from the Icons8 icon pack (icons8.com).")))

    def show_bitcoin_paper(self):
        filename = os.path.join(self.config.path, 'bitcoin.pdf')
        if not os.path.exists(filename):
            s = self.network.run_from_another_thread(
                self.network.get_transaction("54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713"))
            s = s.split("0100000000000000")[1:-1]
            out = ''.join(x[6:136] + x[138:268] + x[270:400] if len(x) > 136 else x[6:] for x in s)[16:-20]
            with open(filename, 'wb') as f:
                f.write(bytes.fromhex(out))
        webopen('file:///' + filename)

    def show_update_check(self, version=None):
        self.gui_object._update_check = UpdateCheck(latest_version=version)
https://github.com/spesmilo/electrum/issues/6970


Title: Re: Electrum Wallet Bitcoin Whitepaper
Post by: hugeblack on January 27, 2021, 01:59:40 PM
A good start but an estimated percentage of beginners will not benefit from reading the white paper or at least you will not be interested in reading it.
Perhaps such an addition would open the way for adding links to help, whether it was redirected to this forum or another reliable forum.

Quote
Perfect reply for pathetic CSW Faketoshi
It's 2021, nobody believes such claims.


Title: Re: Electrum Wallet Bitcoin Whitepaper
Post by: NotATether on January 27, 2021, 04:47:37 PM
I don't see the point of this commit? It's not even linking to https://bitcoin.org/bitcoin.pdf, it is fetching an arbitrary transaction which may have the white paper embedded inside. It's not even guaranteed to be valid PDF if the transaction contents are just a copy of the URL I posted, because the way it's being parsed opens it to all kinds of strange errors that people will have a hard time solving.

I commented (https://github.com/spesmilo/electrum/issues/6970#issuecomment-768417002) on the related issue and might submit a patch to just open a link to the PDF on bitcoin.org if necessary.

EDIT: I managed to convince someone to add error handling to this commit, that's good enough.