recover wallet in electrum from hex mpk
The problem is based on the generating method I used from the the Bitwasp library.

$key = PrivateKeyFactory::fromHex($hex, true);
$wif = $key-&gt;toWif();


Will return a WIF assuming the hex key was compressed. Restoring the history while importin in electrum failed.

$key = PrivateKeyFactory::fromHex($hex, false);
$wif = $key-&gt;toWif();


Will return a WIF from an uncompressed hex key an electrum was able to restore the history of the address.