@fuel-ts/account 0.94.0 → 0.94.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connectors/fuel.d.ts +3 -0
- package/dist/connectors/fuel.d.ts.map +1 -1
- package/dist/index.global.js +19 -6
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -3
- package/dist/index.mjs.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +8 -0
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/test-utils.global.js +61 -61
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +15 -15
package/dist/index.js
CHANGED
@@ -10441,9 +10441,11 @@ var _Fuel = class extends FuelConnector {
|
|
10441
10441
|
_connectors = [];
|
10442
10442
|
_targetObject = null;
|
10443
10443
|
_unsubscribes = [];
|
10444
|
-
_targetUnsubscribe
|
10444
|
+
_targetUnsubscribe = () => {
|
10445
|
+
};
|
10445
10446
|
_pingCache = {};
|
10446
10447
|
_currentConnector;
|
10448
|
+
_initializationPromise = null;
|
10447
10449
|
constructor(config = _Fuel.defaultConfig) {
|
10448
10450
|
super();
|
10449
10451
|
this.setMaxListeners(1e3);
|
@@ -10451,8 +10453,19 @@ var _Fuel = class extends FuelConnector {
|
|
10451
10453
|
this._targetObject = this.getTargetObject(config.targetObject);
|
10452
10454
|
this._storage = config.storage === void 0 ? this.getStorage() : config.storage;
|
10453
10455
|
this.setupMethods();
|
10454
|
-
this.
|
10455
|
-
|
10456
|
+
this._initializationPromise = this.initialize();
|
10457
|
+
}
|
10458
|
+
async initialize() {
|
10459
|
+
try {
|
10460
|
+
await this.setDefaultConnector();
|
10461
|
+
this._targetUnsubscribe = this.setupConnectorListener();
|
10462
|
+
} catch (error) {
|
10463
|
+
throw new import_errors29.FuelError(import_errors29.ErrorCode.INVALID_PROVIDER, "Error initializing Fuel Connector");
|
10464
|
+
}
|
10465
|
+
}
|
10466
|
+
async init() {
|
10467
|
+
await this._initializationPromise;
|
10468
|
+
return this;
|
10456
10469
|
}
|
10457
10470
|
/**
|
10458
10471
|
* Return the target object to listen for global events.
|