@cityofzion/bs-neo3 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.
@@ -98,7 +98,7 @@ class DoraBDSNeo3 extends RpcBDSNeo3_1.RpcBDSNeo3 {
98
98
  if (eventName !== 'Transfer' || (properties.length !== 3 && properties.length !== 4))
99
99
  return;
100
100
  const promise = () => __awaiter(this, void 0, void 0, function* () {
101
- var _b;
101
+ var _b, _c;
102
102
  const isAsset = properties.length === 3;
103
103
  const from = properties[0].value;
104
104
  const to = properties[1].value;
@@ -108,7 +108,7 @@ class DoraBDSNeo3 extends RpcBDSNeo3_1.RpcBDSNeo3 {
108
108
  const token = yield this.getTokenInfo(contractHash);
109
109
  const [, , { value: amount }] = properties;
110
110
  return {
111
- amount: (0, blockchain_service_1.formatNumber)(amount, token.decimals),
111
+ amount: amount ? neon_js_1.u.BigInteger.fromNumber(amount).toDecimal((_b = token.decimals) !== null && _b !== void 0 ? _b : 0) : '0',
112
112
  from: convertedFrom,
113
113
  to: convertedTo,
114
114
  contractHash,
@@ -119,7 +119,7 @@ class DoraBDSNeo3 extends RpcBDSNeo3_1.RpcBDSNeo3 {
119
119
  return {
120
120
  from: convertedFrom,
121
121
  to: convertedTo,
122
- tokenId: (_b = properties[3].value) !== null && _b !== void 0 ? _b : '',
122
+ tokenId: (_c = properties[3].value) !== null && _c !== void 0 ? _c : '',
123
123
  contractHash,
124
124
  type: 'nft',
125
125
  };
@@ -192,9 +192,9 @@ class DoraBDSNeo3 extends RpcBDSNeo3_1.RpcBDSNeo3 {
192
192
  const toUrl = to ? addressTemplateUrl === null || addressTemplateUrl === void 0 ? void 0 : addressTemplateUrl.replace('{address}', to) : undefined;
193
193
  const hashUrl = hash ? contractTemplateUrl === null || contractTemplateUrl === void 0 ? void 0 : contractTemplateUrl.replace('{hash}', hash) : undefined;
194
194
  if (!from)
195
- from = 'Burn';
195
+ from = 'Mint';
196
196
  if (!to)
197
- to = 'Mint';
197
+ to = 'Burn';
198
198
  const standard = (_e = (_d = (_c = event.supportedStandards) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.toLowerCase()) !== null && _e !== void 0 ? _e : '';
199
199
  const isNft = __classPrivateFieldGet(this, _DoraBDSNeo3_supportedNep11Standards, "f").includes(standard) && !!tokenId;
200
200
  if (isNft) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-neo3",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": "https://github.com/CityOfZion/blockchain-services",