@@ -125,18 +125,28 @@ def get_xpub(self, bip32_path, xtype):
125125 raise UserFacingException (_ ('This device does not reveal xpubs corresponding to non-hardened paths' ))
126126
127127 reply = self ._get_xpub (bip32_path )
128- if reply :
129- xpub = reply ['xpub' ]
130- # Change type of xpub to the requested type. The firmware
131- # only ever returns the mainnet standard type, but it is agnostic
132- # to the type when signing.
133- if xtype != 'standard' or constants .net .TESTNET :
134- node = BIP32Node .from_xkey (xpub , net = constants .BitcoinMainnet )
135- xpub = node ._replace (xtype = xtype ).to_xpub ()
136- return xpub
137- else :
128+ if not reply :
138129 raise Exception ('no reply' )
139130
131+ xpub = reply ['xpub' ]
132+ # Change type of xpub to the requested type. The firmware
133+ # only ever returns the mainnet standard type, but it is agnostic
134+ # to the type when signing.
135+ if xtype != 'standard' or constants .net .TESTNET :
136+ node = BIP32Node .from_xkey (xpub , net = constants .BitcoinMainnet )
137+ xpub = node ._replace (xtype = xtype ).to_xpub ()
138+
139+ deprecation_warning = (
140+ "DigitalBitbox (BitBox01) is being deprecated.\n \n It is no longer supported by the manufacturer.\n "
141+ "Future versions of Electrum will no longer be compatible with it.\n \n "
142+ "You should move your coins and migrate to a modern hardware device." )
143+ _logger .warning (deprecation_warning .replace ("\n " , " " ))
144+
145+ if self .handler :
146+ self .handler .show_message (deprecation_warning )
147+
148+ return xpub
149+
140150 def get_soft_device_id (self ):
141151 return None
142152
0 commit comments