From 60a1dfa5550348b650bb7089e644ec2b8b5afcee Mon Sep 17 00:00:00 2001 From: Ian Macalinao Date: Sat, 1 Nov 2025 07:18:40 +0800 Subject: [PATCH 1/2] fix error message for grill context --- packages/grill/src/contexts/grill-context.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/grill/src/contexts/grill-context.ts b/packages/grill/src/contexts/grill-context.ts index 7ec9e54..706de7d 100644 --- a/packages/grill/src/contexts/grill-context.ts +++ b/packages/grill/src/contexts/grill-context.ts @@ -14,6 +14,11 @@ import { createContext, useContext } from "react"; export interface GrillContextValue { /** DataLoader instance for batching and caching Solana account requests */ accountLoader: DataLoader; + /** + * Refetches the given accounts. + * @param addresses + * @returns + */ refetchAccounts: (addresses: Address[]) => Promise; /** @@ -50,9 +55,7 @@ export const GrillContext: React.Context = export const useGrillContext = (): GrillContextValue => { const context = useContext(GrillContext); if (!context) { - throw new Error( - "useSolanaAccountContext must be used within a SolanaAccountProvider", - ); + throw new Error("useGrillContext must be used within a GrillProvider"); } return context; }; From cd3464ce399e4afdf7eedd577b4d82894119b2ae Mon Sep 17 00:00:00 2001 From: Ian Macalinao Date: Sat, 1 Nov 2025 07:22:35 +0800 Subject: [PATCH 2/2] docs(changeset): fix error message for using context in wrong spot --- .changeset/legal-yaks-tell.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/legal-yaks-tell.md diff --git a/.changeset/legal-yaks-tell.md b/.changeset/legal-yaks-tell.md new file mode 100644 index 0000000..57dd8e6 --- /dev/null +++ b/.changeset/legal-yaks-tell.md @@ -0,0 +1,5 @@ +--- +"@macalinao/grill": patch +--- + +fix error message for using context in wrong spot