This commit is contained in:
aozhiwei 2022-02-22 10:45:42 +08:00
parent ab6296a0b4
commit fe6ba3fbc1
2 changed files with 2 additions and 4 deletions

View File

@ -27,7 +27,6 @@ class Market(object):
'url': 'webapp/index.php?c=Market&a=auth', 'url': 'webapp/index.php?c=Market&a=auth',
'params': [ 'params': [
['account', '', '钱包账号'], ['account', '', '钱包账号'],
['version', '', '版本号'],
['nonce', '', 'nonce'], ['nonce', '', 'nonce'],
['signature', '', '签名'], ['signature', '', '签名'],
['net_id', '', '网络id'], ['net_id', '', '网络id'],

View File

@ -468,13 +468,12 @@ class MarketController extends BaseController {
public function auth() public function auth()
{ {
$version = getReqVal('version', ''); $account = getReqVal('account', '');
$nonce = getReqVal('nonce', ''); $nonce = getReqVal('nonce', '');
$signature = getReqVal('signature', ''); $signature = getReqVal('signature', '');
$params = array( $params = array(
'c' => 'BcService', 'c' => 'BcService',
'a' => 'authVerifySignature', 'a' => 'authVerifySignature',
'version' => $version,
'nonce' => $nonce, 'nonce' => $nonce,
'signature' => $signature 'signature' => $signature
); );
@ -500,7 +499,7 @@ class MarketController extends BaseController {
return; return;
} else { } else {
$recovered = getXVal($data, 'recovered', ''); $recovered = getXVal($data, 'recovered', '');
if (!phpcommon\isSameAddress($recovered, $buyerAddress)) { if (!phpcommon\isSameAddress($recovered, $account)) {
myself()->_rspErr(1, 'Signature verification failed'); myself()->_rspErr(1, 'Signature verification failed');
die(); die();
return; return;