Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit 8bda6a6

Browse files
author
Enddy Dumbrique
committed
remove unnecessary postMessage in signin
1 parent 344c6c1 commit 8bda6a6

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/routes/signin/+page.svelte

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
66
let showSelectAddress = false;
77
function handleMessage(event) {
8-
const appDomain = event.origin;
9-
event.source?.postMessage('respond from open window...', appDomain);
8+
return
9+
// if (event.origin !== 'http://localhost:5173') {
10+
// return;
11+
// }
12+
13+
// const appDomain = event.origin;
14+
// event.source?.postMessage('respond from open window...', appDomain);
1015
}
1116
1217
const unsubscribe = () => {
@@ -17,7 +22,7 @@
1722
onMount(() => {
1823
if (window.opener) {
1924
window.addEventListener('message', handleMessage, false);
20-
window.opener.postMessage('PROXY:READY');
25+
window.opener.postMessage(JSON.stringify({method: 'PROXY:READY'}), '*');
2126
return unsubscribe;
2227
}
2328
});

src/routes/signup/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
const sendSignatureToApp = () => {
3636
window.opener.postMessage(
3737
JSON.stringify({
38-
message: 'PROXY:SIGNATURE',
38+
method: 'PROXY:SIGNATURE',
3939
signatures: {
4040
handle: $SignatureStore.claimHandle,
4141
delegation: $SignatureStore.authorizedDelegationAndSchemas

0 commit comments

Comments
 (0)