Skip to content

Commit

Permalink
remove last window reference from @penumbra-zone/react (#1518)
Browse files Browse the repository at this point in the history
  • Loading branch information
turbocrime authored Jul 19, 2024
1 parent 978efe6 commit b65f9bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-flowers-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@penumbra-zone/react': patch
---

remove reference to window
11 changes: 2 additions & 9 deletions packages/react/src/penumbra-context.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import type { Transport } from '@connectrpc/connect';
import {
PenumbraProvider,
PenumbraSymbol,
type PenumbraManifest,
type PenumbraState,
} from '@penumbra-zone/client';
import { PenumbraProvider, type PenumbraManifest, type PenumbraState } from '@penumbra-zone/client';
import type { ChannelTransportOptions } from '@penumbra-zone/transport-dom/create';
import { createContext } from 'react';

const penumbraGlobal = window[PenumbraSymbol];

export type PenumbraContext = Partial<Omit<PenumbraProvider, 'manifest' | 'state'>> & {
origin?: keyof NonNullable<typeof penumbraGlobal>;
origin?: string;
manifest?: PenumbraManifest;
port?: MessagePort | false;
failure?: Error;
Expand Down

0 comments on commit b65f9bb

Please sign in to comment.