emblem-vault-sdk 1.12.0 → 1.12.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/bundle.js +5 -1
- package/dist/index.js +1 -1
- package/dist/utils.js +5 -1
- package/docs/bundle.js +5 -1
- package/package.json +1 -1
- package/src/utils.ts +4 -3
package/dist/bundle.js
CHANGED
|
@@ -711421,7 +711421,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
711421
711421
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
711422
711422
|
const utils_1 = require("./utils");
|
|
711423
711423
|
const derive_1 = require("./derive");
|
|
711424
|
-
const SDK_VERSION = '1.12.
|
|
711424
|
+
const SDK_VERSION = '1.12.1';
|
|
711425
711425
|
class EmblemVaultSDK {
|
|
711426
711426
|
constructor(apiKey, baseUrl) {
|
|
711427
711427
|
this.apiKey = apiKey;
|
|
@@ -712393,6 +712393,10 @@ function generateTemplate(record) {
|
|
|
712393
712393
|
}
|
|
712394
712394
|
allowed = allowedChain && allowedProject;
|
|
712395
712395
|
}
|
|
712396
|
+
else if (_this) {
|
|
712397
|
+
data = _this.filterNativeBalances({ balances: data }, _this);
|
|
712398
|
+
allowed = data[0].project == recordName;
|
|
712399
|
+
}
|
|
712396
712400
|
if (message && msgCallback) {
|
|
712397
712401
|
msgCallback(message);
|
|
712398
712402
|
}
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
35
35
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
36
36
|
const utils_1 = require("./utils");
|
|
37
37
|
const derive_1 = require("./derive");
|
|
38
|
-
const SDK_VERSION = '1.12.
|
|
38
|
+
const SDK_VERSION = '1.12.2';
|
|
39
39
|
class EmblemVaultSDK {
|
|
40
40
|
constructor(apiKey, baseUrl) {
|
|
41
41
|
this.apiKey = apiKey;
|
package/dist/utils.js
CHANGED
|
@@ -364,6 +364,10 @@ function generateTemplate(record) {
|
|
|
364
364
|
}
|
|
365
365
|
allowed = allowedChain && allowedProject;
|
|
366
366
|
}
|
|
367
|
+
else if (_this) {
|
|
368
|
+
data = _this.filterNativeBalances({ balances: data }, _this);
|
|
369
|
+
allowed = data[0].project == recordName;
|
|
370
|
+
}
|
|
367
371
|
if (message && msgCallback) {
|
|
368
372
|
msgCallback(message);
|
|
369
373
|
}
|
|
@@ -385,7 +389,7 @@ function generateTemplate(record) {
|
|
|
385
389
|
if (hasAnyBalance && recordName != "Rinkeby") {
|
|
386
390
|
let filteredBalances = _this.filterNativeBalances(ownership_balances, _this);
|
|
387
391
|
// single
|
|
388
|
-
if (filteredBalances.length == 1) {
|
|
392
|
+
if ((_this.vaultCollectionType == "protocol" && filteredBalances.length >= 1) || filteredBalances.length == 1) {
|
|
389
393
|
allowedJump = _this.allowed(filteredBalances, _this);
|
|
390
394
|
}
|
|
391
395
|
else {
|
package/docs/bundle.js
CHANGED
|
@@ -711421,7 +711421,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
711421
711421
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
711422
711422
|
const utils_1 = require("./utils");
|
|
711423
711423
|
const derive_1 = require("./derive");
|
|
711424
|
-
const SDK_VERSION = '1.12.
|
|
711424
|
+
const SDK_VERSION = '1.12.1';
|
|
711425
711425
|
class EmblemVaultSDK {
|
|
711426
711426
|
constructor(apiKey, baseUrl) {
|
|
711427
711427
|
this.apiKey = apiKey;
|
|
@@ -712393,6 +712393,10 @@ function generateTemplate(record) {
|
|
|
712393
712393
|
}
|
|
712394
712394
|
allowed = allowedChain && allowedProject;
|
|
712395
712395
|
}
|
|
712396
|
+
else if (_this) {
|
|
712397
|
+
data = _this.filterNativeBalances({ balances: data }, _this);
|
|
712398
|
+
allowed = data[0].project == recordName;
|
|
712399
|
+
}
|
|
712396
712400
|
if (message && msgCallback) {
|
|
712397
712401
|
msgCallback(message);
|
|
712398
712402
|
}
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -241,8 +241,6 @@ export function generateTemplate(record: any) {
|
|
|
241
241
|
return true
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
|
|
245
|
-
|
|
246
244
|
if ((!data || data.length == 0) ) {
|
|
247
245
|
return false
|
|
248
246
|
}
|
|
@@ -327,6 +325,9 @@ export function generateTemplate(record: any) {
|
|
|
327
325
|
`Found asset from ${firstAsset.project} collection, expected asset from ${recordName} collection.`
|
|
328
326
|
}
|
|
329
327
|
allowed = allowedChain && allowedProject
|
|
328
|
+
} else if(_this) {
|
|
329
|
+
data = _this.filterNativeBalances({balances: data}, _this)
|
|
330
|
+
allowed = data[0].project == recordName
|
|
330
331
|
}
|
|
331
332
|
|
|
332
333
|
if (message && msgCallback) {
|
|
@@ -350,7 +351,7 @@ export function generateTemplate(record: any) {
|
|
|
350
351
|
if (hasAnyBalance && recordName != "Rinkeby") {
|
|
351
352
|
let filteredBalances = _this.filterNativeBalances(ownership_balances, _this)
|
|
352
353
|
// single
|
|
353
|
-
if (filteredBalances.length == 1) {
|
|
354
|
+
if ((_this.vaultCollectionType == "protocol" && filteredBalances.length >=1) || filteredBalances.length == 1) {
|
|
354
355
|
allowedJump = _this.allowed(filteredBalances, _this)
|
|
355
356
|
} else {
|
|
356
357
|
allowedJump = false
|