@@ -35,12 +35,6 @@ export class WalletHelper {
35
35
*/
36
36
#addresses = [ ] ;
37
37
38
- /**
39
- * Indicates if the wallet was started in the Wallet Headless app
40
- * @type {boolean }
41
- */
42
- #started = false ;
43
-
44
38
/**
45
39
* Creates a wallet object but does not start it on server
46
40
* @param {string } walletId
@@ -97,10 +91,6 @@ export class WalletHelper {
97
91
return this . #multisig || false ;
98
92
}
99
93
100
- get started ( ) {
101
- return this . #started;
102
- }
103
-
104
94
get walletData ( ) {
105
95
if ( this . words ) {
106
96
return {
@@ -237,7 +227,6 @@ export class WalletHelper {
237
227
238
228
// If the wallet is ready, we remove it from the status check loop
239
229
const timestampReady = Date . now ( ) . valueOf ( ) ;
240
- walletsPendingReady [ walletId ] . __setStarted ( ) ;
241
230
delete walletsPendingReady [ walletId ] ;
242
231
243
232
const walletBenchmark = startBenchmark . wallets [ walletId ] ;
@@ -270,7 +259,6 @@ export class WalletHelper {
270
259
*/
271
260
async start ( options = { } ) {
272
261
await TestUtils . startWallet ( this . walletData , { waitWalletReady : true } ) ;
273
- this . #started = true ;
274
262
275
263
// Populating some addressess for this wallet
276
264
if ( ! options . skipAddresses ) {
@@ -285,15 +273,12 @@ export class WalletHelper {
285
273
return this . walletData ;
286
274
}
287
275
288
- __setStarted ( ) { this . #started = true ; }
289
-
290
276
/**
291
277
* Stops this wallet
292
278
* @returns {Promise<void> }
293
279
*/
294
280
async stop ( ) {
295
281
await TestUtils . stopWallet ( this . #walletId) ;
296
- this . #started = false ;
297
282
}
298
283
299
284
/**
@@ -345,9 +330,6 @@ export class WalletHelper {
345
330
* @returns {Promise<{success}|*> }
346
331
*/
347
332
async injectFunds ( value , addressIndex = 0 ) {
348
- if ( ! this . #started) {
349
- throw new Error ( `Cannot inject funds: wallet ${ this . #walletId} is not started.` ) ;
350
- }
351
333
const destinationAddress = await this . getAddressAt ( addressIndex ) ;
352
334
return TestUtils . injectFundsIntoAddress ( destinationAddress , value , this . #walletId) ;
353
335
}
0 commit comments