clean up rpc response delivery

This commit is contained in:
ivan grachev 2024-01-23 22:02:42 +03:00
parent 060a067519
commit 483b8cc768
2 changed files with 2 additions and 5 deletions

View File

@ -45,10 +45,7 @@ announceProvider();
window.addEventListener("message", function(event) {
if (event.source == window && event.data && event.data.direction == "rpc-back") {
// TODO: make sure error is delivered as well
console.log("rpc back", event.data.response);
provider.sendResponse(event.data.response.id, event.data.response);
provider.processTokenaryResponse(event.data.response.id, event.data.response);
} else if (event.source == window && event.data && event.data.direction == "from-content-script") {
const response = event.data.response;
const id = event.data.id;

File diff suppressed because one or more lines are too long