Fix return value of handleDecryptState

This commit is contained in:
Sosthene 2025-06-15 22:17:22 +02:00 committed by NicolasCantu
parent d31e18d4ae
commit 91ba7205cc

View File

@ -328,7 +328,7 @@ export async function registerAllListeners() {
} }
const state = services.getStateFromId(process, stateId); const state = services.getStateFromId(process, stateId);
let res: Record<string, string> = {}; let res: Record<string, any> = {};
if (state) { if (state) {
// Decrypt all the data we have the key for // Decrypt all the data we have the key for
for (const attribute of Object.keys(state.pcd_commitment)) { for (const attribute of Object.keys(state.pcd_commitment)) {
@ -344,8 +344,7 @@ export async function registerAllListeners() {
window.parent.postMessage( window.parent.postMessage(
{ {
type: MessageType.DATA_RETRIEVED, type: MessageType.DATA_RETRIEVED,
data: JSON.stringify(res), data: res,
token
}, },
event.origin event.origin
); );