Electrum TESTNET public key I'm running Electrum in test mode (electrum --testnet) and have therefore created a new wallet for it. I've also successfully received some coins via Faucet. But when checking the public key for the wallet, it starts with xpub, which doesn't make sense as according to this site it should start with tpub. How can I get the right public key, as I need it for some online service (mycelium GEAR) and it's complaining that this is a key for MAINNET.
This looks like a bug in Electrum's software.

What you can do is manually convert the encoding to match Testnet's encoding. 


Go to http://lenschulwitz.com/base58 and enter the master public key into the Base58 Decoder
Take the hex and change the first four bytes (first 8 characters) to match the testnet prefix: 043587CF.
Remove the last 4 bytes (last 8 characters) from the hex string.
Copy the modified hex and go to http://www.fileformat.info/tool/hash.htm. Enter the copied hex string into the Hex String field under Binary Hash and click Hash.
Scroll down and copy the SHA256 hash. Enter that copied hash into the Hex String field under Binary Hash and click Hash.
Scroll down and copy the first four bytes (first 8 characters) of the SHA256 hash.
Append the four copied bytes onto the end of the modified hex string from earlier.
Enter the full modified hex string (with changed prefix and changed suffix) into the Base58 encoder on http://lenschulwitz.com/base58 and Encode it. The result will be a tpub which is valid.