Skip to content

Commit 1d8b4f8

Browse files
committed
Update payInvoice.ts
1 parent 1fbc31a commit 1d8b4f8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/plugin-lightning/src/actions/payInvoice.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
composeContext,
44
generateObjectV2,
55
ModelClass,
6+
elizaLogger
67
} from "@elizaos/core";
78

89
import {
@@ -62,7 +63,7 @@ export const payInvoiceAction = {
6263
_options: any,
6364
callback?: any
6465
) => {
65-
console.log("payInvoice action handler called");
66+
elizaLogger.log("payInvoice action handler called");
6667
const lightningProvider = await initLightningProvider(runtime);
6768
const action = new PayInvoiceAction(lightningProvider);
6869

@@ -84,7 +85,7 @@ export const payInvoiceAction = {
8485

8586
try {
8687
const payInvoiceResp = await action.payInvoice(payInvoiceOptions);
87-
console.log("🚀 ~ payInvoiceResp:", payInvoiceResp);
88+
elizaLogger.log("🚀 ~ payInvoiceResp:", payInvoiceResp);
8889

8990
if (callback) {
9091
let text = "";
@@ -102,7 +103,7 @@ export const payInvoiceAction = {
102103
}
103104
return true;
104105
} catch (error) {
105-
console.error("Error in payInvoice handler:", error);
106+
elizaLogger.error("Error in payInvoice handler:", error);
106107
if (callback) {
107108
callback({ text: `Error: ${error.message || 'An error occurred'}` });
108109
}

0 commit comments

Comments
 (0)