Skip to content

Commit 90b1685

Browse files
committed
fix: Added kexIsDone property to IsMultisigResponse
1 parent 67d5005 commit 90b1685

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

src/WalletRpc/IsMultisigResponse.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ class IsMultisigResponse implements JsonDataSerializable
2424
#[Json]
2525
public bool $ready;
2626

27+
#[Json('kex_is_done')]
28+
public bool $kexIsDone;
29+
2730
/**
2831
* Amount of signature needed to sign a transfer.
2932
*/

tests/integration/TransferTest.php

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212
use RefRing\MoneroRpcPhp\Exception\InvalidDestinationException;
1313
use RefRing\MoneroRpcPhp\Model\Address;
1414
use RefRing\MoneroRpcPhp\Model\Amount;
15+
use RefRing\MoneroRpcPhp\Tests\Attribute\RequiresMoneroVersion;
1516
use RefRing\MoneroRpcPhp\Tests\TestHelper;
16-
use RefRing\MoneroRpcPhp\Tests\Util\StdOutLogger;
17+
use RefRing\MoneroRpcPhp\Tests\Trait\RequiresMoneroVersionTrait;
1718
use RefRing\MoneroRpcPhp\WalletRpc\Model\Destination;
1819
use RefRing\MoneroRpcPhp\WalletRpc\Model\TransferType;
1920
use RefRing\MoneroRpcPhp\WalletRpc\TransferResponse;
2021
use RefRing\MoneroRpcPhp\WalletRpcClient;
2122

2223
final class TransferTest extends TestCase
2324
{
25+
use RequiresMoneroVersionTrait;
26+
2427
public static array $seeds = [TestHelper::WALLET_1_MNEMONIC, TestHelper::WALLET_2_MNEMONIC];
2528

2629
public static array $wallets = [];
@@ -51,6 +54,16 @@ public static function setUpBeforeClass(): void
5154
self::$daemonRpcClient->generateBlocks(100, TestHelper::MAINNET_ADDRESS_1);
5255
}
5356

57+
protected function setUp(): void
58+
{
59+
$this->checkMoneroVersionRequirements();
60+
}
61+
62+
protected static function getDaemonRpcClient(): DaemonRpcClient
63+
{
64+
return self::$daemonRpcClient;
65+
}
66+
5467
public function testWallet(): void
5568
{
5669
self::$walletRpcClient->refresh();
@@ -201,6 +214,7 @@ public function testScanTx(TransferResponse $transferResponse): void
201214
$result = self::$walletRpcClient->scanTx([$transferResponse->txHash]);
202215
}
203216

217+
#[RequiresMoneroVersion('0.18.4.1')]
204218
public function testSubaddressLookahead(): void
205219
{
206220
// Restore wallet 1 for this test
@@ -242,15 +256,15 @@ public function testSubaddressLookahead(): void
242256
self::$walletRpcClient->transfer($destination);
243257

244258
// Mine a block to confirm the transaction
245-
self::$daemonRpcClient->generateBlocks(1, TestHelper::MAINNET_ADDRESS_1);
259+
self::$daemonRpcClient->generateBlocks(10, TestHelper::MAINNET_ADDRESS_1);
246260

247261
// Switch back to wallet 1 and verify the balance
248262
self::$walletRpcClient->restoreDeterministicWallet('', '', self::$seeds[0]);
249263
// Re-apply lookahead since wallet was restored
250264
self::$walletRpcClient->setSubaddressLookahead(50, 1000);
251265
self::$walletRpcClient->refresh();
252266

253-
$balanceResult = self::$walletRpcClient->getBalance(0, [999]);
267+
$balanceResult = self::$walletRpcClient->getBalance(0);
254268
$this->assertNotEmpty($balanceResult->perSubaddress, 'Balance info for subaddress should exist');
255269

256270
$balanceInfo0_999 = null;

0 commit comments

Comments
 (0)