@lumiapassport/ui-kit 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframe/main.js +31 -0
- package/dist/iframe/main.js.map +1 -1
- package/dist/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/iframe/main.js
CHANGED
|
@@ -3827,6 +3827,7 @@ var IframeWallet = class {
|
|
|
3827
3827
|
origin
|
|
3828
3828
|
);
|
|
3829
3829
|
console.log(`[iframe] \u2705 DKG completed: ${result.ownerAddress}`);
|
|
3830
|
+
this.sendWalletReadyStatus(userId, origin);
|
|
3830
3831
|
} catch (error) {
|
|
3831
3832
|
this.hideLoadingIndicator();
|
|
3832
3833
|
throw error;
|
|
@@ -4050,6 +4051,7 @@ var IframeWallet = class {
|
|
|
4050
4051
|
origin
|
|
4051
4052
|
);
|
|
4052
4053
|
console.log(`[iframe] \u2705 RESTORE_BACKUP: Backup restored successfully`);
|
|
4054
|
+
this.sendWalletReadyStatus(userId, origin);
|
|
4053
4055
|
} catch (error) {
|
|
4054
4056
|
console.error("[iframe] RESTORE_BACKUP: Exception:", error);
|
|
4055
4057
|
this.messenger.sendResponse(
|
|
@@ -4103,6 +4105,7 @@ var IframeWallet = class {
|
|
|
4103
4105
|
origin
|
|
4104
4106
|
);
|
|
4105
4107
|
console.log(`[iframe] \u2705 RESTORE_FROM_FILE: File restored successfully`);
|
|
4108
|
+
this.sendWalletReadyStatus(userId, origin);
|
|
4106
4109
|
} catch (error) {
|
|
4107
4110
|
console.error("[iframe] RESTORE_FROM_FILE: Exception:", error);
|
|
4108
4111
|
this.messenger.sendResponse(
|
|
@@ -4173,6 +4176,34 @@ var IframeWallet = class {
|
|
|
4173
4176
|
</div>
|
|
4174
4177
|
`;
|
|
4175
4178
|
}
|
|
4179
|
+
/**
|
|
4180
|
+
* Send wallet ready status to parent
|
|
4181
|
+
* This notifies the frontend that the wallet is fully initialized and ready to sign
|
|
4182
|
+
*/
|
|
4183
|
+
sendWalletReadyStatus(userId, origin) {
|
|
4184
|
+
const hasKeyshare = this.storage.hasKeyshare(userId);
|
|
4185
|
+
const address = hasKeyshare ? this.storage.getOwnerAddress(userId) : void 0;
|
|
4186
|
+
const hasSession = this.sessionManager.hasSession(origin);
|
|
4187
|
+
const status = {
|
|
4188
|
+
ready: hasKeyshare && hasSession,
|
|
4189
|
+
userId,
|
|
4190
|
+
address,
|
|
4191
|
+
hasKeyshare,
|
|
4192
|
+
hasSession,
|
|
4193
|
+
timestamp: Date.now()
|
|
4194
|
+
};
|
|
4195
|
+
console.log("[iframe] \u{1F4E4} Sending WALLET_READY status:", status);
|
|
4196
|
+
if (window.parent) {
|
|
4197
|
+
window.parent.postMessage(
|
|
4198
|
+
{
|
|
4199
|
+
type: "LUMIA_PASSPORT_WALLET_READY",
|
|
4200
|
+
data: status,
|
|
4201
|
+
timestamp: Date.now()
|
|
4202
|
+
},
|
|
4203
|
+
origin
|
|
4204
|
+
);
|
|
4205
|
+
}
|
|
4206
|
+
}
|
|
4176
4207
|
displayLoadingIndicator(message) {
|
|
4177
4208
|
const app = document.getElementById("app");
|
|
4178
4209
|
if (!app) return;
|