Skip to content

Commit

Permalink
Improve injected provider check in OxAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangoree committed Dec 18, 2024
1 parent d362254 commit 2220abd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/drift/src/adapter/OxAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export class OxAdapter implements ReadWriteAdapter {
try {
const provider = rpcUrl
? RpcTransport.fromHttp(rpcUrl)
: "window" in globalThis
? window.ethereum
: "ethereum" in globalThis
? (globalThis as any).ethereum
: undefined;

if (!provider) {
Expand Down

0 comments on commit 2220abd

Please sign in to comment.