Files
microdao-daarion/backend/services/wallet/wallet.adapter.ts
Apple 3de3c8cb36 feat: Add presence heartbeat for Matrix online status
- matrix-gateway: POST /internal/matrix/presence/online endpoint
- usePresenceHeartbeat hook with activity tracking
- Auto away after 5 min inactivity
- Offline on page close/visibility change
- Integrated in MatrixChatRoom component
2025-11-27 00:19:40 -08:00

37 lines
795 B
TypeScript

/**
* Wallet Adapter (MVP Stub)
*
* On MVP: returns mock data or reads from DB/stub
* Future: integrate with on-chain data
*/
import type { Balance } from '../../domain/wallet/types';
/**
* Get balances from external source (on-chain / DB / stub)
*/
export async function getBalances(userId: string): Promise<Balance[]> {
// MVP: Return mock data
// TODO: Replace with actual DB/on-chain integration
return [
{ symbol: 'DAAR', amount: '0.0' },
{ symbol: 'DAARION', amount: '0.0' },
];
}
/**
* Get staked DAARION amount
*/
export async function getStakedDaarion(userId: string): Promise<number> {
// MVP: Return mock data
// TODO: Replace with actual DB/on-chain integration
return 0.0;
}
export const walletAdapter = {
getBalances,
getStakedDaarion,
};