From faca2e50f0846979e71d3ba2fe13d666e3e8d457 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Mon, 17 Feb 2025 16:54:31 -0300 Subject: [PATCH] adapt to FetchSpecificEvent() changes. --- mcp.go | 7 +++++-- wallet.go | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mcp.go b/mcp.go index 4eba105..f664d9b 100644 --- a/mcp.go +++ b/mcp.go @@ -6,11 +6,12 @@ import ( "os" "strings" - "github.com/urfave/cli/v3" "github.com/mark3labs/mcp-go/mcp" "github.com/mark3labs/mcp-go/server" "github.com/nbd-wtf/go-nostr" "github.com/nbd-wtf/go-nostr/nip19" + "github.com/nbd-wtf/go-nostr/sdk" + "github.com/urfave/cli/v3" ) var mcpServer = &cli.Command{ @@ -139,7 +140,9 @@ var mcpServer = &cli.Command{ pm.ShortName(), pm.PubKey), ), nil case "nevent": - event, _, err := sys.FetchSpecificEventFromInput(ctx, uri, false) + event, _, err := sys.FetchSpecificEventFromInput(ctx, uri, sdk.FetchSpecificEventParameters{ + WithRelays: false, + }) if err != nil { return mcp.NewToolResultError("Couldn't find this event anywhere"), nil } diff --git a/wallet.go b/wallet.go index c6faacd..aebde63 100644 --- a/wallet.go +++ b/wallet.go @@ -7,10 +7,11 @@ import ( "strings" "github.com/fatih/color" - "github.com/urfave/cli/v3" "github.com/nbd-wtf/go-nostr" "github.com/nbd-wtf/go-nostr/nip60" "github.com/nbd-wtf/go-nostr/nip61" + "github.com/nbd-wtf/go-nostr/sdk" + "github.com/urfave/cli/v3" ) func prepareWallet(ctx context.Context, c *cli.Command) (*nip60.Wallet, func(), error) { @@ -332,7 +333,9 @@ var wallet = &cli.Command{ var eventId string if strings.HasPrefix(target, "nevent1") { - evt, _, err = sys.FetchSpecificEventFromInput(ctx, target, false) + evt, _, err = sys.FetchSpecificEventFromInput(ctx, target, sdk.FetchSpecificEventParameters{ + WithRelays: false, + }) if err != nil { return err }