@cityofzion/bs-ethereum 3.0.0 → 3.0.1
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.
|
@@ -30,7 +30,7 @@ class BlockscoutESEthereum {
|
|
|
30
30
|
return `${__classPrivateFieldGet(this, _BlockscoutESEthereum_baseUrl, "f")}/address/${this._service.tokenService.normalizeHash(contractHash)}`;
|
|
31
31
|
}
|
|
32
32
|
buildNftUrl(params) {
|
|
33
|
-
if (!__classPrivateFieldGet(this, _BlockscoutESEthereum_baseUrl, "f"))
|
|
33
|
+
if (!__classPrivateFieldGet(this, _BlockscoutESEthereum_baseUrl, "f") || !params.collectionHash)
|
|
34
34
|
return undefined;
|
|
35
35
|
return `${__classPrivateFieldGet(this, _BlockscoutESEthereum_baseUrl, "f")}/token/${this._service.tokenService.normalizeHash(params.collectionHash)}/instance/${params.tokenHash}`;
|
|
36
36
|
}
|
|
@@ -20,16 +20,18 @@ class GhostMarketNDSEthereum extends blockchain_service_1.GhostMarketNDS {
|
|
|
20
20
|
hasToken(_a) {
|
|
21
21
|
return __awaiter(this, arguments, void 0, function* ({ collectionHash, address }) {
|
|
22
22
|
try {
|
|
23
|
+
if (!collectionHash)
|
|
24
|
+
return false;
|
|
23
25
|
const provider = new ethers_1.ethers.providers.JsonRpcProvider(this._service.network.url);
|
|
24
26
|
const contract = new ethers_1.ethers.Contract(collectionHash, ERC20_1.ERC20_ABI, provider);
|
|
25
27
|
const response = yield contract.balanceOf(address);
|
|
26
28
|
if (!response)
|
|
27
|
-
|
|
29
|
+
return false;
|
|
28
30
|
const parsedResponse = response;
|
|
29
31
|
return parsedResponse.gt(0);
|
|
30
32
|
}
|
|
31
33
|
catch (_b) {
|
|
32
|
-
|
|
34
|
+
return false;
|
|
33
35
|
}
|
|
34
36
|
});
|
|
35
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-ethereum",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/CityOfZion/blockchain-services",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@ledgerhq/hw-app-eth": "~7.3.0",
|
|
20
20
|
"axios": "~1.13.2",
|
|
21
21
|
"ethers": "5.8.0",
|
|
22
|
-
"@cityofzion/blockchain-service": "3.0.
|
|
22
|
+
"@cityofzion/blockchain-service": "3.0.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@ledgerhq/hw-transport": "~6.32.0",
|