emblem-vault-sdk 1.7.2 → 1.7.3
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 +3 -3
- package/dist/index.js +1 -1
- package/dist/utils.js +2 -2
- package/docs/bundle.js +3 -3
- package/package.json +1 -1
- package/src/utils.ts +2 -2
package/dist/bundle.js
CHANGED
|
@@ -684293,7 +684293,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
684293
684293
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
684294
684294
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
684295
684295
|
const utils_1 = require("./utils");
|
|
684296
|
-
const SDK_VERSION = '1.7.
|
|
684296
|
+
const SDK_VERSION = '1.7.3';
|
|
684297
684297
|
class EmblemVaultSDK {
|
|
684298
684298
|
constructor(apiKey, baseUrl) {
|
|
684299
684299
|
this.apiKey = apiKey;
|
|
@@ -684751,10 +684751,10 @@ function generateTemplate(record) {
|
|
|
684751
684751
|
allowed = true;
|
|
684752
684752
|
}
|
|
684753
684753
|
else if (_this.vaultCollectionType && _this.vaultCollectionType == "protocol") {
|
|
684754
|
-
allowed = data && data[0].coin == _this.collectionChain;
|
|
684754
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase();
|
|
684755
684755
|
}
|
|
684756
684756
|
else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection") {
|
|
684757
|
-
allowed = data && data[0].coin == _this.collectionChain && data[0].project == _this.name;
|
|
684757
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase() && data[0].project == _this.name;
|
|
684758
684758
|
}
|
|
684759
684759
|
else { // XCP
|
|
684760
684760
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
35
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
36
36
|
const utils_1 = require("./utils");
|
|
37
|
-
const SDK_VERSION = '1.7.
|
|
37
|
+
const SDK_VERSION = '1.7.3';
|
|
38
38
|
class EmblemVaultSDK {
|
|
39
39
|
constructor(apiKey, baseUrl) {
|
|
40
40
|
this.apiKey = apiKey;
|
package/dist/utils.js
CHANGED
|
@@ -251,10 +251,10 @@ function generateTemplate(record) {
|
|
|
251
251
|
allowed = true;
|
|
252
252
|
}
|
|
253
253
|
else if (_this.vaultCollectionType && _this.vaultCollectionType == "protocol") {
|
|
254
|
-
allowed = data && data[0].coin == _this.collectionChain;
|
|
254
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase();
|
|
255
255
|
}
|
|
256
256
|
else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection") {
|
|
257
|
-
allowed = data && data[0].coin == _this.collectionChain && data[0].project == _this.name;
|
|
257
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase() && data[0].project == _this.name;
|
|
258
258
|
}
|
|
259
259
|
else { // XCP
|
|
260
260
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
package/docs/bundle.js
CHANGED
|
@@ -684293,7 +684293,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
684293
684293
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
684294
684294
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
684295
684295
|
const utils_1 = require("./utils");
|
|
684296
|
-
const SDK_VERSION = '1.7.
|
|
684296
|
+
const SDK_VERSION = '1.7.3';
|
|
684297
684297
|
class EmblemVaultSDK {
|
|
684298
684298
|
constructor(apiKey, baseUrl) {
|
|
684299
684299
|
this.apiKey = apiKey;
|
|
@@ -684751,10 +684751,10 @@ function generateTemplate(record) {
|
|
|
684751
684751
|
allowed = true;
|
|
684752
684752
|
}
|
|
684753
684753
|
else if (_this.vaultCollectionType && _this.vaultCollectionType == "protocol") {
|
|
684754
|
-
allowed = data && data[0].coin == _this.collectionChain;
|
|
684754
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase();
|
|
684755
684755
|
}
|
|
684756
684756
|
else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection") {
|
|
684757
|
-
allowed = data && data[0].coin == _this.collectionChain && data[0].project == _this.name;
|
|
684757
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase() && data[0].project == _this.name;
|
|
684758
684758
|
}
|
|
684759
684759
|
else { // XCP
|
|
684760
684760
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -223,9 +223,9 @@ export function generateTemplate(record: any) {
|
|
|
223
223
|
} else if (recordName == "Embels"){
|
|
224
224
|
allowed = true
|
|
225
225
|
} else if (_this.vaultCollectionType && _this.vaultCollectionType == "protocol") {
|
|
226
|
-
allowed = data && data[0].coin ==_this.collectionChain
|
|
226
|
+
allowed = data && data[0].coin.toLowerCase() ==_this.collectionChain.toLowerCase()
|
|
227
227
|
} else if (_this.vaultCollectionType && _this.vaultCollectionType == "collection" ) {
|
|
228
|
-
allowed = data && data[0].coin == _this.collectionChain && data[0].project == _this.name
|
|
228
|
+
allowed = data && data[0].coin.toLowerCase() == _this.collectionChain.toLowerCase() && data[0].project == _this.name
|
|
229
229
|
} else { // XCP
|
|
230
230
|
allowed = data[0].project == _this.name && data[0].balance == 1;
|
|
231
231
|
}
|