@cityofzion/bs-neo3 1.13.1 → 1.13.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.
|
@@ -169,7 +169,8 @@ class DoraBDSNeo3 extends RpcBDSNeo3_1.RpcBDSNeo3 {
|
|
|
169
169
|
const txTemplateUrl = __classPrivateFieldGet(this, _DoraBDSNeo3_explorerService, "f").getTxTemplateUrl();
|
|
170
170
|
const nftTemplateUrl = __classPrivateFieldGet(this, _DoraBDSNeo3_explorerService, "f").getNftTemplateUrl();
|
|
171
171
|
const contractTemplateUrl = __classPrivateFieldGet(this, _DoraBDSNeo3_explorerService, "f").getContractTemplateUrl();
|
|
172
|
-
const itemPromises = items.map((
|
|
172
|
+
const itemPromises = items.map((_d) => __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
var { networkFeeAmount, systemFeeAmount } = _d, item = __rest(_d, ["networkFeeAmount", "systemFeeAmount"]);
|
|
173
174
|
const txId = item.transactionID;
|
|
174
175
|
const newItem = {
|
|
175
176
|
txId,
|
|
@@ -178,28 +179,32 @@ class DoraBDSNeo3 extends RpcBDSNeo3_1.RpcBDSNeo3 {
|
|
|
178
179
|
date: item.date,
|
|
179
180
|
invocationCount: item.invocationCount,
|
|
180
181
|
notificationCount: item.notificationCount,
|
|
181
|
-
networkFeeAmount:
|
|
182
|
-
|
|
182
|
+
networkFeeAmount: networkFeeAmount
|
|
183
|
+
? blockchain_service_1.BSNumberHelper.formatNumber(networkFeeAmount, { decimals: this._feeToken.decimals })
|
|
184
|
+
: undefined,
|
|
185
|
+
systemFeeAmount: systemFeeAmount
|
|
186
|
+
? blockchain_service_1.BSNumberHelper.formatNumber(systemFeeAmount, { decimals: this._feeToken.decimals })
|
|
187
|
+
: undefined,
|
|
183
188
|
events: [],
|
|
184
189
|
};
|
|
185
190
|
const eventPromises = item.events.map((event) => __awaiter(this, void 0, void 0, function* () {
|
|
186
|
-
var
|
|
191
|
+
var _e, _f, _g, _h, _j, _k;
|
|
187
192
|
let nftEvent;
|
|
188
193
|
let assetEvent;
|
|
189
194
|
const { methodName, tokenID: tokenId, contractHash: hash } = event;
|
|
190
|
-
const from = (
|
|
191
|
-
const to = (
|
|
195
|
+
const from = (_e = event.from) !== null && _e !== void 0 ? _e : undefined;
|
|
196
|
+
const to = (_f = event.to) !== null && _f !== void 0 ? _f : undefined;
|
|
192
197
|
const fromUrl = from ? addressTemplateUrl === null || addressTemplateUrl === void 0 ? void 0 : addressTemplateUrl.replace('{address}', from) : undefined;
|
|
193
198
|
const toUrl = to ? addressTemplateUrl === null || addressTemplateUrl === void 0 ? void 0 : addressTemplateUrl.replace('{address}', to) : undefined;
|
|
194
199
|
const hashUrl = hash ? contractTemplateUrl === null || contractTemplateUrl === void 0 ? void 0 : contractTemplateUrl.replace('{hash}', hash) : undefined;
|
|
195
|
-
const standard = (
|
|
200
|
+
const standard = (_j = (_h = (_g = event.supportedStandards) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.toLowerCase()) !== null && _j !== void 0 ? _j : '';
|
|
196
201
|
const isNft = __classPrivateFieldGet(this, _DoraBDSNeo3_supportedNep11Standards, "f").includes(standard) && !!tokenId;
|
|
197
202
|
if (isNft) {
|
|
198
203
|
const [nft] = yield blockchain_service_1.BSPromisesHelper.tryCatch(() => __classPrivateFieldGet(this, _DoraBDSNeo3_nftDataService, "f").getNft({ contractHash: hash, tokenId }));
|
|
199
204
|
const nftUrl = hash ? nftTemplateUrl === null || nftTemplateUrl === void 0 ? void 0 : nftTemplateUrl.replace('{hash}', hash).replace('{tokenId}', tokenId) : undefined;
|
|
200
205
|
nftEvent = {
|
|
201
206
|
eventType: 'nft',
|
|
202
|
-
amount:
|
|
207
|
+
amount: undefined,
|
|
203
208
|
methodName,
|
|
204
209
|
from,
|
|
205
210
|
fromUrl,
|
|
@@ -217,10 +222,12 @@ class DoraBDSNeo3 extends RpcBDSNeo3_1.RpcBDSNeo3 {
|
|
|
217
222
|
}
|
|
218
223
|
else {
|
|
219
224
|
const [token] = yield blockchain_service_1.BSPromisesHelper.tryCatch(() => this.getTokenInfo(hash));
|
|
220
|
-
const
|
|
225
|
+
const { amount } = event;
|
|
221
226
|
assetEvent = {
|
|
222
227
|
eventType: 'token',
|
|
223
|
-
amount
|
|
228
|
+
amount: amount
|
|
229
|
+
? blockchain_service_1.BSNumberHelper.formatNumber(amount, { decimals: (_k = token === null || token === void 0 ? void 0 : token.decimals) !== null && _k !== void 0 ? _k : event.tokenDecimals })
|
|
230
|
+
: undefined,
|
|
224
231
|
methodName,
|
|
225
232
|
from,
|
|
226
233
|
fromUrl,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityofzion/bs-neo3",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/CityOfZion/blockchain-services",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"isomorphic-ws": "^5.0.0",
|
|
22
22
|
"lodash.clonedeep": "^4.5.0",
|
|
23
23
|
"date-fns": "~4.1.0",
|
|
24
|
-
"@cityofzion/blockchain-service": "1.18.
|
|
24
|
+
"@cityofzion/blockchain-service": "1.18.2",
|
|
25
25
|
"@cityofzion/bs-asteroid-sdk": "0.9.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|