@Yomoo
Ok Now itâs passing in beforeConsume ! But the new field is not created here is whatâs returned at the end of beforeconsume hook
{
"transaction_hash": "0x6f27a61df6bb1760fd6f2e9d05fc8b99f8fd21b99f7cd6078b31230de271ef9d",
"log_index": 1,
"_auditor": "0xf07c1080e25cd96cd37951d7893e372128551cfe",
"address": "0x88683dbdb8e1d25d5db85d9187437e319b51ca02",
"block_hash": "0x17892c1e61a24074363c60e723c754f330a24fd3acf23edb4b34b64367451de7",
"block_number": 10958454,
"transaction_index": 4,
"block_timestamp": {
"__type": "Date",
"iso": "2021-07-27T14:35:56.548Z"
},
"auditor": "\"0xf07c1080e25cd96cd37951d7893e372128551cfe\""
}
CODE
Moralis.Cloud.beforeConsume('EventSyncAuditorRegistered', async (event) => {
event.auditor = JSON.stringify(event._auditor);
return event;
});
Why using JSON.stringify since _auditor is already a string ?