diff --git a/src/services/app.ts b/src/services/app.ts index 06d0fe7..e5e12b5 100644 --- a/src/services/app.ts +++ b/src/services/app.ts @@ -19,6 +19,7 @@ import { EventEmitter } from "../utils/event-emitter.js"; import { createHash } from "crypto"; import { p2pkhTemplate } from "@xo-cash/templates"; import { hexToBin } from "@bitauth/libauth"; +import { parseTemplate } from "@xo-cash/engine"; export type AppEventMap = { "invitation-added": Invitation; @@ -95,7 +96,7 @@ export class AppService extends EventEmitter { // To my knowledge, this doesnt generate any lockscript, so discovery of funds will not work automatically. // TODO: Add discovery for funds in the first index? Or until we return 0 TXs? await engine.setDefaultLockingParameters( - generateTemplateIdentifier(p2pkhTemplate), + generateTemplateIdentifier(parseTemplate(p2pkhTemplate)), "receiveOutput", "receiver", );