unwatchEthAddress cloud function not working

Hi, I watched a bunch of Eth (and other networks, but let’s focus on Eth) addresses using the watchEthAddress cloud function. When I tried to unwatch them using unwatchEthAddress the call succeeds, but the addresses are not actually unwatched, I can see the unwatched address both in WatchedEthAddress table in admin, as well as in “Currently Syncing” section of server details.

Here’s what I ran in JS Console:

const address = "0xeaecb1a9c21e7f6c4878c529715bcf7f60b42a0c";
const res = await Parse.Cloud.run('unwatchEthAddress', { address }, { useMasterKey: true });
console.log("result: " + JSON.stringify(res));

And here’s the result:

"Log":{1 item
"result":string"result: {"status":200,"data":{"success":true,"result":true}}"
}

Other things I tried:

  1. removing useMasterKey causes an error, so it seems like master key is accepted in JS console
  2. checked that the case matches between table and the call (not sure if it’s case-sensitive)
  3. updated and restarted the server

What kind of server did you use? Nitro server or non nitro server. Can you also paste the server url?

Here’s the server url: https://uynmsxlsrl4u.usemoralis.com:2053/server
I don’t believe it’s Nitro.

it looks like it is a nitro server, it looks like removing an address from watch doesn’t work now on a nitro server, even if you try to remove it from the admin interface

you could try to delete the row from WatchedEthAddress specific to that address

1 Like

Thanks for your previous answer. It seems the watch functionality is possibly not working either. After successful call from JS console I don’t see it in the table.

My server has several addresses listed under sync, but they don’t show up in the watched tables. My understanding was they were supposed to. Will adding addresses to the table have the desired effect of getting updates?

Can you update to the latest version of the server?

Those problems should be fixed in latest version.

2 Likes

@pawel

Update your sdk with npm install moralis

1 Like

Thank you for the replies! The server is on the newest version 0.0.359. I’ll update the sdk, but the discrepancy I see comes also from the JS console in the dashboard. I understand that should work and put the entry in the table?

it is a nitro sever and it looks like you have close to 5k addresses added to watch

you tried now with latest update to remove and it doesn’t work?

Seems like the remove worked, but the addresses watched are not showing up in the Watched*Addresses tables.

The previous workaround suggested was to manually remove the addresses from the table, but now it seems like watched addresses are not stored there anymore. Is there a place I can find the addresses currently watched?

the addresses are stored somewhere else now, you can not delete them easily from there

Thank you for the answer @cryptokid. Is there any way to check which addresses are being watched? My use case requires synchronization between local DB and Moralis.

there is a table in your database with those addresses, _AddressSyncStatus

1 Like