Skip to content

Commit

Permalink
fix: improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
micwallace committed Oct 17, 2023
1 parent 75cd614 commit fdd915b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
if (message.origin !== "http://localhost:3333")
return;

console.log("Message received: ", message);
console.log("[IFRAME_RPC] request received: ", message);

try {
switch (message.data.method) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export class IFrameEthereumProvider implements ethers.providers.ExternalProvider
// Send the JSON RPC to the event source.
this.eventTarget.postMessage(payload, this.targetOrigin);

console.log("Message posted: ", payload);
console.log("[IFRAME_RPC] request: ", payload);

// Delete the completer within the timeout and reject the promise.
setTimeout(() => {
Expand Down Expand Up @@ -281,7 +281,7 @@ export class IFrameEthereumProvider implements ethers.providers.ExternalProvider
return;
}

console.log("iframe response received: ", data);
console.log("[IFRAME_RPC] response received: ", data);

const message = data as ReceivedMessageType;

Expand Down
2 changes: 1 addition & 1 deletion test-iframe-provider.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
if (message.origin !== "http://localhost:3333")
return;

console.log("Message received from iframe: ", message);
console.log("[IFRAME_RPC] request received: ", message);

try {
switch (message.data.method) {
Expand Down

0 comments on commit fdd915b

Please sign in to comment.