Nethereum / Nethereum.SimpleWindowsWallet

Simple Windows Wallet Sample using Reactive UI
MIT License
40 stars 26 forks source link

Private Key Import is expecting a file with a JSON string but Metamask only produces a simple hex string in the file it exports #1

Open mwherman2000 opened 6 years ago

mwherman2000 commented 6 years ago

I'm using Metamask to export my private key. It exports it as a simple hex string of characters - not a JSON structure.

The Wallet expects a JSON formatted private key.

Can you add support for the Metamask formatted private key?

Best regards, Michael Herman (Toronto)

mwherman2000 commented 6 years ago

HACK: as QnD workaround, I made the following change to LoadPrivateKey() and it worked:

// var privateKey = service.DecryptKeyStoreFromJson(Password, json).ToHex(); string privateKey = json; // HACK: works for Metamask exported private keys

juanfranblanco commented 6 years ago

Hmmm when you export a private key from metamask you get the private key. Not the KeyStore file.