diff --git a/src/SolanaRPC.php b/src/SolanaRPC.php index 96faee7..5692434 100644 --- a/src/SolanaRPC.php +++ b/src/SolanaRPC.php @@ -41,7 +41,7 @@ public function call(string $method, array $params = []): array { throw new \Exception("RPC Error: " . $data['error']['message']); } - return $data['result']; + return \is_scalar($data['result']) ? $data : $data['result']; } catch (RequestException $e) { throw new \Exception("HTTP Request Error: " . $e->getMessage()); }