@secondlayer/subgraphs 3.6.0 → 3.6.1

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/src/index.js CHANGED
@@ -654,9 +654,11 @@ function buildEventPayload(filter, tx, event) {
654
654
  };
655
655
  }
656
656
  case "contract_call": {
657
+ const ccRawHex = event.data?.raw_value;
658
+ const normalized = typeof ccRawHex === "string" && ccRawHex.startsWith("0x") ? { ...decoded, value: decodeClarityValue(ccRawHex) } : decoded;
657
659
  const input = buildContractCallInput(filter, tx);
658
660
  return {
659
- ...decoded,
661
+ ...normalized,
660
662
  type: "contract_call",
661
663
  _eventType: event.type,
662
664
  contractId: tx.contract_id ?? "",
@@ -1165,7 +1167,7 @@ function reconstructEvent(e) {
1165
1167
  sender: e.sender,
1166
1168
  recipient: e.recipient,
1167
1169
  amount: e.amount,
1168
- ..."memo" in e ? { memo: e.memo ?? undefined } : {}
1170
+ ...e.event_type === "stx_transfer" ? { memo: e.memo ?? "" } : {}
1169
1171
  }
1170
1172
  };
1171
1173
  case "stx_lock":
@@ -1184,7 +1186,6 @@ function reconstructEvent(e) {
1184
1186
  type: "contract_event",
1185
1187
  data: {
1186
1188
  topic: e.payload.topic,
1187
- contract_id: e.contract_id,
1188
1189
  contract_identifier: e.contract_id,
1189
1190
  value: e.payload.value,
1190
1191
  raw_value: e.payload.raw_value
@@ -2838,5 +2839,5 @@ export {
2838
2839
  backfillSubgraph
2839
2840
  };
2840
2841
 
2841
- //# debugId=4E10631FF8DB802F64756E2164756E21
2842
+ //# debugId=393F56BE14245E2264756E2164756E21
2842
2843
  //# sourceMappingURL=index.js.map