@indexing/jiti 0.0.45 → 0.0.47

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/module.js CHANGED
@@ -1846,11 +1846,13 @@ const $0ab1acc1eff391f6$var$tokenTransfersTemplate = {
1846
1846
  const seenTransfers = new Set();
1847
1847
  transfers = transfers.filter((txfer)=>{
1848
1848
  if (txfer.amount <= BigInt(0)) return false;
1849
- if (_ctx.params.contractAddress && _ctx.params.contractAddress !== txfer.token) return false;
1850
- if (_ctx.params.walletAddress && ![
1851
- txfer.from,
1852
- txfer.to
1853
- ].includes(_ctx.params.walletAddress)) return false;
1849
+ if (_ctx?.params) {
1850
+ if (_ctx.params.contractAddress && _ctx.params.contractAddress !== txfer.token) return false;
1851
+ if (_ctx.params.walletAddress && ![
1852
+ txfer.from,
1853
+ txfer.to
1854
+ ].includes(_ctx.params.walletAddress)) return false;
1855
+ }
1854
1856
  const key = `${txfer.transactionHash}-${txfer.from}-${txfer.to}-${txfer.amount}-${txfer.token}`;
1855
1857
  if (seenTransfers.has(key)) return false;
1856
1858
  seenTransfers.add(key);
@@ -1895,10 +1897,14 @@ const $dc0c078500ed1fea$var$filterValuesTemplate = {
1895
1897
  const values = new Set();
1896
1898
  for (const tx of block.txs_results){
1897
1899
  for (const evt of tx.events || [])for (const attr of evt.attributes || []){
1898
- let val = attr.value;
1900
+ const val = attr.value;
1899
1901
  if (typeof val === "string" && val?.length > 35 && val?.length < 70) {
1900
- if (val.endsWith("=")) val = atob(val);
1901
1902
  values.add(val);
1903
+ try {
1904
+ values.add(atob(val));
1905
+ } catch (e) {
1906
+ // ignore this
1907
+ }
1902
1908
  }
1903
1909
  }
1904
1910
  }