mirror of
https://github.com/lil-org/wallet.git
synced 2025-01-04 02:24:39 +03:00
clean up rpc response delivery
This commit is contained in:
parent
060a067519
commit
483b8cc768
@ -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
Loading…
Reference in New Issue
Block a user