Browse Source

Implemented update_required for BitcoinCash and BitcoinCashTestnet (#717)

Anti-phishing:

If the client version < 3.3.4, will return the error message telling
user to upgrade at electroncash.org
patch-2
Calin Culianu 6 years ago
committed by Neil
parent
commit
6cee15544f
  1. 22
      electrumx/lib/coins.py

22
electrumx/lib/coins.py

@ -403,6 +403,17 @@ class BitcoinCash(BitcoinMixin, Coin):
]
BLOCK_PROCESSOR = block_proc.LTORBlockProcessor
@classmethod
def upgrade_required(cls, client_ver):
if client_ver < (3, 3, 4):
return ('<br/><br/>'
'Your transaction was successfully broadcast.<br/><br/>'
'However, you are using a VULNERABLE version of Electron Cash.<br/>'
'Download the latest version from this web site ONLY:<br/>'
'https://electroncash.org/'
'<br/><br/>')
return False
class BitcoinSegwit(BitcoinMixin, Coin):
NAME = "BitcoinSegwit"
@ -600,6 +611,17 @@ class BitcoinCashTestnet(BitcoinTestnetMixin, Coin):
]
BLOCK_PROCESSOR = block_proc.LTORBlockProcessor
@classmethod
def upgrade_required(cls, client_ver):
if client_ver < (3, 3, 4):
return ('<br/><br/>'
'Your transaction was successfully broadcast.<br/><br/>'
'However, you are using a VULNERABLE version of Electron Cash.<br/>'
'Download the latest version from this web site ONLY:<br/>'
'https://electroncash.org/'
'<br/><br/>')
return False
class BitcoinSVRegtest(BitcoinSVTestnet):
NET = "regtest"

Loading…
Cancel
Save