Skip to content

Commit d009738

Browse files
committed
chore: debug logs
1 parent 4f9a9b8 commit d009738

File tree

1 file changed

+27
-0
lines changed
  • platforms/group-charter-manager-api/src/web3adapter/watchers

1 file changed

+27
-0
lines changed

platforms/group-charter-manager-api/src/web3adapter/watchers/subscriber.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,17 @@ export class PostgresSubscriber implements EntitySubscriberInterface {
179179
if (fullEntity) {
180180
console.log("✅ Full entity loaded:", { id: fullEntity.id, tableName: event.metadata.tableName });
181181

182+
// Debug: Log the exact entity we're working with
183+
console.log("🔍 Full entity details:", {
184+
id: fullEntity.id,
185+
name: fullEntity.name,
186+
charter: fullEntity.charter,
187+
ename: fullEntity.ename,
188+
entityName: entityName,
189+
isGroup: entityName === "Group"
190+
});
191+
192+
// Check eVault creation BEFORE enriching the entity
182193
if (entityName === "Group" && fullEntity.charter && fullEntity.charter.trim() !== "") {
183194
console.log("✅ Group entity with charter detected");
184195

@@ -202,11 +213,27 @@ export class PostgresSubscriber implements EntitySubscriberInterface {
202213
});
203214
}
204215

216+
// Debug: Log the entity BEFORE enrichment
217+
console.log("🔍 Entity BEFORE enrichment:", {
218+
id: fullEntity.id,
219+
charter: fullEntity.charter,
220+
ename: fullEntity.ename,
221+
tableName: event.metadata.tableName
222+
});
223+
205224
entity = (await this.enrichEntity(
206225
fullEntity,
207226
event.metadata.tableName,
208227
event.metadata.target
209228
)) as ObjectLiteral;
229+
230+
// Debug: Log the entity AFTER enrichment
231+
console.log("🔍 Entity AFTER enrichment:", {
232+
id: entity.id,
233+
charter: entity.charter,
234+
ename: entity.ename,
235+
tableName: event.metadata.tableName
236+
});
210237
} else {
211238
console.log("❌ Could not load full entity for ID:", entityId);
212239
}

0 commit comments

Comments
 (0)