Electron-cash: Testnet wallet restore should accept tpub/tprv HD keys

Created on 24 Jan 2019  路  2Comments  路  Source: Electron-Cash/Electron-Cash

When running the UI in testnet mode, the wallet restore option only accepts xpub/xprv master public/private keys. However, it generates testnet addresses correctly (i.e. starting with m or n instead of 1).

This suggests that even though the master keys are accepted with the MainNet HD public/private key IDs, the subsequent HD key derivation applies TestNet3 public/private key IDs correctly.

Same issue results when restoring a wallet from the command line using electron-cash restore -w wallet_file xpubkey.

It would be preferable to accept tpub/tprv master keys for HD wallet restore operations.

bug

All 2 comments

Yeah, you're probably right. Will look into it.

Ok -- you were right. Testnet was using wrong bip32 key headers. I have fixed this now in git master.

Thanks so very much for catching this one! I didn't notice -- and neither did other people. It's really good you caught it. THANK YOU!! @leevlad !!

Was this page helpful?
0 / 5 - 0 ratings