mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 16:33:36 +00:00
add npubxCash lightning address
This commit is contained in:
1 parent
565305a592
commit
579cd3584b
5 files changed
+1351
-9
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { useMemo } from 'react';
|
||||
import { useNWC } from '@/hooks/useNWCContext';
|
||||
import { useCashu } from '@/hooks/useCashu';
|
||||
import { useNpubCash } from '@/hooks/useNpubCash';
|
||||
import type { WebLNProvider } from '@webbtc/webln-types';
|
||||
|
||||
export interface WalletStatus {
|
||||
@@ -12,11 +13,15 @@ export interface WalletStatus {
|
||||
hasCashu: boolean;
|
||||
cashuBalance: number;
|
||||
isCashuInitialized: boolean;
|
||||
// npub.cash integration
|
||||
lightningAddress: string | null;
|
||||
unclaimedSats: number;
|
||||
}
|
||||
|
||||
export function useWallet() {
|
||||
const { connections, getActiveConnection } = useNWC();
|
||||
const { balances, mints, isInitialized: isCashuInitialized } = useCashu();
|
||||
const { lightningAddress, unclaimedAmount } = useNpubCash();
|
||||
|
||||
// Get the active connection directly - no memoization to avoid stale state
|
||||
const activeNWC = getActiveConnection();
|
||||
@@ -55,6 +60,8 @@ export function useWallet() {
|
||||
hasCashu,
|
||||
cashuBalance,
|
||||
isCashuInitialized,
|
||||
lightningAddress,
|
||||
unclaimedSats: unclaimedAmount,
|
||||
};
|
||||
|
||||
return status;
|
||||
|
||||
Reference in new issue
Block a user