mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-07-23 04:36:52 +00:00
changed targetOrigin and started qr buy order
This commit is contained in:
@@ -28,9 +28,9 @@ export const sendMessageBackground = (action, data = {}, timeout = 60000, isExte
|
||||
return new Promise((resolve, reject) => {
|
||||
const requestId = generateRequestId(); // Unique ID for each request
|
||||
callbackMap.set(requestId, { resolve, reject }); // Store both resolve and reject callbacks
|
||||
|
||||
const targetOrigin = window.location.origin
|
||||
// Send the message with `backgroundMessage` type
|
||||
window.postMessage({ type: "backgroundMessage", action, requestId, payload: data, isExtension }, "*");
|
||||
window.postMessage({ type: "backgroundMessage", action, requestId, payload: data, isExtension }, targetOrigin);
|
||||
|
||||
// Set up a timeout to automatically reject if no response is received
|
||||
const timeoutId = setTimeout(() => {
|
||||
|
Reference in New Issue
Block a user