@eluvio/elv-client-js 4.0.138 → 4.0.139

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-client-js",
3
- "version": "4.0.138",
3
+ "version": "4.0.139",
4
4
  "description": "Javascript client for the Eluvio Content Fabric",
5
5
  "main": "src/index.js",
6
6
  "author": "Kevin Talmadge",
@@ -186,19 +186,22 @@ class ElvWalletClient {
186
186
  }
187
187
 
188
188
  try {
189
- walletClient.topLevelInfoPromise = client.utils.ResponseToJson(
190
- client.MakeAuthServiceRequest({
191
- path: "/as/mw/toplevel",
192
- queryParams: {env: mode}
193
- })
194
- )
195
- .then(info => {
196
- walletClient.topLevelInfo = info;
189
+ walletClient.topLevelInfoPromise = new Promise(resolve =>
190
+ client.utils.ResponseToJson(
191
+ client.MakeAuthServiceRequest({
192
+ path: "/as/mw/toplevel",
193
+ queryParams: {env: mode}
194
+ })
195
+ )
196
+ .then(info => {
197
+ walletClient.topLevelInfo = info;
198
+ resolve();
197
199
 
198
- if(!skipMarketplaceLoad) {
199
- walletClient.LoadAvailableMarketplaces();
200
- }
201
- });
200
+ if(!skipMarketplaceLoad) {
201
+ walletClient.LoadAvailableMarketplaces();
202
+ }
203
+ })
204
+ );
202
205
  } catch(error) {
203
206
  // eslint-disable-next-line no-console
204
207
  console.error("Unable to load top level info:");