You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`We found a previous StealthKeyChangedEvent for address ${address} in the subgraph at block ${event[i].block} with transaction hash ${event[i].txHash}`
337
-
);
338
-
}else{
339
-
theEvent=event[i];
340
-
console.log(
341
-
`We found a StealthKeyChangedEvent for address ${address} in the subgraph at block ${event[i].block} with transaction hash ${event[i].txHash}`
342
-
);
332
+
try{
333
+
forawait(consteventofstealthKeyChangedEvents){
334
+
for(leti=0;i<event.length;i++){
335
+
if(theEvent){
336
+
console.log(
337
+
`We found a previous StealthKeyChangedEvent for address ${address} in the subgraph at block ${event[i].block} with transaction hash ${event[i].txHash}`
338
+
);
339
+
}else{
340
+
theEvent=event[i];
341
+
console.log(
342
+
`We found a StealthKeyChangedEvent for address ${address} in the subgraph at block ${event[i].block} with transaction hash ${event[i].txHash}`
343
+
);
344
+
}
343
345
}
344
346
}
347
+
}catch(error){
348
+
thrownewError(`Address ${address} has not registered stealth keys. Please ask them to setup their Umbra account`);// prettier-ignore
constethersProvider=newStaticJsonRpcProvider(`https://sepolia.infura.io/v3/${INFURA_ID}`);// otherwise throws with unsupported network since we're on localhost
0 commit comments