Skip to content

Commit

Permalink
Fix bug #23
Browse files Browse the repository at this point in the history
bug fix in Products::getProductOrderBookRaw method
- passing missing $query to requestFactory
  • Loading branch information
MockingMagician authored May 3, 2021
2 parents c6b3b39 + 14c7a77 commit b2f3a05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/Functional/Connectivity/Products.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,13 @@ public function getProductOrderBookRaw(string $productId, int $level = self::LEV
$query = ['level' => 1];
if (2 === $level) {
$query['level'] = 2;
}
if (3 === $level && $forceLevel3) {
} elseif (3 === $level && $forceLevel3) {
$query['level'] = 3;
}

return $this
->getRequestFactory()
->createRequest('GET', sprintf('/products/%s/book', $productId))
->createRequest('GET', sprintf('/products/%s/book', $productId), $query)
->setMustBeSigned(false)
->send()
;
Expand Down
2 changes: 1 addition & 1 deletion src/Functional/Error/ApiError.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

namespace MockingMagician\CoinbaseProSdk\Functional\Error;

use MockingMagician\CoinbaseProSdk\Contracts\Error\ApiErrorInterface;
use Exception;
use MockingMagician\CoinbaseProSdk\Contracts\Error\ApiErrorInterface;

class ApiError extends Exception implements ApiErrorInterface
{
Expand Down

0 comments on commit b2f3a05

Please sign in to comment.