Skip to content

Commit

Permalink
fix(legacy queries): remove the onError argument being passed to chai…
Browse files Browse the repository at this point in the history
…nStorageWatcher.watchLatest
  • Loading branch information
Jorge-Lopes committed Apr 4, 2024
1 parent 42f886f commit fbeeedb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 34 deletions.
22 changes: 4 additions & 18 deletions frontend/src/service/storage-node/watch-general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export const createWatcher = (
chainStorageWatcher: any,
path: string,
onValueUpdate: WatcherCallback,
onError: ErrorHandler
) => {
assert(chainStorageWatcher, "chainStorageWatcher not initialized");

Expand All @@ -23,8 +22,7 @@ export const createWatcher = (
return;
}
onValueUpdate(value);
},
onError
}
);
};

Expand Down Expand Up @@ -68,9 +66,6 @@ export const watchBrandsVBank = (chainStorageWatcher: any, agoricDispatch: Agori
}
}
agoricDispatch({ type: "SET_TOKEN_INFO", payload });
},
(log: any) => {
console.error("Error watching vbank assets", log);
}
);
};
Expand All @@ -90,10 +85,7 @@ export const watchWalletVstorage = (
(value) => {
updateStateOffers(value.liveOffers);
updateStatePurses(value.purses);
},
(log: any) => {
console.error("Error watching vbank assets", log);
},
}
);
};

Expand All @@ -110,10 +102,7 @@ chainStorageWatcher.watchLatest(
}
const instance = value.filter((i: any) => i[0] === "kread");
agoricDispatch({ type: "SET_KREAD_INSTANCE", payload: instance[0][1] });
},
(log: any) => {
console.error("Error watching vbank assets", log);
},)
})
};

export const watchExistingCharacterPaths = (
Expand All @@ -137,9 +126,6 @@ export const watchExistingCharacterPaths = (
...prevState,
characterNameList,
}));
},
(log: any) => {
console.error("Error watching kread char market", log);
},
}
);
};
20 changes: 4 additions & 16 deletions frontend/src/service/storage-node/watch-market.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ export const watchItemMarketMetrics = async (chainStorageWatcher: any, parseItem
return;
}
await parseItemMarketMetricsUpdate(value);
},
(log: any) => {
console.error("Error watching kread char market", log);
},
}
);
};

Expand All @@ -49,10 +46,7 @@ export const watchCharacterMarketMetrics = async (chainStorageWatcher: any, pars
return;
}
await parseCharacterMarketMetricsUpdate(value);
},
(log: any) => {
console.error("Error watching kread char market", log);
},
}
);
};

Expand All @@ -68,10 +62,7 @@ export const watchCharacterMarketPaths = (chainStorageWatcher: any, addMarketCha
return;
}
await addMarketCharacterPaths(value);
},
(log: any) => {
console.error("Error watching kread char market", log);
},
}
);
};

Expand All @@ -87,9 +78,6 @@ export const watchItemMarketPaths = (chainStorageWatcher: any, addMarketItemPath
return;
}
await addMarketItemPaths(value);
},
(log: any) => {
console.error("Error watching kread item market", log);
},
}
);
};

0 comments on commit fbeeedb

Please sign in to comment.