@cityofzion/bs-neox 3.1.1 → 3.1.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.
@@ -70,6 +70,12 @@ class BlockscoutBDSNeoX extends bs_ethereum_1.RpcBDSEthereum {
70
70
  const fromUrl = this._service.explorerService.buildAddressUrl(from);
71
71
  const toUrl = this._service.explorerService.buildAddressUrl(to);
72
72
  if (tokenTransfer.token.type === 'ERC-20') {
73
+ const token = this._service.tokenService.normalizeToken({
74
+ symbol: tokenTransfer.token.symbol,
75
+ name: tokenTransfer.token.name,
76
+ hash: contractHash,
77
+ decimals: Number(tokenTransfer.total.decimals),
78
+ });
73
79
  events.splice(index, 0, {
74
80
  eventType: 'token',
75
81
  amount: blockchain_service_1.BSBigNumberHelper.format(blockchain_service_1.BSBigNumberHelper.fromDecimals(tokenTransfer.total.value, tokenTransfer.total.decimals), {
@@ -81,13 +87,8 @@ class BlockscoutBDSNeoX extends bs_ethereum_1.RpcBDSEthereum {
81
87
  to,
82
88
  toUrl,
83
89
  tokenType: 'erc-20',
84
- tokenUrl: this._service.explorerService.buildContractUrl(contractHash),
85
- token: this._service.tokenService.normalizeToken({
86
- symbol: tokenTransfer.token.symbol,
87
- name: tokenTransfer.token.name,
88
- hash: contractHash,
89
- decimals: Number(tokenTransfer.total.decimals),
90
- }),
90
+ tokenUrl: this._service.explorerService.buildContractUrl(token.hash),
91
+ token,
91
92
  });
92
93
  return;
93
94
  }
@@ -112,7 +113,7 @@ class BlockscoutBDSNeoX extends bs_ethereum_1.RpcBDSEthereum {
112
113
  const txId = response.hash;
113
114
  let transaction = {
114
115
  txId,
115
- txIdUrl: this._service.explorerService.buildContractUrl(txId),
116
+ txIdUrl: this._service.explorerService.buildTransactionUrl(txId),
116
117
  block: response.block,
117
118
  date: new Date(response.timestamp).toJSON(),
118
119
  networkFeeAmount: blockchain_service_1.BSBigNumberHelper.format(blockchain_service_1.BSBigNumberHelper.fromDecimals(response.fee.value, this._service.feeToken.decimals), {
@@ -189,7 +190,7 @@ class BlockscoutBDSNeoX extends bs_ethereum_1.RpcBDSEthereum {
189
190
  to,
190
191
  toUrl,
191
192
  tokenType: 'erc-20',
192
- tokenUrl: this._service.explorerService.buildContractUrl(contractHash),
193
+ tokenUrl: this._service.explorerService.buildContractUrl(token.hash),
193
194
  token,
194
195
  });
195
196
  }
@@ -90,7 +90,7 @@ class BlockscoutFullTransactionsDataService {
90
90
  to,
91
91
  toUrl,
92
92
  tokenType: isErc20 ? 'erc-20' : 'generic',
93
- tokenUrl: __classPrivateFieldGet(this, _BlockscoutFullTransactionsDataService_service, "f").explorerService.buildContractUrl(contractHash),
93
+ tokenUrl: token ? __classPrivateFieldGet(this, _BlockscoutFullTransactionsDataService_service, "f").explorerService.buildContractUrl(token.hash) : undefined,
94
94
  token,
95
95
  });
96
96
  const eventData = 'data' in item ? item.data : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-neox",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "repository": "https://github.com/CityOfZion/blockchain-services",
5
5
  "license": "GPL-3.0-only",
6
6
  "author": "Coz",
@@ -15,9 +15,9 @@
15
15
  "ethers": "~5.7.2",
16
16
  "neox-tpke": "~1.0.5",
17
17
  "viem": "~2.38.5",
18
- "@cityofzion/bs-ethereum": "3.1.1",
19
- "@cityofzion/blockchain-service": "3.1.1",
20
- "@cityofzion/bs-neo3": "3.1.1"
18
+ "@cityofzion/bs-neo3": "3.1.2",
19
+ "@cityofzion/bs-ethereum": "3.1.2",
20
+ "@cityofzion/blockchain-service": "3.1.2"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@ledgerhq/hw-transport": "~6.32.0",