Skip to content

Commit

Permalink
nullable return for getTransaction/getConfirmedTransaction fix#2
Browse files Browse the repository at this point in the history
  • Loading branch information
ComradePashka committed Jul 19, 2022
1 parent 8841be7 commit 3da5b21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function getConfirmedTransaction(string $transactionSignature): array|nul
* @param string $transactionSignature
* @return array|null
*/
public function getTransaction(string $transactionSignature): array
public function getTransaction(string $transactionSignature): array|null
{
return $this->client->call('getTransaction', [$transactionSignature]);
}
Expand All @@ -56,7 +56,7 @@ public function getTransaction(string $transactionSignature): array
* @return array
* @throws Exceptions\GenericException|Exceptions\MethodNotFoundException|Exceptions\InvalidIdResponseException
*/
public function getRecentBlockhash(?Commitment $commitment = null): array|null
public function getRecentBlockhash(?Commitment $commitment = null): array
{
return $this->client->call('getRecentBlockhash', array_filter([$commitment]))['value'];
}
Expand Down

0 comments on commit 3da5b21

Please sign in to comment.