|
@@ -280,9 +280,9 @@ class Account extends Model {
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
public static function verifyEth($account, $data, $signed) {
|
|
public static function verifyEth($account, $data, $signed) {
|
|
- $hash = Utils::hashPersonalMessage($data);
|
|
|
|
|
|
+ $hash = Utils::hashPersonalMessage(Utils::strToHex($data));
|
|
|
|
|
|
- $messageGmp = gmp_init($hash);
|
|
|
|
|
|
+ $messageGmp = gmp_init("0x" . $hash);
|
|
$rHex = substr($signed, 2, 64);
|
|
$rHex = substr($signed, 2, 64);
|
|
$sHex = substr($signed, 66, 64);
|
|
$sHex = substr($signed, 66, 64);
|
|
$vValue = hexdec(substr($signed, 130, 2));
|
|
$vValue = hexdec(substr($signed, 130, 2));
|