|
@@ -457,20 +457,16 @@ class WalletService extends BaseService
|
|
|
$limit = ConfigService::make()->getConfigByCode('wallet_listen_limit', 300);
|
|
$limit = ConfigService::make()->getConfigByCode('wallet_listen_limit', 300);
|
|
|
$limit = $limit>10 && $limit <=500? $limit : 200;
|
|
$limit = $limit>10 && $limit <=500? $limit : 200;
|
|
|
$url = sprintf($this->apiUrls['transactions'], $address, $limit, $accountType==2? 'false': 'true', $accountType==2?'true':'false');
|
|
$url = sprintf($this->apiUrls['transactions'], $address, $limit, $accountType==2? 'false': 'true', $accountType==2?'true':'false');
|
|
|
-
|
|
|
|
|
- var_dump($this->config['tron_api_url'] . $url);
|
|
|
|
|
$result = curl_get($this->config['tron_api_url'] . $url, [], $headers, 5);
|
|
$result = curl_get($this->config['tron_api_url'] . $url, [], $headers, 5);
|
|
|
- var_dump($result);
|
|
|
|
|
$result = $result ? json_decode($result, true) : [];
|
|
$result = $result ? json_decode($result, true) : [];
|
|
|
$datas = isset($result['data']) ? $result['data'] : [];
|
|
$datas = isset($result['data']) ? $result['data'] : [];
|
|
|
$status = isset($result['success']) ? $result['success'] : '';
|
|
$status = isset($result['success']) ? $result['success'] : '';
|
|
|
- var_dump($result);
|
|
|
|
|
RedisService::set("caches:wallets:listen_{$address}", ['url' => $this->config['tron_api_url'] . $url, 'result' => $result], 7200);
|
|
RedisService::set("caches:wallets:listen_{$address}", ['url' => $this->config['tron_api_url'] . $url, 'result' => $result], 7200);
|
|
|
if ($status != true || empty($datas)) {
|
|
if ($status != true || empty($datas)) {
|
|
|
$this->error = '2207';
|
|
$this->error = '2207';
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- return false;
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
$coinInMin = ConfigService::make()->getConfigByCode('trc_in_limit');
|
|
$coinInMin = ConfigService::make()->getConfigByCode('trc_in_limit');
|
|
|
$coinInMin = $coinInMin > 0 ? $coinInMin : 0;
|
|
$coinInMin = $coinInMin > 0 ? $coinInMin : 0;
|
|
@@ -708,7 +704,7 @@ class WalletService extends BaseService
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return true;
|
|
|
|
|
|
|
+ return $result;
|
|
|
} catch (\Exception $exception) {
|
|
} catch (\Exception $exception) {
|
|
|
$message = $exception->getMessage();
|
|
$message = $exception->getMessage();
|
|
|
$this->error = $message;
|
|
$this->error = $message;
|