Skip to content

Commit

Permalink
Fix isPhantom check
Browse files Browse the repository at this point in the history
  • Loading branch information
yurushao committed Feb 1, 2025
1 parent 7ec0d48 commit 0993931
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion anchor/src/client/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,11 @@ export class BaseClient {
}

isPhantom(): boolean {
if (!isBrowser) return false;
// Phantom automatically estimates fees
// https://docs.phantom.app/developer-powertools/solana-priority-fees#how-phantom-applies-priority-fees-to-dapp-transactions
return (
//@ts-ignore
// @ts-ignore
window?.phantom?.solana?.isPhantom && window?.phantom?.solana?.isConnected
);
}
Expand Down

0 comments on commit 0993931

Please sign in to comment.