Skip to content

Commit

Permalink
WalletRpcClient: Made $accountIndex optional for some methods and set…
Browse files Browse the repository at this point in the history
… it 0 by default
  • Loading branch information
refring committed Oct 12, 2023
1 parent 3ebab3d commit 8358768
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WalletRpcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public function getBalance(
* @throws AccountIndexOutOfBoundException
* @throws AddressIndexOutOfBoundException
*/
public function getAddress(int $accountIndex, ?array $addressIndex = null): GetAddressResponse
public function getAddress(int $accountIndex = 0, ?array $addressIndex = null): GetAddressResponse
{
return $this->handleRequest(GetAddressRequest::create($accountIndex, $addressIndex), GetAddressResponse::class);
}
Expand All @@ -286,7 +286,7 @@ public function getAddressIndex(Address $address): GetAddressIndexResponse
* @throws MoneroRpcException
* @throws AccountIndexOutOfBoundException
*/
public function createAddress(int $accountIndex, ?string $label = null, ?int $count = 1): CreateAddressResponse
public function createAddress(int $accountIndex = 0, ?string $label = null, ?int $count = 1): CreateAddressResponse
{
return $this->handleRequest(CreateAddressRequest::create($accountIndex, $label, $count), CreateAddressResponse::class);
}
Expand Down

0 comments on commit 8358768

Please sign in to comment.