Skip to content

Commit 6ab99c4

Browse files
committed
Bugfixes
1 parent bb0c549 commit 6ab99c4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CryptAPI/CryptAPI.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public function get_address() {
8282
$response = CryptAPI::_request($this->coin, 'create', $ca_params);
8383

8484
if ($response->status == 'success') {
85+
assert($response->address_out == $this->own_address, 'Output address mismatch');
8586
$this->payment_address = $response->address_in;
8687
return $response->address_in;
8788
}
@@ -92,8 +93,14 @@ public function get_address() {
9293
public function check_logs() {
9394
if (empty($this->coin) || empty($this->callback_url)) return null;
9495

96+
$callback_url = $this->callback_url;
97+
if (!empty($this->parameters)) {
98+
$req_parameters = http_build_query($this->parameters);
99+
$callback_url = "{$this->callback_url}?{$req_parameters}";
100+
}
101+
95102
$params = [
96-
'callback' => $this->callback_url,
103+
'callback' => $callback_url,
97104
];
98105

99106
$response = CryptAPI::_request($this->coin, 'logs', $params);

0 commit comments

Comments
 (0)