Skip to content

Commit f0a9e02

Browse files
authored
fix: receipts get url (#125)
1 parent d9caee2 commit f0a9e02

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/API/Receipts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function all(array $query = []): ?array
2929
*/
3030
public function get(string $txHash): ?array
3131
{
32-
$result = $this->requestGet('receipts', ['txHash' => $txHash])['data'];
32+
$result = $this->requestGet("receipts/{$txHash}")['data'];
3333

3434
if (empty($result)) {
3535
throw new Exception(sprintf('No receipt found for transaction %s', $txHash));

tests/API/ReceiptsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function get_calls_correct_url()
2626
{
2727
$this->assertResponse(
2828
method: 'GET',
29-
path: 'receipts?txHash=dummyTxHash',
29+
path: 'receipts/dummyTxHash',
3030
callback: function (ArkClient $client) {
3131
return $client->receipts()->get('dummyTxHash');
3232
},
@@ -42,7 +42,7 @@ public function validates_the_response()
4242

4343
$this->assertResponse(
4444
method: 'GET',
45-
path: 'receipts?txHash=dummyTxHash',
45+
path: 'receipts/dummyTxHash',
4646
callback: function (ArkClient $client) {
4747
return $client->receipts()->get('dummyTxHash');
4848
},

0 commit comments

Comments
 (0)