Commit 1f9387b4 authored by shajiaiming's avatar shajiaiming

fix

parent 95e79695
...@@ -111,7 +111,7 @@ class WalletController extends BaseController ...@@ -111,7 +111,7 @@ class WalletController extends BaseController
} }
$service = new Chain33Service($node); $service = new Chain33Service($node);
$address[] = $token; $address[] = $token;
$result = $service->getBalance($address, $platform->exer, $symbol); $result = $service->getTokenBalance($address, $platform->exer, $symbol);
if (0 !== $result['code']) { if (0 !== $result['code']) {
$msg = '当前发币人数过多,请客官稍后再试'; $msg = '当前发币人数过多,请客官稍后再试';
$code = -1; $code = -1;
......
...@@ -256,18 +256,25 @@ class Chain33Service ...@@ -256,18 +256,25 @@ class Chain33Service
return $this->send($params, 'Chain33.Query'); return $this->send($params, 'Chain33.Query');
} }
public function getBalance($address, $execer, $tokenSymbol = '') public function getBalance($address, $execer)
{ {
$params = [ $params = [
'addresses' => $address, 'addresses' => $address,
'execer' => $execer, 'execer' => $execer,
]; ];
if (!empty($tokenSymbol)) {
$params = array_merge($params, ['tokenSymbol' => $tokenSymbol]);
}
return $this->send($params, 'Chain33.GetBalance'); return $this->send($params, 'Chain33.GetBalance');
} }
public function getTokenBalance($address, $execer, $tokenSymbol)
{
$params = [
'addresses' => $address,
'execer' => $execer,
'tokenSymbol' => $tokenSymbol
];
return $this->send($params, 'token.GetTokenBalance');
}
public function createNoBalanceTransaction($txHex, $payAddr, $privkey) public function createNoBalanceTransaction($txHex, $payAddr, $privkey)
{ {
$params = [ $params = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment