Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(explorer): various fixes #3195

Merged
merged 11 commits into from
Sep 19, 2024
Merged
10 changes: 10 additions & 0 deletions .changeset/unlucky-icons-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@latticexyz/explorer": patch
---

Fixed an issue where the `observer` Viem client decorator required an empty object arg when no options are used.

```diff
-client.extend(observer({}));
+client.extend(observer());
```
2 changes: 1 addition & 1 deletion packages/explorer/src/observer/decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type ObserverOptions = {
export function observer<transport extends Transport, chain extends Chain, account extends Account>({
explorerUrl = "http://localhost:13690",
waitForStateChange,
}: ObserverOptions): (
}: ObserverOptions = {}): (
client: Client<transport, chain, account>,
) => Pick<WalletActions<chain, account>, "writeContract"> {
const emit = createBridge({ url: `${explorerUrl}/internal/observer-relay` });
Expand Down
Loading