giekaton / php-metamask-user-login

Web3 passwordless user login with MetaMask and PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pubKeyToAddress

Cryptdk opened this issue · comments

The login stopped working yesterday, seems to stop at pubKeyToAddress
When it tells you what you sign it just returns

You are signing:
Message:
0x

// Check if the message was signed with the same private key to which the public address belongs
function pubKeyToAddress($pubkey) {
return "0x" . substr(Keccak::hash(substr(hex2bin($pubkey->encode("hex")), 1), 256), 24);
}

Fix for Issue #20 also fixed this issue!
Thank you giekaton !