Skip to content

Commit 015a196

Browse files
committed
fix: removes obsolete "#started" validation that was causing bugs
1 parent 10e0b6b commit 015a196

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

__tests__/integration/utils/wallet-helper.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ export class WalletHelper {
3535
*/
3636
#addresses = [];
3737

38-
/**
39-
* Indicates if the wallet was started in the Wallet Headless app
40-
* @type {boolean}
41-
*/
42-
#started = false;
43-
4438
/**
4539
* Creates a wallet object but does not start it on server
4640
* @param {string} walletId
@@ -97,10 +91,6 @@ export class WalletHelper {
9791
return this.#multisig || false;
9892
}
9993

100-
get started() {
101-
return this.#started;
102-
}
103-
10494
get walletData() {
10595
if (this.words) {
10696
return {
@@ -237,7 +227,6 @@ export class WalletHelper {
237227

238228
// If the wallet is ready, we remove it from the status check loop
239229
const timestampReady = Date.now().valueOf();
240-
walletsPendingReady[walletId].__setStarted();
241230
delete walletsPendingReady[walletId];
242231

243232
const walletBenchmark = startBenchmark.wallets[walletId];
@@ -270,7 +259,6 @@ export class WalletHelper {
270259
*/
271260
async start(options = {}) {
272261
await TestUtils.startWallet(this.walletData, { waitWalletReady: true });
273-
this.#started = true;
274262

275263
// Populating some addressess for this wallet
276264
if (!options.skipAddresses) {
@@ -285,15 +273,12 @@ export class WalletHelper {
285273
return this.walletData;
286274
}
287275

288-
__setStarted() { this.#started = true; }
289-
290276
/**
291277
* Stops this wallet
292278
* @returns {Promise<void>}
293279
*/
294280
async stop() {
295281
await TestUtils.stopWallet(this.#walletId);
296-
this.#started = false;
297282
}
298283

299284
/**
@@ -345,9 +330,6 @@ export class WalletHelper {
345330
* @returns {Promise<{success}|*>}
346331
*/
347332
async injectFunds(value, addressIndex = 0) {
348-
if (!this.#started) {
349-
throw new Error(`Cannot inject funds: wallet ${this.#walletId} is not started.`);
350-
}
351333
const destinationAddress = await this.getAddressAt(addressIndex);
352334
return TestUtils.injectFundsIntoAddress(destinationAddress, value, this.#walletId);
353335
}

0 commit comments

Comments
 (0)