Breaking-Change: Extremely rough update to work with Kioks wallet
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user