Breaking-Change: Extremely rough update to work with Kioks wallet
This commit is contained in:
+7
-22
@@ -81,22 +81,7 @@ export class AppService extends EventEmitter<AppEventMap> {
|
||||
|
||||
// TODO: We *technically* dont want this here, but we also need some initial templates for the wallet, so im doing it here
|
||||
// Import the default P2PKH template
|
||||
const { templateIdentifier } = await engine.importTemplate(p2pkhTemplate);
|
||||
|
||||
// engine
|
||||
// .subscribeToLockingBytecodesForTemplate(templateIdentifier)
|
||||
// .catch((err) =>
|
||||
// console.error(
|
||||
// `Error subscribing to locking bytecodes for template ${templateIdentifier}: ${err}`,
|
||||
// ),
|
||||
// );
|
||||
// engine
|
||||
// .updateUnspentOutputsForTemplate(templateIdentifier)
|
||||
// .catch((err) =>
|
||||
// console.error(
|
||||
// `Error updating unspent outputs for template ${templateIdentifier}: ${err}`,
|
||||
// ),
|
||||
// );
|
||||
await engine.importTemplate(p2pkhTemplate);
|
||||
|
||||
// Update all the unspents for every template, and subscribe to the locking bytecodes for changes
|
||||
// TODO: Remove the above lines that do the same thing. Minimising changes for BLISS.
|
||||
@@ -104,7 +89,7 @@ export class AppService extends EventEmitter<AppEventMap> {
|
||||
const templates = await engine.listImportedTemplates();
|
||||
|
||||
templates.forEach(async (template) => {
|
||||
// engine.updateUnspentOutputsForTemplate(generateTemplateIdentifier(template));
|
||||
engine.updateUnspentOutputsForTemplate(generateTemplateIdentifier(template));
|
||||
engine.subscribeToScriptHashForTemplate(generateTemplateIdentifier(template));
|
||||
});
|
||||
};
|
||||
@@ -114,11 +99,11 @@ export class AppService extends EventEmitter<AppEventMap> {
|
||||
// Set default locking parameters for P2PKH
|
||||
// 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(parseTemplate(p2pkhTemplate)),
|
||||
// "receiveOutput",
|
||||
// "receiver",
|
||||
// );
|
||||
await engine.setDefaultLockingParameters(
|
||||
generateTemplateIdentifier(parseTemplate(p2pkhTemplate)),
|
||||
"receiveOutput",
|
||||
"receiver",
|
||||
);
|
||||
|
||||
// Create our own storage for the invitations
|
||||
const storage = await Storage.create(config.invitationStoragePath);
|
||||
|
||||
Reference in New Issue
Block a user