Skip to content

Commit

Permalink
update mx api method signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
michavie committed Jun 16, 2024
1 parent dbc6914 commit 83a58c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Multiversx.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public static function verifyNativeAuthToken(string $accessToken): NativeAuthVal
return $nativeAuth->validate($accessToken);
}

public static function api(?ClientInterface $httpClient = null, ?string $apiUrl = null): ApiNetworkProvider
public static function api(?string $apiUrl = null, ?ClientInterface $httpClient = null): ApiNetworkProvider
{
$injectedClient = app()->bound(static::HttpClientContainerAbstract) ? app(static::HttpClientContainerAbstract) : null;
$client = $httpClient ?? $injectedClient;

return NetworkProvider::api($apiUrl ?? config('multiversx.urls.api'), $client);
}

public static function apiWithCache(Carbon $expiresAt, ?ClientInterface $httpClient = null, ?string $apiUrl = null): ApiNetworkProvider
public static function apiWithCache(Carbon $expiresAt, ?string $apiUrl = null, ?ClientInterface $httpClient = null): ApiNetworkProvider
{
$stack = HandlerStack::create();

Expand Down

0 comments on commit 83a58c0

Please sign in to comment.