Breaking-Change: Extremely rough update to work with Kioks wallet

This commit is contained in:
2026-05-22 14:11:07 +02:00
parent 3d6518e465
commit def261b568
17 changed files with 422 additions and 107 deletions
+5 -1
View File
@@ -32,7 +32,7 @@ import type { BaseStorage } from "./storage.js";
import type { BlockchainService } from "./electrum.js";
import { EventEmitter } from "../utils/event-emitter.js";
import { decodeExtendedJson, decodeExtendedJsonObject, encodeExtendedJson } from "../utils/ext-json.js";
import { decodeExtendedJsonObject } from "../utils/ext-json.js";
import { compileCashAssemblyString } from "@xo-cash/engine";
export type InvitationEventMap = {
@@ -154,6 +154,10 @@ export class Invitation extends EventEmitter<InvitationEventMap> {
* Start the invitation - Connect sync server and download latest invitation data.
*/
async start(): Promise<void> {
// Persist immediately so imports survive sync-server outages and appear in the TUI
// after a CLI import or app restart.
await this.storage.set(this.data.invitationIdentifier, this.data);
try {
// Connect to the sync server and get the invitation (in parallel)
const [_, invitation] = await Promise.all([