Skip to content

Commit

Permalink
fix: incorrect atom type when querying with block hash (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
tien authored Aug 20, 2024
1 parent 7965340 commit 255c1c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/rude-eels-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@reactive-dot/core": patch
---

Fixed incorrect atom type when querying with block hash.
4 changes: 4 additions & 0 deletions packages/core/src/actions/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export function preflight<TInstruction extends QueryInstruction>(
? "observable"
: "promise" | "observable";

if ("at" in instruction && instruction.at?.startsWith("0x")) {
return "promise" as Return;
}

switch (instruction.instruction) {
case "get-constant":
case "call-api":
Expand Down

0 comments on commit 255c1c8

Please sign in to comment.