diff --git a/package.json b/package.json index ba82523fb..a9807be70 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "@types/semver": "^7.3.9", "@types/uuid": "^9.0.0", "@vitejs/plugin-react": "^4.0.4", + "@webbtc/webln-types": "^3.0.0", "autoprefixer": "^10.4.15", "axios": "^1.2.2", "axios-mock-adapter": "^1.22.0", diff --git a/src/api/hooks/nostr/useSignerStream.ts b/src/api/hooks/nostr/useSignerStream.ts index 56db382b1..c2a0b13a1 100644 --- a/src/api/hooks/nostr/useSignerStream.ts +++ b/src/api/hooks/nostr/useSignerStream.ts @@ -57,9 +57,7 @@ function useSignerStream() { return; } - // @ts-ignore await window.webln?.enable(); - // @ts-ignore await window.webln?.sendPayment(reqMsg.data.params.invoice); } diff --git a/src/components/status-action-bar.tsx b/src/components/status-action-bar.tsx index f8d252dc4..3ee4f4aab 100644 --- a/src/components/status-action-bar.tsx +++ b/src/components/status-action-bar.tsx @@ -791,7 +791,7 @@ const StatusActionBar: React.FC = ({ /> )} - {acceptsZaps && ( + {(acceptsZaps && window.webln) && (