@@ -55,10 +55,9 @@ public class BitcoinjBsqTests {
55
55
private final BisqRegtestNetworkParams networkParams ;
56
56
private PeerGroup peerGroup ;
57
57
58
+ private RegtestWalletAppKit regtestWalletAppKit ;
58
59
private final Wallet btcWallet ;
59
60
private Wallet bsqWallet ;
60
- private final Wallet secondBsqWallet ;
61
- private final Wallet emptyBsqWallet ;
62
61
63
62
private final BisqDefaultCoinSelector btcCoinSelector = new BisqDefaultCoinSelector (true ) {
64
63
@ Override
@@ -84,14 +83,11 @@ public BitcoinjBsqTests(BitcoindRegtestSetup bitcoindRegtestSetup) {
84
83
85
84
var walletFactory = new WalletFactory (networkParams );
86
85
btcWallet = walletFactory .createBtcWallet ();
87
- secondBsqWallet = walletFactory .createBsqWallet ();
88
- emptyBsqWallet = walletFactory .createBsqWallet ();
89
86
}
90
87
91
88
@ BeforeAll
92
89
void setup (@ TempDir Path tempDir ) throws InterruptedException {
93
- var wallets = List .of (btcWallet , secondBsqWallet );
94
- var regtestWalletAppKit = new RegtestWalletAppKit (networkParams , tempDir , wallets );
90
+ regtestWalletAppKit = new RegtestWalletAppKit (networkParams , tempDir , List .of (btcWallet ));
95
91
regtestWalletAppKit .initialize ();
96
92
97
93
WalletAppKit walletAppKit = regtestWalletAppKit .getWalletAppKit ();
@@ -117,6 +113,7 @@ void sendBsqTest() throws InterruptedException, InsufficientMoneyException, BsqC
117
113
bsqWallet ,
118
114
bsqCoinSelector );
119
115
116
+ Wallet secondBsqWallet = regtestWalletAppKit .createNewBsqWallet ();
120
117
var secondBsqWalletReceivedLatch = new CountDownLatch (1 );
121
118
secondBsqWallet .addCoinsReceivedEventListener ((wallet , tx , prevBalance , newBalance ) ->
122
119
secondBsqWalletReceivedLatch .countDown ());
@@ -138,6 +135,7 @@ void sendBsqTest() throws InterruptedException, InsufficientMoneyException, BsqC
138
135
139
136
@ Test
140
137
void sendBsqButNotEnoughBsqTest () {
138
+ Wallet emptyBsqWallet = regtestWalletAppKit .createNewBsqWallet ();
141
139
var bsqWalletV2 = new BsqWalletV2 (networkParams ,
142
140
peerGroup ,
143
141
btcWalletV2 ,
@@ -164,6 +162,7 @@ void sendMoreBsqThanInWalletTest() {
164
162
bsqWallet ,
165
163
bsqCoinSelector );
166
164
165
+ Wallet secondBsqWallet = regtestWalletAppKit .createNewBsqWallet ();
167
166
var secondBsqWalletReceivedLatch = new CountDownLatch (1 );
168
167
secondBsqWallet .addCoinsReceivedEventListener ((wallet , tx , prevBalance , newBalance ) ->
169
168
secondBsqWalletReceivedLatch .countDown ());
0 commit comments