@eluvio/elv-client-js 3.2.25 → 3.2.26
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/package.json
CHANGED
|
@@ -76,10 +76,12 @@ class ElvWalletClient {
|
|
|
76
76
|
* @param {string} mode=production - Environment to use (`production`, `staging`)
|
|
77
77
|
* @param {Object=} marketplaceParams - Marketplace parameters
|
|
78
78
|
* @param {boolean=} storeAuthToken=true - If specified, auth tokens will be stored in localstorage (if available)
|
|
79
|
+
* @param {Object=} client - Existing instance of ElvClient to use instead of initializing a new one
|
|
79
80
|
*
|
|
80
81
|
* @returns {Promise<ElvWalletClient>}
|
|
81
82
|
*/
|
|
82
83
|
static async Initialize({
|
|
84
|
+
client,
|
|
83
85
|
appId="general",
|
|
84
86
|
network="main",
|
|
85
87
|
mode="production",
|
|
@@ -95,7 +97,9 @@ class ElvWalletClient {
|
|
|
95
97
|
throw Error(`ElvWalletClient: Invalid mode ${mode}`);
|
|
96
98
|
}
|
|
97
99
|
|
|
98
|
-
|
|
100
|
+
if(!client) {
|
|
101
|
+
client = await ElvClient.FromNetworkName({networkName: network, assumeV3: true});
|
|
102
|
+
}
|
|
99
103
|
|
|
100
104
|
let previewMarketplaceHash = previewMarketplaceId;
|
|
101
105
|
if(previewMarketplaceHash && !previewMarketplaceHash.startsWith("hq__")) {
|