@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/main.js CHANGED
@@ -1856,11 +1856,13 @@ const $7dd402f6ad0dab6a$var$tokenTransfersTemplate = {
1856
1856
  const seenTransfers = new Set();
1857
1857
  transfers = transfers.filter((txfer)=>{
1858
1858
  if (txfer.amount <= BigInt(0)) return false;
1859
- if (_ctx.params.contractAddress && _ctx.params.contractAddress !== txfer.token) return false;
1860
- if (_ctx.params.walletAddress && ![
1861
- txfer.from,
1862
- txfer.to
1863
- ].includes(_ctx.params.walletAddress)) return false;
1859
+ if (_ctx?.params) {
1860
+ if (_ctx.params.contractAddress && _ctx.params.contractAddress !== txfer.token) return false;
1861
+ if (_ctx.params.walletAddress && ![
1862
+ txfer.from,
1863
+ txfer.to
1864
+ ].includes(_ctx.params.walletAddress)) return false;
1865
+ }
1864
1866
  const key = `${txfer.transactionHash}-${txfer.from}-${txfer.to}-${txfer.amount}-${txfer.token}`;
1865
1867
  if (seenTransfers.has(key)) return false;
1866
1868
  seenTransfers.add(key);
@@ -1905,10 +1907,14 @@ const $9af31dbb692f94e3$var$filterValuesTemplate = {
1905
1907
  const values = new Set();
1906
1908
  for (const tx of block.txs_results){
1907
1909
  for (const evt of tx.events || [])for (const attr of evt.attributes || []){
1908
- let val = attr.value;
1910
+ const val = attr.value;
1909
1911
  if (typeof val === "string" && val?.length > 35 && val?.length < 70) {
1910
- if (val.endsWith("=")) val = atob(val);
1911
1912
  values.add(val);
1913
+ try {
1914
+ values.add(atob(val));
1915
+ } catch (e) {
1916
+ // ignore this
1917
+ }
1912
1918
  }
1913
1919
  }
1914
1920
  }