Move wallet status

This commit is contained in:
ekzyis 2025-04-01 00:52:47 +02:00
parent 7be94dcfed
commit e401c6f277
3 changed files with 10 additions and 10 deletions

View File

@ -3,12 +3,12 @@ import styles from '@/styles/wallet.module.css'
import Plug from '@/svgs/plug.svg'
import Gear from '@/svgs/settings-5-fill.svg'
import Link from 'next/link'
import { Status, isConfigured } from '@/wallets/common'
import { isConfigured } from '@/wallets/common'
import DraggableIcon from '@/svgs/draggable.svg'
import RecvIcon from '@/svgs/arrow-left-down-line.svg'
import SendIcon from '@/svgs/arrow-right-up-line.svg'
import { useWalletImage } from '@/wallets/image'
import { useWalletStatus, statusToClass } from '@/wallets/status'
import { useWalletStatus, statusToClass, Status } from '@/wallets/status'
import { useWalletSupport } from '@/wallets/support'
export default function WalletCard ({ wallet, draggable, onDragStart, onDragEnter, onDragEnd, onTouchStart, sourceIndex, targetIndex, index }) {

View File

@ -1,12 +1,5 @@
import walletDefs from '@/wallets/client'
export const Status = {
Enabled: 'Enabled',
Disabled: 'Disabled',
Error: 'Error',
Warning: 'Warning'
}
export function getWalletByName (name) {
return walletDefs.find(def => def.name === name)
}

View File

@ -1,7 +1,14 @@
import { canReceive, canSend, isConfigured, Status } from '@/wallets/common'
import { canReceive, canSend, isConfigured } from '@/wallets/common'
import { useWalletLogs } from '@/wallets/logger'
import styles from '@/styles/wallet.module.css'
export const Status = {
Enabled: 'Enabled',
Disabled: 'Disabled',
Error: 'Error',
Warning: 'Warning'
}
export function useWalletStatus (wallet) {
const { logs } = useWalletLogs(wallet)