Wallet send+recv status derived from logs (#1559)
* Derive wallet status from logs * Add send/recv icons * Set status individually for send and recv * Move status logic into own function * Add LNbits, Blink, CLN, LND, phoenixd logo * Fix wallet.status.any not using Status enum * Fix WebLN being weird * Use phoenixd logo with text * Also use wallet logo on config page * Also poll logs for wallet status * Use logger.info for logs not relevant for wallet status * Remove no longer used wallet badges * Crop LND logo like other logos * Fix all wallets show 'configure' * Fix wallet status not respecting enabled * Fix wallet.def.requiresConfig undefined * Fix banner shown for WebLN * Fix attach shown when configured * Filter by context.status to determine wallet status * Fix +- shown without context * Fix missing theme support for wallet logos
|
@ -678,9 +678,12 @@ export const walletLogger = ({ wallet, models }) => {
|
||||||
payment_hash: decoded.id,
|
payment_hash: decoded.id,
|
||||||
created_at: decoded.created_at,
|
created_at: decoded.created_at,
|
||||||
expires_at: decoded.expires_at,
|
expires_at: decoded.expires_at,
|
||||||
description: decoded.description
|
description: decoded.description,
|
||||||
|
// payments should affect wallet status
|
||||||
|
status: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
context.recv = true
|
||||||
|
|
||||||
await models.walletLog.create({
|
await models.walletLog.create({
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -19,7 +19,16 @@ export default function LogMessage ({ showWallet, wallet, level, message, contex
|
||||||
className = 'text-info'
|
className = 'text-info'
|
||||||
}
|
}
|
||||||
|
|
||||||
const hasContext = context && Object.keys(context).length > 0
|
const filtered = context
|
||||||
|
? Object.keys(context)
|
||||||
|
.filter(key => !['send', 'recv', 'status'].includes(key))
|
||||||
|
.reduce((obj, key) => {
|
||||||
|
obj[key] = context[key]
|
||||||
|
return obj
|
||||||
|
}, {})
|
||||||
|
: {}
|
||||||
|
|
||||||
|
const hasContext = context && Object.keys(filtered).length > 0
|
||||||
|
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
if (hasContext) { setShow(show => !show) }
|
if (hasContext) { setShow(show => !show) }
|
||||||
|
@ -37,16 +46,17 @@ export default function LogMessage ({ showWallet, wallet, level, message, contex
|
||||||
<td>{message}</td>
|
<td>{message}</td>
|
||||||
<td>{indicator}</td>
|
<td>{indicator}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{show && hasContext && Object.entries(context).map(([key, value], i) => {
|
{show && hasContext && Object.entries(filtered)
|
||||||
const last = i === Object.keys(context).length - 1
|
.map(([key, value], i) => {
|
||||||
return (
|
const last = i === Object.keys(filtered).length - 1
|
||||||
<tr className={styles.line} key={i}>
|
return (
|
||||||
<td />
|
<tr className={styles.line} key={i}>
|
||||||
<td className={last ? 'pb-2 pe-1' : 'pe-1'} colSpan='2'>{key}</td>
|
<td />
|
||||||
<td className={last ? 'text-break pb-2' : 'text-break'}>{value}</td>
|
<td className={last ? 'pb-2 pe-1' : 'pe-1'} colSpan='2'>{key}</td>
|
||||||
</tr>
|
<td className={last ? 'text-break pb-2' : 'text-break'}>{value}</td>
|
||||||
)
|
</tr>
|
||||||
})}
|
)
|
||||||
|
})}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default function WalletButtonBar ({
|
||||||
return (
|
return (
|
||||||
<div className={`mt-3 ${className}`}>
|
<div className={`mt-3 ${className}`}>
|
||||||
<div className='d-flex justify-content-between'>
|
<div className='d-flex justify-content-between'>
|
||||||
{isConfigured(wallet) &&
|
{isConfigured(wallet) && wallet.def.requiresConfig &&
|
||||||
<Button onClick={onDelete} variant='grey-medium'>{deleteText}</Button>}
|
<Button onClick={onDelete} variant='grey-medium'>{deleteText}</Button>}
|
||||||
{children}
|
{children}
|
||||||
<div className='d-flex align-items-center ms-auto'>
|
<div className='d-flex align-items-center ms-auto'>
|
||||||
|
|
|
@ -1,23 +1,34 @@
|
||||||
import { Badge, Card } from 'react-bootstrap'
|
import { Card } from 'react-bootstrap'
|
||||||
import styles from '@/styles/wallet.module.css'
|
import styles from '@/styles/wallet.module.css'
|
||||||
import Plug from '@/svgs/plug.svg'
|
import Plug from '@/svgs/plug.svg'
|
||||||
import Gear from '@/svgs/settings-5-fill.svg'
|
import Gear from '@/svgs/settings-5-fill.svg'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { Status, isConfigured } from '@/wallets/common'
|
import { Status, isConfigured } from '@/wallets/common'
|
||||||
import DraggableIcon from '@/svgs/draggable.svg'
|
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 useDarkMode from './dark-mode'
|
||||||
|
import { useEffect, useState } from 'react'
|
||||||
|
|
||||||
|
const statusToClass = status => {
|
||||||
|
switch (status) {
|
||||||
|
case Status.Enabled: return styles.success
|
||||||
|
case Status.Disabled: return styles.disabled
|
||||||
|
case Status.Error: return styles.error
|
||||||
|
case Status.Warning: return styles.warning
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default function WalletCard ({ wallet, draggable, onDragStart, onDragEnter, onDragEnd, onTouchStart, sourceIndex, targetIndex, index }) {
|
export default function WalletCard ({ wallet, draggable, onDragStart, onDragEnter, onDragEnd, onTouchStart, sourceIndex, targetIndex, index }) {
|
||||||
const { card: { title, badges } } = wallet.def
|
const [dark] = useDarkMode()
|
||||||
|
const { card: { title, image } } = wallet.def
|
||||||
|
const [imgSrc, setImgSrc] = useState(image?.src)
|
||||||
|
|
||||||
let indicator = styles.disabled
|
useEffect(() => {
|
||||||
switch (wallet.status) {
|
if (!imgSrc) return
|
||||||
case Status.Enabled:
|
// wallet.png <-> wallet-dark.png
|
||||||
indicator = styles.success
|
setImgSrc(dark ? image?.src.replace(/\.([a-z]{3})$/, '-dark.$1') : image?.src)
|
||||||
break
|
}, [dark])
|
||||||
default:
|
|
||||||
indicator = styles.disabled
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
|
@ -29,8 +40,11 @@ export default function WalletCard ({ wallet, draggable, onDragStart, onDragEnte
|
||||||
onDragEnd={onDragEnd}
|
onDragEnd={onDragEnd}
|
||||||
>
|
>
|
||||||
<div className={styles.cardMeta}>
|
<div className={styles.cardMeta}>
|
||||||
{wallet.status === Status.Enabled && <DraggableIcon className={styles.drag} width={16} height={16} />}
|
<div className={styles.indicators}>
|
||||||
<div className={`${styles.indicator} ${indicator}`} />
|
{wallet.status.any !== Status.Disabled && <DraggableIcon className={styles.drag} width={16} height={16} />}
|
||||||
|
{wallet.support.recv && <RecvIcon className={`${styles.indicator} ${statusToClass(wallet.status.recv)}`} />}
|
||||||
|
{wallet.support.send && <SendIcon className={`${styles.indicator} ${statusToClass(wallet.status.send)}`} />}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Card.Body
|
<Card.Body
|
||||||
// we attach touch listener only to card body to not interfere with wallet link
|
// we attach touch listener only to card body to not interfere with wallet link
|
||||||
|
@ -40,22 +54,11 @@ export default function WalletCard ({ wallet, draggable, onDragStart, onDragEnte
|
||||||
: ''}
|
: ''}
|
||||||
style={{ cursor: draggable ? 'move' : 'default' }}
|
style={{ cursor: draggable ? 'move' : 'default' }}
|
||||||
>
|
>
|
||||||
<Card.Title>{title}</Card.Title>
|
<div className='d-flex text-center align-items-center h-100'>
|
||||||
<Card.Subtitle className='mt-2'>
|
{image
|
||||||
{badges?.map(
|
? <img alt={title} width='100%' {...image} src={imgSrc} />
|
||||||
badge => {
|
: <Card.Title className='w-100 justify-content-center align-items-center'>{title}</Card.Title>}
|
||||||
let style = ''
|
</div>
|
||||||
switch (badge) {
|
|
||||||
case 'receive': style = styles.receive; break
|
|
||||||
case 'send': style = styles.send; break
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<Badge className={`${styles.badge} ${style}`} key={badge} bg={null}>
|
|
||||||
{badge}
|
|
||||||
</Badge>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</Card.Subtitle>
|
|
||||||
</Card.Body>
|
</Card.Body>
|
||||||
<Link href={`/settings/wallets/${wallet.def.name}`}>
|
<Link href={`/settings/wallets/${wallet.def.name}`}>
|
||||||
<Card.Footer className={styles.attach}>
|
<Card.Footer className={styles.attach}>
|
||||||
|
|
|
@ -174,9 +174,12 @@ export function useWalletLogger (wallet, setLogs) {
|
||||||
payment_hash: decoded.tagsObject.payment_hash,
|
payment_hash: decoded.tagsObject.payment_hash,
|
||||||
description: decoded.tagsObject.description,
|
description: decoded.tagsObject.description,
|
||||||
created_at: new Date(decoded.timestamp * 1000).toISOString(),
|
created_at: new Date(decoded.timestamp * 1000).toISOString(),
|
||||||
expires_at: new Date(decoded.timeExpireDate * 1000).toISOString()
|
expires_at: new Date(decoded.timeExpireDate * 1000).toISOString(),
|
||||||
|
// payments should affect wallet status
|
||||||
|
status: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
context.send = true
|
||||||
|
|
||||||
appendLog(wallet, level, message, context)
|
appendLog(wallet, level, message, context)
|
||||||
console[level !== 'error' ? 'info' : 'error'](`[${tag(wallet)}]`, message)
|
console[level !== 'error' ? 'info' : 'error'](`[${tag(wallet)}]`, message)
|
||||||
|
|
|
@ -67,10 +67,16 @@ export default function WalletSettings () {
|
||||||
}
|
}
|
||||||
}, [wallet.def])
|
}, [wallet.def])
|
||||||
|
|
||||||
|
const { card: { image, title, subtitle } } = wallet?.def || { card: {} }
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CenterLayout>
|
<CenterLayout>
|
||||||
<h2 className='pb-2'>{wallet?.def.card.title}</h2>
|
{image
|
||||||
<h6 className='text-muted text-center pb-3'><Text>{wallet?.def.card.subtitle}</Text></h6>
|
? typeof image === 'object'
|
||||||
|
? <img {...image} alt={title} className='pb-2' />
|
||||||
|
: <img src={image} width='33%' alt={title} className='pb-2' />
|
||||||
|
: <h2 className='pb-2'>{title}</h2>}
|
||||||
|
<h6 className='text-muted text-center pb-3'><Text>{subtitle}</Text></h6>
|
||||||
<Form
|
<Form
|
||||||
initial={initial}
|
initial={initial}
|
||||||
enableReinitialize
|
enableReinitialize
|
||||||
|
@ -128,7 +134,7 @@ export default function WalletSettings () {
|
||||||
|
|
||||||
function SendWarningBanner ({ walletDef }) {
|
function SendWarningBanner ({ walletDef }) {
|
||||||
const { values } = useFormikContext()
|
const { values } = useFormikContext()
|
||||||
if (!canSend({ def: walletDef, config: values })) return null
|
if (!canSend({ def: walletDef, config: values }) || !walletDef.requiresConfig) return null
|
||||||
|
|
||||||
return <WalletSecurityBanner />
|
return <WalletSecurityBanner />
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<svg width="770" height="235" viewBox="0 0 770 235" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M145.76 4.26997C145.66 4.23997 145.55 4.20998 145.44 4.18998C136.01 1.84998 126.57 0.72998 117.27 0.72998H117.23C64.88 0.74998 17.27 36.25 4.09999 89.36C-11.41 151.91 26.72 215.2 89.27 230.71C98.7 233.05 108.15 234.17 117.45 234.17C169.82 234.17 217.45 198.66 230.62 145.54C246.1 83.11 208.15 19.93 145.76 4.26997ZM221.46 143.27C209.57 191.23 166.79 224.73 117.45 224.73C108.77 224.73 100.05 223.66 91.54 221.55C63.73 214.66 40.28 197.35 25.49 172.81C10.7 148.27 6.35999 119.44 13.26 91.64C25.15 43.69 67.97 10.2 117.3 10.17C125.97 10.17 134.67 11.24 143.25 13.37L143.36 13.4L143.47 13.43C200.67 27.78 235.65 86.03 221.46 143.27Z" fill="white"/>
|
||||||
|
<path d="M141.68 101.83C138.33 115.24 117.89 108.36 111.25 106.72L117.11 83.26C123.64 84.87 145.03 87.95 141.57 101.82H141.68V101.83ZM138.03 139.73C134.41 154.34 109.81 146.43 101.84 144.45L108.31 118.55C116.28 120.56 141.82 124.48 138.03 139.73ZM164.84 102.03C166.95 87.75 156.09 80.08 141.38 74.99L146.21 55.65L134.31 52.7L129.62 71.53C126.54 70.76 123.35 70.02 120.2 69.32L124.89 50.29L113.13 47.34L108.3 66.68L100.8 65L84.55 60.94L81.43 73.51C81.43 73.51 89.55 75.49 89.98 75.65C92.61 76.18 95.73 79.01 95.48 82.35L82.27 135.3C81.55 137.56 79.14 138.8 76.88 138.08C76.63 138.01 68.3 135.97 68.3 135.97L62.47 149.38L77.78 153.17L86.16 155.35L81.3 174.89L93.06 177.84L97.89 158.5C101.06 159.37 104.18 160.17 107.24 160.91L102.48 180.31L114.24 183.22L119.1 163.72C139.21 167.51 154.25 166 160.62 147.84C165.75 133.23 160.35 124.82 149.8 119.32C157.5 117.55 163.2 112.63 164.84 102.03Z" fill="white"/>
|
||||||
|
<path d="M338.06 82.01C345.36 82.01 351.67 83.3 356.99 85.89C362.31 88.48 366.72 91.97 370.22 96.38C373.72 100.79 376.3 105.96 377.98 111.89C379.65 117.82 380.49 124.21 380.49 131.05C380.49 141.54 378.55 151.47 374.67 160.82C370.79 170.17 365.51 178.31 358.82 185.23C352.13 192.15 344.22 197.63 335.09 201.65C325.97 205.68 316.08 207.7 305.43 207.7C304.06 207.7 301.67 207.66 298.24 207.59C294.82 207.51 290.9 207.17 286.49 206.56C282.08 205.95 277.4 205.04 272.46 203.82C267.52 202.61 262.84 200.93 258.43 198.8L297.89 32.96L333.25 27.49L319.1 86.35C322.14 84.98 325.18 83.92 328.23 83.16C331.29 82.39 334.56 82.01 338.06 82.01ZM308.41 179.64C313.73 179.64 318.75 178.35 323.47 175.76C328.18 173.18 332.25 169.72 335.67 165.38C339.09 161.05 341.79 156.14 343.77 150.67C345.75 145.19 346.74 139.49 346.74 133.56C346.74 126.26 345.52 120.56 343.09 116.45C340.66 112.35 336.17 110.29 329.63 110.29C327.5 110.29 324.73 110.67 321.3 111.43C317.88 112.19 314.8 113.79 312.06 116.22L297 178.73C297.91 178.88 298.71 179.03 299.39 179.19C300.07 179.34 300.79 179.46 301.56 179.53C302.32 179.61 303.23 179.64 304.3 179.64C305.36 179.64 306.73 179.64 308.41 179.64Z" fill="white"/>
|
||||||
|
<path d="M434.78 206.79C423.98 206.79 415.5 205.38 409.35 202.57C403.19 199.76 398.78 195.92 396.12 191.05C393.46 186.18 392.16 180.6 392.24 174.28C392.32 167.97 393.19 161.24 394.86 154.09L423.83 32.96L459.19 27.49L427.48 158.88C426.87 161.62 426.53 164.13 426.45 166.41C426.37 168.69 426.79 170.71 427.71 172.45C428.62 174.2 430.18 175.61 432.39 176.67C434.59 177.73 437.67 178.42 441.63 178.72L434.78 206.79Z" fill="white"/>
|
||||||
|
<path d="M486.11 204.51H452.35L480.86 84.52H514.85L486.11 204.51Z" fill="white"/>
|
||||||
|
<path d="M539.94 89.99C542.52 89.23 545.38 88.36 548.49 87.37C551.61 86.38 555.11 85.47 558.98 84.63C562.86 83.8 567.19 83.11 571.99 82.58C576.78 82.05 582.22 81.78 588.3 81.78C606.24 81.78 618.56 86.95 625.26 97.29C631.95 107.63 633.09 121.78 628.68 139.72L613.17 204.51H579.18L594.24 141.09C595.15 137.14 595.87 133.3 596.41 129.57C596.94 125.84 596.9 122.57 596.3 119.76C595.69 116.95 594.28 114.67 592.08 112.92C589.87 111.17 586.49 110.3 581.93 110.3C577.52 110.3 573.03 110.76 568.47 111.67L546.34 204.51H512.35L539.94 89.99Z" fill="white"/>
|
||||||
|
<path d="M684.79 127.86C693.91 120.56 702.5 113.11 710.57 105.5C718.63 97.9 725.55 90.9 731.33 84.51H769.65C761.13 93.94 752.27 103.18 743.07 112.23C733.87 121.28 723.34 130.9 711.47 141.09C714.66 145.05 717.89 149.61 721.17 154.78C724.44 159.95 727.56 165.35 730.52 170.98C733.49 176.61 736.22 182.31 738.73 188.09C741.24 193.87 743.33 199.35 745 204.52H707.13C705.76 200.57 704.05 196.23 702 191.52C699.95 186.81 697.67 182.13 695.16 177.49C692.65 172.85 690.03 168.33 687.29 163.92C684.55 159.51 681.82 155.56 679.08 152.06L666.31 204.53H632.55L673.61 32.98L708.97 27.51L684.79 127.86Z" fill="white"/>
|
||||||
|
<path d="M526.82 48.28C526.82 51.44 526.22 54.38 525.01 57.12C523.81 59.86 522.16 62.25 520.09 64.28C518.01 66.31 515.58 67.93 512.8 69.14C510.02 70.34 507.05 70.95 503.9 70.95C500.74 70.95 497.78 70.35 495 69.14C492.22 67.94 489.81 66.32 487.78 64.28C485.75 62.25 484.13 59.86 482.92 57.12C481.72 54.38 481.12 51.44 481.12 48.28C481.12 45.21 481.72 42.28 482.92 39.5C484.12 36.72 485.74 34.31 487.78 32.28C489.82 30.25 492.22 28.63 495 27.42C497.78 26.22 500.75 25.61 503.9 25.61C507.05 25.61 510.02 26.21 512.8 27.42C515.58 28.63 518.01 30.24 520.09 32.28C522.16 34.31 523.8 36.72 525.01 39.5C526.22 42.28 526.82 45.21 526.82 48.28Z" fill="white"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.0 KiB |
|
@ -0,0 +1,10 @@
|
||||||
|
<svg width="770" height="235" viewBox="0 0 770 235" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M145.76 4.26997C145.66 4.23997 145.55 4.20998 145.44 4.18998C136.01 1.84998 126.57 0.72998 117.27 0.72998H117.23C64.88 0.74998 17.27 36.25 4.09999 89.36C-11.41 151.91 26.72 215.2 89.27 230.71C98.7 233.05 108.15 234.17 117.45 234.17C169.82 234.17 217.45 198.66 230.62 145.54C246.1 83.11 208.15 19.93 145.76 4.26997ZM221.46 143.27C209.57 191.23 166.79 224.73 117.45 224.73C108.77 224.73 100.05 223.66 91.54 221.55C63.73 214.66 40.28 197.35 25.49 172.81C10.7 148.27 6.35999 119.44 13.26 91.64C25.15 43.69 67.97 10.2 117.3 10.17C125.97 10.17 134.67 11.24 143.25 13.37L143.36 13.4L143.47 13.43C200.67 27.78 235.65 86.03 221.46 143.27Z" fill="black"/>
|
||||||
|
<path d="M141.68 101.83C138.33 115.24 117.89 108.36 111.25 106.72L117.11 83.26C123.64 84.87 145.03 87.95 141.57 101.82H141.68V101.83ZM138.03 139.73C134.41 154.34 109.81 146.43 101.84 144.45L108.31 118.55C116.28 120.56 141.82 124.48 138.03 139.73ZM164.84 102.03C166.95 87.75 156.09 80.08 141.38 74.99L146.21 55.65L134.31 52.7L129.62 71.53C126.54 70.76 123.35 70.02 120.2 69.32L124.89 50.29L113.13 47.34L108.3 66.68L100.8 65L84.55 60.94L81.43 73.51C81.43 73.51 89.55 75.49 89.98 75.65C92.61 76.18 95.73 79.01 95.48 82.35L82.27 135.3C81.55 137.56 79.14 138.8 76.88 138.08C76.63 138.01 68.3 135.97 68.3 135.97L62.47 149.38L77.78 153.17L86.16 155.35L81.3 174.89L93.06 177.84L97.89 158.5C101.06 159.37 104.18 160.17 107.24 160.91L102.48 180.31L114.24 183.22L119.1 163.72C139.21 167.51 154.25 166 160.62 147.84C165.75 133.23 160.35 124.82 149.8 119.32C157.5 117.55 163.2 112.63 164.84 102.03Z" fill="black"/>
|
||||||
|
<path d="M338.06 82.01C345.36 82.01 351.67 83.3 356.99 85.89C362.31 88.48 366.72 91.97 370.22 96.38C373.72 100.79 376.3 105.96 377.98 111.89C379.65 117.82 380.49 124.21 380.49 131.05C380.49 141.54 378.55 151.47 374.67 160.82C370.79 170.17 365.51 178.31 358.82 185.23C352.13 192.15 344.22 197.63 335.09 201.65C325.97 205.68 316.08 207.7 305.43 207.7C304.06 207.7 301.67 207.66 298.24 207.59C294.82 207.51 290.9 207.17 286.49 206.56C282.08 205.95 277.4 205.04 272.46 203.82C267.52 202.61 262.84 200.93 258.43 198.8L297.89 32.96L333.25 27.49L319.1 86.35C322.14 84.98 325.18 83.92 328.23 83.16C331.29 82.39 334.56 82.01 338.06 82.01ZM308.41 179.64C313.73 179.64 318.75 178.35 323.47 175.76C328.18 173.18 332.25 169.72 335.67 165.38C339.09 161.05 341.79 156.14 343.77 150.67C345.75 145.19 346.74 139.49 346.74 133.56C346.74 126.26 345.52 120.56 343.09 116.45C340.66 112.35 336.17 110.29 329.63 110.29C327.5 110.29 324.73 110.67 321.3 111.43C317.88 112.19 314.8 113.79 312.06 116.22L297 178.73C297.91 178.88 298.71 179.03 299.39 179.19C300.07 179.34 300.79 179.46 301.56 179.53C302.32 179.61 303.23 179.64 304.3 179.64C305.36 179.64 306.73 179.64 308.41 179.64Z" fill="black"/>
|
||||||
|
<path d="M434.78 206.79C423.98 206.79 415.5 205.38 409.35 202.57C403.19 199.76 398.78 195.92 396.12 191.05C393.46 186.18 392.16 180.6 392.24 174.28C392.32 167.97 393.19 161.24 394.86 154.09L423.83 32.96L459.19 27.49L427.48 158.88C426.87 161.62 426.53 164.13 426.45 166.41C426.37 168.69 426.79 170.71 427.71 172.45C428.62 174.2 430.18 175.61 432.39 176.67C434.59 177.73 437.67 178.42 441.63 178.72L434.78 206.79Z" fill="black"/>
|
||||||
|
<path d="M486.11 204.51H452.35L480.86 84.52H514.85L486.11 204.51Z" fill="black"/>
|
||||||
|
<path d="M539.94 89.99C542.52 89.23 545.38 88.36 548.49 87.37C551.61 86.38 555.11 85.47 558.98 84.63C562.86 83.8 567.19 83.11 571.99 82.58C576.78 82.05 582.22 81.78 588.3 81.78C606.24 81.78 618.56 86.95 625.26 97.29C631.95 107.63 633.09 121.78 628.68 139.72L613.17 204.51H579.18L594.24 141.09C595.15 137.14 595.87 133.3 596.41 129.57C596.94 125.84 596.9 122.57 596.3 119.76C595.69 116.95 594.28 114.67 592.08 112.92C589.87 111.17 586.49 110.3 581.93 110.3C577.52 110.3 573.03 110.76 568.47 111.67L546.34 204.51H512.35L539.94 89.99Z" fill="black"/>
|
||||||
|
<path d="M684.79 127.86C693.91 120.56 702.5 113.11 710.57 105.5C718.63 97.9 725.55 90.9 731.33 84.51H769.65C761.13 93.94 752.27 103.18 743.07 112.23C733.87 121.28 723.34 130.9 711.47 141.09C714.66 145.05 717.89 149.61 721.17 154.78C724.44 159.95 727.56 165.35 730.52 170.98C733.49 176.61 736.22 182.31 738.73 188.09C741.24 193.87 743.33 199.35 745 204.52H707.13C705.76 200.57 704.05 196.23 702 191.52C699.95 186.81 697.67 182.13 695.16 177.49C692.65 172.85 690.03 168.33 687.29 163.92C684.55 159.51 681.82 155.56 679.08 152.06L666.31 204.53H632.55L673.61 32.98L708.97 27.51L684.79 127.86Z" fill="black"/>
|
||||||
|
<path d="M526.82 48.28C526.82 51.44 526.22 54.38 525.01 57.12C523.81 59.86 522.16 62.25 520.09 64.28C518.01 66.31 515.58 67.93 512.8 69.14C510.02 70.34 507.05 70.95 503.9 70.95C500.74 70.95 497.78 70.35 495 69.14C492.22 67.94 489.81 66.32 487.78 64.28C485.75 62.25 484.13 59.86 482.92 57.12C481.72 54.38 481.12 51.44 481.12 48.28C481.12 45.21 481.72 42.28 482.92 39.5C484.12 36.72 485.74 34.31 487.78 32.28C489.82 30.25 492.22 28.63 495 27.42C497.78 26.22 500.75 25.61 503.9 25.61C507.05 25.61 510.02 26.21 512.8 27.42C515.58 28.63 518.01 30.24 520.09 32.28C522.16 34.31 523.8 36.72 525.01 39.5C526.22 42.28 526.82 45.21 526.82 48.28Z" fill="black"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.0 KiB |
|
@ -0,0 +1,65 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 27.8.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 350.8 134.4" style="enable-background:new 0 0 350.8 134.4;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#FFFFFF;}
|
||||||
|
.st1{fill:#F0D003;}
|
||||||
|
.st2{fill:#FFFAE6;}
|
||||||
|
</style>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<polygon class="st0" points="92.9,103.8 92.9,76.6 86.8,76.6 86.8,108.9 104.4,108.9 106.9,103.8 "/>
|
||||||
|
<rect x="117" y="76.6" class="st0" width="6.1" height="32.3"/>
|
||||||
|
<polygon class="st0" points="193.2,108.9 193.2,76.6 187,76.6 187,89.6 175.2,89.6 175.2,76.6 169,76.6 169,108.9 175.2,108.9
|
||||||
|
175.2,94.7 187,94.7 187,108.9 "/>
|
||||||
|
<polygon class="st0" points="226,76.6 204.7,76.6 202.1,81.7 211,81.7 211,108.9 217.1,108.9 217.1,81.7 223.4,81.7 "/>
|
||||||
|
<polygon class="st0" points="259.2,108.9 259.2,76.6 253.4,76.6 253.4,97.8 240.2,76.6 235.1,76.6 235.1,108.9 240.9,108.9
|
||||||
|
240.9,87.9 254.1,108.9 "/>
|
||||||
|
<rect x="271.6" y="76.6" class="st0" width="6.1" height="32.3"/>
|
||||||
|
<polygon class="st0" points="314.2,108.9 314.2,76.6 308.4,76.6 308.4,97.8 295.1,76.6 290,76.6 290,108.9 295.8,108.9
|
||||||
|
295.8,87.9 309,108.9 "/>
|
||||||
|
<g>
|
||||||
|
<path class="st0" d="M334.4,109c0.4,0.1,0.8,0.2,1.2,0.2h0.1c0.7,0.1,1.2,0.1,1.8,0.1c0.5,0,1,0,1.5-0.1l0,0l0,0c0,0,0,0,0.1,0
|
||||||
|
h0.1c3.4-0.3,6.2-1.6,8.5-3.8c2.2-2.2,3.1-5,3.1-9.9v-4.7h-9.4l-2.8,5.1h5.9h0.1V96v1.2c0,1.9-0.5,3.4-1.5,4.5
|
||||||
|
c-1.3,1.3-2.8,1.7-4,1.9c-0.5,0.1-1,0.1-1.4,0.1c-4,0-8.1-3.4-8.1-11c0-5.5,2.4-11.1,7.9-11.1c0.4,0,0.8,0,1.2,0.1
|
||||||
|
c2.2,0.4,4.8,1.8,5.7,4.3l5.2-3c-0.6-1.2-3.5-6-10.5-6.8H339l0,0l0,0c-0.5,0-1-0.1-1.5-0.1c-1,0-2.1,0.1-3.1,0.4h-0.1h-0.1
|
||||||
|
c-0.2,0-0.4,0.1-0.6,0.2c-6.3,1.8-10.2,8-10,16.1c0,8.2,4,14.3,10.3,16.1v0.1l0,0l0,0l0,0C334,108.9,334.2,109,334.4,109z"/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path class="st0" d="M143.2,109c0.4,0.1,0.8,0.2,1.2,0.2h0.1c0.7,0.1,1.2,0.1,1.8,0.1c0.5,0,1,0,1.5-0.1l0,0l0,0c0,0,0,0,0.1,0
|
||||||
|
h0.1c3.4-0.3,6.2-1.6,8.5-3.8c2.2-2.2,3.1-5,3.1-9.9v-4.7h-9.4l-2.8,5.1h5.9h0.1V96v1.2c0,1.9-0.5,3.4-1.5,4.5
|
||||||
|
c-1.3,1.3-2.8,1.7-4,1.9c-0.5,0.1-1,0.1-1.4,0.1c-4,0-8.1-3.4-8.1-11c0-5.5,2.4-11.1,7.9-11.1c0.4,0,0.8,0,1.2,0.1
|
||||||
|
c2.2,0.4,4.8,1.8,5.7,4.3l5.2-3c-0.6-1.2-3.5-6-10.5-6.8h-0.1l0,0l0,0c-0.5,0-1-0.1-1.5-0.1c-1,0-2.1,0.1-3.1,0.4h-0.1H143
|
||||||
|
c-0.2,0-0.4,0.1-0.6,0.2c-6.3,1.8-10.2,8-10,16.1c0,8.2,4,14.3,10.3,16.1v0.1l0,0l0,0l0,0C142.8,108.9,143,109,143.2,109z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path class="st1" d="M166.6,45.1l5.8,12.7h6.7l-6.7-13.9l0.3-0.1c3.6-1.5,5.4-4.4,5.4-8.6c0-6.3-4.3-9.8-12-9.8h-11.5v32.3h6.1
|
||||||
|
V44.8h5.8L166.6,45.1z M160.8,39.9v-9.2h4.7c3.2,0,6.5,0.6,6.5,4.6s-3.1,4.5-6.5,4.5L160.8,39.9L160.8,39.9z"/>
|
||||||
|
<polygon class="st1" points="208.9,30.7 208.9,25.6 189,25.6 189,57.9 208.9,57.9 208.9,52.8 195.1,52.8 195.1,43.7 207.5,43.7
|
||||||
|
207.5,38.6 195.1,38.6 195.1,30.7 "/>
|
||||||
|
<path class="st1" d="M98.9,53.1c-0.4,0-0.8,0.1-1.2,0.1c-5.6,0-8.1-5.7-8.1-11.3l0,0l0,0c0-5.6,2.5-11.3,8.1-11.3
|
||||||
|
c0.4,0,0.8,0,1.2,0.1c2.2,0.4,4.9,1.8,5.8,4.3l5-2.9c-0.8-1.5-3.7-5.9-10.4-6.6h-0.2c-0.5,0-1-0.1-1.4-0.1c-1,0-2.1,0.1-3.1,0.4
|
||||||
|
h-0.2c-0.2,0-0.4,0.1-0.6,0.2c-6.3,1.8-10.1,7.9-10,15.9l0,0l0,0l0,0l0,0c-0.1,8,3.7,14.1,10,15.9c0.2,0.1,0.4,0.1,0.6,0.2h0.2
|
||||||
|
c1,0.2,2.1,0.4,3.1,0.4c0.4,0,0.9,0,1.4-0.1h0.2c6.8-0.7,9.6-5.1,10.4-6.6l-5-2.9C103.8,51.2,101.1,52.7,98.9,53.1z"/>
|
||||||
|
<path class="st1" d="M145.6,41.7L145.6,41.7c0-3.8-0.8-7.2-2.3-9.9l0,0c-0.4-0.8-1.5-2.5-3.4-4c-0.1,0-0.1-0.1-0.2-0.1
|
||||||
|
c-0.1-0.1-0.3-0.2-0.5-0.3c-1.1-0.8-2.4-1.4-3.7-1.8c-0.2-0.1-0.4-0.1-0.6-0.2h-0.2c-1-0.2-2.1-0.4-3.1-0.4c-0.1,0-0.1,0-0.2,0
|
||||||
|
s-0.1,0-0.2,0c-1.1,0-2.1,0.1-3.1,0.4h-0.2c-0.2,0-0.4,0.1-0.6,0.2c-1.4,0.4-2.6,1-3.7,1.8c-0.2,0.1-0.3,0.2-0.5,0.3
|
||||||
|
c-0.1,0-0.1,0.1-0.2,0.1c-1.9,1.5-3,3.1-3.4,4l0,0c-1.6,2.7-2.4,6.1-2.3,9.9l0,0l0,0l0,0l0,0c0,3.8,0.8,7.2,2.3,9.9l0,0
|
||||||
|
c0.4,0.8,1.5,2.5,3.4,4c0.1,0,0.1,0.1,0.2,0.1c0.1,0.1,0.3,0.2,0.5,0.3c1.1,0.8,2.4,1.4,3.7,1.8c0.2,0.1,0.4,0.1,0.6,0.2h0.2
|
||||||
|
c1,0.2,2.1,0.4,3.1,0.4c0.1,0,0.1,0,0.2,0c0.1,0,0.1,0,0.2,0c1.1,0,2.1-0.1,3.1-0.4h0.2c0.2,0,0.4-0.1,0.6-0.2
|
||||||
|
c1.4-0.4,2.6-1,3.7-1.8c0.2-0.1,0.3-0.2,0.5-0.3c0.1,0,0.1-0.1,0.2-0.1c1.9-1.5,3-3.1,3.4-4l0,0
|
||||||
|
C144.9,48.9,145.7,45.5,145.6,41.7L145.6,41.7C145.6,41.8,145.6,41.8,145.6,41.7L145.6,41.7z M135.1,52.1
|
||||||
|
c-0.9,0.5-1.8,0.8-2.7,0.9c-0.4,0-0.8,0.1-1.1,0.1c-0.4,0-0.8,0-1.1-0.1c-0.9-0.1-1.8-0.5-2.7-0.9c-3.1-1.9-4.5-6.1-4.5-10.4l0,0
|
||||||
|
l0,0c0-4.2,1.4-8.5,4.5-10.4c0.9-0.5,1.8-0.8,2.7-0.9c0.4,0,0.8-0.1,1.1-0.1c0.4,0,0.8,0,1.1,0.1c0.9,0.1,1.8,0.5,2.7,0.9
|
||||||
|
c3.1,1.9,4.5,6.1,4.5,10.4l0,0l0,0C139.6,46,138.1,50.2,135.1,52.1z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<polygon class="st1" points="52.3,0 0.5,69.7 60.1,54.3 24.4,54.3 "/>
|
||||||
|
<polygon class="st2" points="7.7,134.4 59.5,64.7 0,80.1 35.6,80.1 "/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.8 KiB |
|
@ -0,0 +1,65 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 27.8.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 350.8 134.4" style="enable-background:new 0 0 350.8 134.4;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#000000;}
|
||||||
|
.st1{fill:#F0D003;}
|
||||||
|
.st2{fill:#000000;}
|
||||||
|
</style>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<polygon class="st0" points="92.9,103.8 92.9,76.6 86.8,76.6 86.8,108.9 104.4,108.9 106.9,103.8 "/>
|
||||||
|
<rect x="117" y="76.6" class="st0" width="6.1" height="32.3"/>
|
||||||
|
<polygon class="st0" points="193.2,108.9 193.2,76.6 187,76.6 187,89.6 175.2,89.6 175.2,76.6 169,76.6 169,108.9 175.2,108.9
|
||||||
|
175.2,94.7 187,94.7 187,108.9 "/>
|
||||||
|
<polygon class="st0" points="226,76.6 204.7,76.6 202.1,81.7 211,81.7 211,108.9 217.1,108.9 217.1,81.7 223.4,81.7 "/>
|
||||||
|
<polygon class="st0" points="259.2,108.9 259.2,76.6 253.4,76.6 253.4,97.8 240.2,76.6 235.1,76.6 235.1,108.9 240.9,108.9
|
||||||
|
240.9,87.9 254.1,108.9 "/>
|
||||||
|
<rect x="271.6" y="76.6" class="st0" width="6.1" height="32.3"/>
|
||||||
|
<polygon class="st0" points="314.2,108.9 314.2,76.6 308.4,76.6 308.4,97.8 295.1,76.6 290,76.6 290,108.9 295.8,108.9
|
||||||
|
295.8,87.9 309,108.9 "/>
|
||||||
|
<g>
|
||||||
|
<path class="st0" d="M334.4,109c0.4,0.1,0.8,0.2,1.2,0.2h0.1c0.7,0.1,1.2,0.1,1.8,0.1c0.5,0,1,0,1.5-0.1l0,0l0,0c0,0,0,0,0.1,0
|
||||||
|
h0.1c3.4-0.3,6.2-1.6,8.5-3.8c2.2-2.2,3.1-5,3.1-9.9v-4.7h-9.4l-2.8,5.1h5.9h0.1V96v1.2c0,1.9-0.5,3.4-1.5,4.5
|
||||||
|
c-1.3,1.3-2.8,1.7-4,1.9c-0.5,0.1-1,0.1-1.4,0.1c-4,0-8.1-3.4-8.1-11c0-5.5,2.4-11.1,7.9-11.1c0.4,0,0.8,0,1.2,0.1
|
||||||
|
c2.2,0.4,4.8,1.8,5.7,4.3l5.2-3c-0.6-1.2-3.5-6-10.5-6.8H339l0,0l0,0c-0.5,0-1-0.1-1.5-0.1c-1,0-2.1,0.1-3.1,0.4h-0.1h-0.1
|
||||||
|
c-0.2,0-0.4,0.1-0.6,0.2c-6.3,1.8-10.2,8-10,16.1c0,8.2,4,14.3,10.3,16.1v0.1l0,0l0,0l0,0C334,108.9,334.2,109,334.4,109z"/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path class="st0" d="M143.2,109c0.4,0.1,0.8,0.2,1.2,0.2h0.1c0.7,0.1,1.2,0.1,1.8,0.1c0.5,0,1,0,1.5-0.1l0,0l0,0c0,0,0,0,0.1,0
|
||||||
|
h0.1c3.4-0.3,6.2-1.6,8.5-3.8c2.2-2.2,3.1-5,3.1-9.9v-4.7h-9.4l-2.8,5.1h5.9h0.1V96v1.2c0,1.9-0.5,3.4-1.5,4.5
|
||||||
|
c-1.3,1.3-2.8,1.7-4,1.9c-0.5,0.1-1,0.1-1.4,0.1c-4,0-8.1-3.4-8.1-11c0-5.5,2.4-11.1,7.9-11.1c0.4,0,0.8,0,1.2,0.1
|
||||||
|
c2.2,0.4,4.8,1.8,5.7,4.3l5.2-3c-0.6-1.2-3.5-6-10.5-6.8h-0.1l0,0l0,0c-0.5,0-1-0.1-1.5-0.1c-1,0-2.1,0.1-3.1,0.4h-0.1H143
|
||||||
|
c-0.2,0-0.4,0.1-0.6,0.2c-6.3,1.8-10.2,8-10,16.1c0,8.2,4,14.3,10.3,16.1v0.1l0,0l0,0l0,0C142.8,108.9,143,109,143.2,109z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path class="st1" d="M166.6,45.1l5.8,12.7h6.7l-6.7-13.9l0.3-0.1c3.6-1.5,5.4-4.4,5.4-8.6c0-6.3-4.3-9.8-12-9.8h-11.5v32.3h6.1
|
||||||
|
V44.8h5.8L166.6,45.1z M160.8,39.9v-9.2h4.7c3.2,0,6.5,0.6,6.5,4.6s-3.1,4.5-6.5,4.5L160.8,39.9L160.8,39.9z"/>
|
||||||
|
<polygon class="st1" points="208.9,30.7 208.9,25.6 189,25.6 189,57.9 208.9,57.9 208.9,52.8 195.1,52.8 195.1,43.7 207.5,43.7
|
||||||
|
207.5,38.6 195.1,38.6 195.1,30.7 "/>
|
||||||
|
<path class="st1" d="M98.9,53.1c-0.4,0-0.8,0.1-1.2,0.1c-5.6,0-8.1-5.7-8.1-11.3l0,0l0,0c0-5.6,2.5-11.3,8.1-11.3
|
||||||
|
c0.4,0,0.8,0,1.2,0.1c2.2,0.4,4.9,1.8,5.8,4.3l5-2.9c-0.8-1.5-3.7-5.9-10.4-6.6h-0.2c-0.5,0-1-0.1-1.4-0.1c-1,0-2.1,0.1-3.1,0.4
|
||||||
|
h-0.2c-0.2,0-0.4,0.1-0.6,0.2c-6.3,1.8-10.1,7.9-10,15.9l0,0l0,0l0,0l0,0c-0.1,8,3.7,14.1,10,15.9c0.2,0.1,0.4,0.1,0.6,0.2h0.2
|
||||||
|
c1,0.2,2.1,0.4,3.1,0.4c0.4,0,0.9,0,1.4-0.1h0.2c6.8-0.7,9.6-5.1,10.4-6.6l-5-2.9C103.8,51.2,101.1,52.7,98.9,53.1z"/>
|
||||||
|
<path class="st1" d="M145.6,41.7L145.6,41.7c0-3.8-0.8-7.2-2.3-9.9l0,0c-0.4-0.8-1.5-2.5-3.4-4c-0.1,0-0.1-0.1-0.2-0.1
|
||||||
|
c-0.1-0.1-0.3-0.2-0.5-0.3c-1.1-0.8-2.4-1.4-3.7-1.8c-0.2-0.1-0.4-0.1-0.6-0.2h-0.2c-1-0.2-2.1-0.4-3.1-0.4c-0.1,0-0.1,0-0.2,0
|
||||||
|
s-0.1,0-0.2,0c-1.1,0-2.1,0.1-3.1,0.4h-0.2c-0.2,0-0.4,0.1-0.6,0.2c-1.4,0.4-2.6,1-3.7,1.8c-0.2,0.1-0.3,0.2-0.5,0.3
|
||||||
|
c-0.1,0-0.1,0.1-0.2,0.1c-1.9,1.5-3,3.1-3.4,4l0,0c-1.6,2.7-2.4,6.1-2.3,9.9l0,0l0,0l0,0l0,0c0,3.8,0.8,7.2,2.3,9.9l0,0
|
||||||
|
c0.4,0.8,1.5,2.5,3.4,4c0.1,0,0.1,0.1,0.2,0.1c0.1,0.1,0.3,0.2,0.5,0.3c1.1,0.8,2.4,1.4,3.7,1.8c0.2,0.1,0.4,0.1,0.6,0.2h0.2
|
||||||
|
c1,0.2,2.1,0.4,3.1,0.4c0.1,0,0.1,0,0.2,0c0.1,0,0.1,0,0.2,0c1.1,0,2.1-0.1,3.1-0.4h0.2c0.2,0,0.4-0.1,0.6-0.2
|
||||||
|
c1.4-0.4,2.6-1,3.7-1.8c0.2-0.1,0.3-0.2,0.5-0.3c0.1,0,0.1-0.1,0.2-0.1c1.9-1.5,3-3.1,3.4-4l0,0
|
||||||
|
C144.9,48.9,145.7,45.5,145.6,41.7L145.6,41.7C145.6,41.8,145.6,41.8,145.6,41.7L145.6,41.7z M135.1,52.1
|
||||||
|
c-0.9,0.5-1.8,0.8-2.7,0.9c-0.4,0-0.8,0.1-1.1,0.1c-0.4,0-0.8,0-1.1-0.1c-0.9-0.1-1.8-0.5-2.7-0.9c-3.1-1.9-4.5-6.1-4.5-10.4l0,0
|
||||||
|
l0,0c0-4.2,1.4-8.5,4.5-10.4c0.9-0.5,1.8-0.8,2.7-0.9c0.4,0,0.8-0.1,1.1-0.1c0.4,0,0.8,0,1.1,0.1c0.9,0.1,1.8,0.5,2.7,0.9
|
||||||
|
c3.1,1.9,4.5,6.1,4.5,10.4l0,0l0,0C139.6,46,138.1,50.2,135.1,52.1z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<polygon class="st1" points="52.3,0 0.5,69.7 60.1,54.3 24.4,54.3 "/>
|
||||||
|
<polygon class="st2" points="7.7,134.4 59.5,64.7 0,80.1 35.6,80.1 "/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.8 KiB |
|
@ -0,0 +1,13 @@
|
||||||
|
<svg width="496px" height="148px" viewBox="0 0 496 148" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>Group 6</title>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Desktop-HD" transform="translate(-68.000000, -665.000000)" fill-rule="nonzero">
|
||||||
|
<g id="Group-9" transform="translate(25.405063, 654.000000)">
|
||||||
|
<g id="Group-6" transform="translate(43.000000, 11.000000)">
|
||||||
|
<path d="M168.594937,119 L168.594937,99.05 L117.294937,99.05 L117.294937,15.95 L95.2449367,15.95 L95.2449367,119 L168.594937,119 Z M200.094937,119 L200.094937,52.4 L249.894937,119 L271.944937,119 L271.944937,15.95 L249.894937,15.95 L249.894937,82.55 L200.094937,15.95 L178.044937,15.95 L178.044937,119 L200.094937,119 Z M321.494937,120.8 C328.194937,120.8 334.269937,119.075 339.719937,115.625 C345.169937,112.175 349.444937,107.35 352.544937,101.15 C355.644937,94.95 357.194937,87.95 357.194937,80.15 C357.194937,72.35 355.644937,65.375 352.544937,59.225 C349.444937,53.075 345.169937,48.275 339.719937,44.825 C334.269937,41.375 328.194937,39.65 321.494937,39.65 C315.394937,39.65 309.919937,41.075 305.069937,43.925 C300.219937,46.775 296.294937,50.8 293.294937,56 L293.294937,56 L293.294937,14.15 L282.044937,14.15 L282.044937,119 L293.294937,119 L293.294937,104.45 C296.294937,109.65 300.219937,113.675 305.069937,116.525 C309.919937,119.375 315.394937,120.8 321.494937,120.8 Z M319.394937,110.75 C314.394937,110.75 309.894937,109.45 305.894937,106.85 C301.894937,104.25 298.794937,100.625 296.594937,95.975 C294.394937,91.325 293.294937,86.05 293.294937,80.15 C293.294937,74.25 294.394937,69 296.594937,64.4 C298.794937,59.8 301.894937,56.2 305.894937,53.6 C309.894937,51 314.394937,49.7 319.394937,49.7 C324.394937,49.7 328.869937,51 332.819937,53.6 C336.769937,56.2 339.844937,59.8 342.044937,64.4 C344.244937,69 345.344937,74.25 345.344937,80.15 C345.344937,86.05 344.244937,91.325 342.044937,95.975 C339.844937,100.625 336.769937,104.25 332.819937,106.85 C328.869937,109.45 324.394937,110.75 319.394937,110.75 Z M368.844937,27.35 C370.844937,27.35 372.569937,26.6 374.019937,25.1 C375.469937,23.6 376.194937,21.85 376.194937,19.85 C376.194937,17.85 375.469937,16.125 374.019937,14.675 C372.569937,13.225 370.844937,12.5 368.844937,12.5 C366.744937,12.5 364.969937,13.225 363.519937,14.675 C362.069937,16.125 361.344937,17.85 361.344937,19.85 C361.344937,21.85 362.069937,23.6 363.519937,25.1 C364.969937,26.6 366.744937,27.35 368.844937,27.35 Z M374.394937,119 L374.394937,41.45 L363.144937,41.45 L363.144937,119 L374.394937,119 Z M415.494937,120.8 C420.894937,120.8 425.694937,119.15 429.894937,115.85 L429.894937,115.85 L424.344937,107.6 C423.444937,108.5 422.294937,109.25 420.894937,109.85 C419.494937,110.45 417.944937,110.75 416.244937,110.75 C413.944937,110.75 411.969937,109.825 410.319937,107.975 C408.669937,106.125 407.844937,103.8 407.844937,101 L407.844937,101 L407.844937,51.5 L426.894937,51.5 L426.894937,41.45 L407.844937,41.45 L407.844937,20.15 L396.594937,20.15 L396.594937,41.45 L384.444937,41.45 L384.444937,51.5 L396.594937,51.5 L396.594937,101 C396.594937,106.8 398.369937,111.55 401.919937,115.25 C405.469937,118.95 409.994937,120.8 415.494937,120.8 Z M466.694937,120.8 C474.894937,120.8 481.669937,118.65 487.019937,114.35 C492.369937,110.05 495.044937,104.4 495.044937,97.4 C495.044937,92.8 493.894937,89.075 491.594937,86.225 C489.294937,83.375 486.444937,81.15 483.044937,79.55 C479.644937,77.95 475.194937,76.3 469.694937,74.6 C464.094937,72.8 459.994937,71.35 457.394937,70.25 C454.794937,69.15 452.844937,67.9 451.544937,66.5 C450.244937,65.1 449.594937,63.3 449.594937,61.1 C449.594937,57.5 451.094937,54.7 454.094937,52.7 C457.094937,50.7 460.894937,49.7 465.494937,49.7 C472.694937,49.7 480.144937,52.15 487.844937,57.05 L487.844937,57.05 L493.244937,48.35 C489.044937,45.65 484.544937,43.525 479.744937,41.975 C474.944937,40.425 470.194937,39.65 465.494937,39.65 C457.594937,39.65 451.094937,41.725 445.994937,45.875 C440.894937,50.025 438.344937,55.55 438.344937,62.45 C438.344937,67.95 440.294937,72.325 444.194937,75.575 C448.094937,78.825 454.794937,81.8 464.294937,84.5 C468.794937,85.8 472.319937,86.95 474.869937,87.95 C477.419937,88.95 479.544937,90.325 481.244937,92.075 C482.944937,93.825 483.794937,96 483.794937,98.6 C483.794937,102.3 482.219937,105.25 479.069937,107.45 C475.919937,109.65 471.794937,110.75 466.694937,110.75 C458.094937,110.75 449.344937,107.5 440.444937,101 L440.444937,101 L434.594937,109.25 C439.194937,112.95 444.319937,115.8 449.969937,117.8 C455.619937,119.8 461.194937,120.8 466.694937,120.8 Z" id="LNbits" fill="#FFFFFF"></path>
|
||||||
|
<polygon id="Path" fill="#FF1EE6" points="31.7629055 0 7.10760662 78.8585043 26.9789129 78.8585043 2.69673524e-13 148 74.8401889 57.3517272 43.9349963 57.3517272 84.3037975 8.34401992e-14"></polygon>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.9 KiB |
|
@ -0,0 +1,13 @@
|
||||||
|
<svg width="496px" height="148px" viewBox="0 0 496 148" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>Group 6</title>
|
||||||
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="Desktop-HD" transform="translate(-68.000000, -665.000000)" fill-rule="nonzero">
|
||||||
|
<g id="Group-9" transform="translate(25.405063, 654.000000)">
|
||||||
|
<g id="Group-6" transform="translate(43.000000, 11.000000)">
|
||||||
|
<path d="M168.594937,119 L168.594937,99.05 L117.294937,99.05 L117.294937,15.95 L95.2449367,15.95 L95.2449367,119 L168.594937,119 Z M200.094937,119 L200.094937,52.4 L249.894937,119 L271.944937,119 L271.944937,15.95 L249.894937,15.95 L249.894937,82.55 L200.094937,15.95 L178.044937,15.95 L178.044937,119 L200.094937,119 Z M321.494937,120.8 C328.194937,120.8 334.269937,119.075 339.719937,115.625 C345.169937,112.175 349.444937,107.35 352.544937,101.15 C355.644937,94.95 357.194937,87.95 357.194937,80.15 C357.194937,72.35 355.644937,65.375 352.544937,59.225 C349.444937,53.075 345.169937,48.275 339.719937,44.825 C334.269937,41.375 328.194937,39.65 321.494937,39.65 C315.394937,39.65 309.919937,41.075 305.069937,43.925 C300.219937,46.775 296.294937,50.8 293.294937,56 L293.294937,56 L293.294937,14.15 L282.044937,14.15 L282.044937,119 L293.294937,119 L293.294937,104.45 C296.294937,109.65 300.219937,113.675 305.069937,116.525 C309.919937,119.375 315.394937,120.8 321.494937,120.8 Z M319.394937,110.75 C314.394937,110.75 309.894937,109.45 305.894937,106.85 C301.894937,104.25 298.794937,100.625 296.594937,95.975 C294.394937,91.325 293.294937,86.05 293.294937,80.15 C293.294937,74.25 294.394937,69 296.594937,64.4 C298.794937,59.8 301.894937,56.2 305.894937,53.6 C309.894937,51 314.394937,49.7 319.394937,49.7 C324.394937,49.7 328.869937,51 332.819937,53.6 C336.769937,56.2 339.844937,59.8 342.044937,64.4 C344.244937,69 345.344937,74.25 345.344937,80.15 C345.344937,86.05 344.244937,91.325 342.044937,95.975 C339.844937,100.625 336.769937,104.25 332.819937,106.85 C328.869937,109.45 324.394937,110.75 319.394937,110.75 Z M368.844937,27.35 C370.844937,27.35 372.569937,26.6 374.019937,25.1 C375.469937,23.6 376.194937,21.85 376.194937,19.85 C376.194937,17.85 375.469937,16.125 374.019937,14.675 C372.569937,13.225 370.844937,12.5 368.844937,12.5 C366.744937,12.5 364.969937,13.225 363.519937,14.675 C362.069937,16.125 361.344937,17.85 361.344937,19.85 C361.344937,21.85 362.069937,23.6 363.519937,25.1 C364.969937,26.6 366.744937,27.35 368.844937,27.35 Z M374.394937,119 L374.394937,41.45 L363.144937,41.45 L363.144937,119 L374.394937,119 Z M415.494937,120.8 C420.894937,120.8 425.694937,119.15 429.894937,115.85 L429.894937,115.85 L424.344937,107.6 C423.444937,108.5 422.294937,109.25 420.894937,109.85 C419.494937,110.45 417.944937,110.75 416.244937,110.75 C413.944937,110.75 411.969937,109.825 410.319937,107.975 C408.669937,106.125 407.844937,103.8 407.844937,101 L407.844937,101 L407.844937,51.5 L426.894937,51.5 L426.894937,41.45 L407.844937,41.45 L407.844937,20.15 L396.594937,20.15 L396.594937,41.45 L384.444937,41.45 L384.444937,51.5 L396.594937,51.5 L396.594937,101 C396.594937,106.8 398.369937,111.55 401.919937,115.25 C405.469937,118.95 409.994937,120.8 415.494937,120.8 Z M466.694937,120.8 C474.894937,120.8 481.669937,118.65 487.019937,114.35 C492.369937,110.05 495.044937,104.4 495.044937,97.4 C495.044937,92.8 493.894937,89.075 491.594937,86.225 C489.294937,83.375 486.444937,81.15 483.044937,79.55 C479.644937,77.95 475.194937,76.3 469.694937,74.6 C464.094937,72.8 459.994937,71.35 457.394937,70.25 C454.794937,69.15 452.844937,67.9 451.544937,66.5 C450.244937,65.1 449.594937,63.3 449.594937,61.1 C449.594937,57.5 451.094937,54.7 454.094937,52.7 C457.094937,50.7 460.894937,49.7 465.494937,49.7 C472.694937,49.7 480.144937,52.15 487.844937,57.05 L487.844937,57.05 L493.244937,48.35 C489.044937,45.65 484.544937,43.525 479.744937,41.975 C474.944937,40.425 470.194937,39.65 465.494937,39.65 C457.594937,39.65 451.094937,41.725 445.994937,45.875 C440.894937,50.025 438.344937,55.55 438.344937,62.45 C438.344937,67.95 440.294937,72.325 444.194937,75.575 C448.094937,78.825 454.794937,81.8 464.294937,84.5 C468.794937,85.8 472.319937,86.95 474.869937,87.95 C477.419937,88.95 479.544937,90.325 481.244937,92.075 C482.944937,93.825 483.794937,96 483.794937,98.6 C483.794937,102.3 482.219937,105.25 479.069937,107.45 C475.919937,109.65 471.794937,110.75 466.694937,110.75 C458.094937,110.75 449.344937,107.5 440.444937,101 L440.444937,101 L434.594937,109.25 C439.194937,112.95 444.319937,115.8 449.969937,117.8 C455.619937,119.8 461.194937,120.8 466.694937,120.8 Z" id="LNbits" fill="#000000"></path>
|
||||||
|
<polygon id="Path" fill="#FF1EE6" points="31.7629055 0 7.10760662 78.8585043 26.9789129 78.8585043 2.69673524e-13 148 74.8401889 57.3517272 43.9349963 57.3517272 84.3037975 8.34401992e-14"></polygon>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 4.7 KiB |
|
@ -58,7 +58,6 @@ $(todo)
|
||||||
export const card = {
|
export const card = {
|
||||||
title: '$wallet',
|
title: '$wallet',
|
||||||
subtitle: '',
|
subtitle: '',
|
||||||
badges: []
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(todo)
|
$(todo)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
height: 180px;
|
height: 180px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardMeta {
|
.indicators {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: grid;
|
display: grid;
|
||||||
|
@ -59,23 +59,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.indicator {
|
.indicator {
|
||||||
width: 10px;
|
width: 14px;
|
||||||
height: 10px;
|
height: 14px;
|
||||||
border-radius: 50%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.indicator.success {
|
.indicator.success {
|
||||||
color: var(--bs-green) !important;
|
color: var(--bs-green) !important;
|
||||||
background-color: var(--bs-green) !important;
|
background-color: var(--bs-green) !important;
|
||||||
border: 1px solid var(--bs-success);
|
border: 1px solid var(--bs-success);
|
||||||
filter: drop-shadow(0 0 2px #20c997);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.indicator.error {
|
.indicator.error {
|
||||||
color: var(--bs-red) !important;
|
color: var(--bs-red) !important;
|
||||||
background-color: var(--bs-red) !important;
|
background-color: var(--bs-red) !important;
|
||||||
border: 1px solid var(--bs-danger);
|
border: 1px solid var(--bs-danger);
|
||||||
filter: drop-shadow(0 0 2px #c92020);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.indicator.warning {
|
.indicator.warning {
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M9 13.589L17.6066 4.98242L19.0208 6.39664L10.4142 15.0032H18V17.0032H7V6.00324H9V13.589Z"></path></svg>
|
After Width: | Height: | Size: 192 B |
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.0037 9.41421L7.39712 18.0208L5.98291 16.6066L14.5895 8H7.00373V6H18.0037V17H16.0037V9.41421Z"></path></svg>
|
After Width: | Height: | Size: 200 B |
|
@ -152,9 +152,9 @@ The card title.
|
||||||
|
|
||||||
The subtitle that is shown below the title if you enter the configuration form of a wallet.
|
The subtitle that is shown below the title if you enter the configuration form of a wallet.
|
||||||
|
|
||||||
- `badges: string[]`
|
- `image: { src: string, ... }`
|
||||||
|
|
||||||
The badges that are shown inside the card.
|
The image props that will be used to show an image inside the card. Should contain at least the `src` property.
|
||||||
|
|
||||||
### client.js
|
### client.js
|
||||||
|
|
||||||
|
|
|
@ -67,5 +67,5 @@ export const fields = [
|
||||||
export const card = {
|
export const card = {
|
||||||
title: 'Blink',
|
title: 'Blink',
|
||||||
subtitle: 'use [Blink](https://blink.sv/) for payments',
|
subtitle: 'use [Blink](https://blink.sv/) for payments',
|
||||||
badges: ['send', 'receive']
|
image: { src: '/wallets/blink.svg' }
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,5 +63,5 @@ export const fields = [
|
||||||
export const card = {
|
export const card = {
|
||||||
title: 'CLN',
|
title: 'CLN',
|
||||||
subtitle: 'autowithdraw to your Core Lightning node via [CLNRest](https://docs.corelightning.org/docs/rest)',
|
subtitle: 'autowithdraw to your Core Lightning node via [CLNRest](https://docs.corelightning.org/docs/rest)',
|
||||||
badges: ['receive']
|
image: { src: '/wallets/cln.svg' }
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,9 @@ import walletDefs from '@/wallets/client'
|
||||||
|
|
||||||
export const Status = {
|
export const Status = {
|
||||||
Enabled: 'Enabled',
|
Enabled: 'Enabled',
|
||||||
Disabled: 'Disabled'
|
Disabled: 'Disabled',
|
||||||
|
Error: 'Error',
|
||||||
|
Warning: 'Warning'
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getWalletByName (name) {
|
export function getWalletByName (name) {
|
||||||
|
@ -89,12 +91,24 @@ function isReceiveConfigured ({ def, config }) {
|
||||||
return fields.length > 0 && checkFields({ fields, config })
|
return fields.length > 0 && checkFields({ fields, config })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function supportsSend ({ def, config }) {
|
||||||
|
return !!def.sendPayment
|
||||||
|
}
|
||||||
|
|
||||||
|
export function supportsReceive ({ def, config }) {
|
||||||
|
return def.fields.some(f => f.serverOnly)
|
||||||
|
}
|
||||||
|
|
||||||
export function canSend ({ def, config }) {
|
export function canSend ({ def, config }) {
|
||||||
return !!def.sendPayment && isSendConfigured({ def, config })
|
return (
|
||||||
|
supportsSend({ def, config }) &&
|
||||||
|
isSendConfigured({ def, config }) &&
|
||||||
|
(def.requiresConfig || config?.enabled)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function canReceive ({ def, config }) {
|
export function canReceive ({ def, config }) {
|
||||||
return def.fields.some(f => f.serverOnly) && isReceiveConfigured({ def, config })
|
return supportsReceive({ def, config }) && isReceiveConfigured({ def, config })
|
||||||
}
|
}
|
||||||
|
|
||||||
export function siftConfig (fields, config) {
|
export function siftConfig (fields, config) {
|
||||||
|
@ -161,3 +175,31 @@ export async function saveWalletLocally (name, config, userId) {
|
||||||
const storageKey = getStorageKey(name, userId)
|
const storageKey = getStorageKey(name, userId)
|
||||||
window.localStorage.setItem(storageKey, JSON.stringify(config))
|
window.localStorage.setItem(storageKey, JSON.stringify(config))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const statusFromLog = (wallet, logs) => {
|
||||||
|
if (wallet.status.any === Status.Disabled) return wallet
|
||||||
|
|
||||||
|
// override status depending on if there have been warnings or errors in the logs recently
|
||||||
|
// find first log from which we can derive status (logs are sorted by recent first)
|
||||||
|
const walletLogs = logs.filter(l => l.wallet === wallet.def.name)
|
||||||
|
const sendLevel = walletLogs.find(l => l.context?.status && l.context?.send)?.level
|
||||||
|
const recvLevel = walletLogs.find(l => l.context?.status && l.context?.recv)?.level
|
||||||
|
|
||||||
|
const levelToStatus = (level) => {
|
||||||
|
switch (level?.toLowerCase()) {
|
||||||
|
case 'ok':
|
||||||
|
case 'success': return Status.Enabled
|
||||||
|
case 'error': return Status.Error
|
||||||
|
case 'warn': return Status.Warning
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
...wallet,
|
||||||
|
status: {
|
||||||
|
...wallet.status,
|
||||||
|
send: levelToStatus(sendLevel) || wallet.status.send,
|
||||||
|
recv: levelToStatus(recvLevel) || wallet.status.recv
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ export function useWalletConfigurator (wallet) {
|
||||||
if (transformedConfig) {
|
if (transformedConfig) {
|
||||||
serverConfig = Object.assign(serverConfig, transformedConfig)
|
serverConfig = Object.assign(serverConfig, transformedConfig)
|
||||||
}
|
}
|
||||||
} else {
|
} else if (wallet.def.requiresConfig) {
|
||||||
throw new Error('configuration must be able to send or receive')
|
throw new Error('configuration must be able to send or receive')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ import { SET_WALLET_PRIORITY, WALLETS } from '@/fragments/wallet'
|
||||||
import { SSR } from '@/lib/constants'
|
import { SSR } from '@/lib/constants'
|
||||||
import { useApolloClient, useMutation, useQuery } from '@apollo/client'
|
import { useApolloClient, useMutation, useQuery } from '@apollo/client'
|
||||||
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react'
|
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react'
|
||||||
import { getStorageKey, getWalletByType, Status, walletPrioritySort, canSend, isConfigured, upsertWalletVariables, siftConfig, saveWalletLocally } from './common'
|
import { getStorageKey, getWalletByType, Status, walletPrioritySort, canSend, isConfigured, upsertWalletVariables, siftConfig, saveWalletLocally, canReceive, supportsReceive, supportsSend, statusFromLog } from './common'
|
||||||
import useVault from '@/components/vault/use-vault'
|
import useVault from '@/components/vault/use-vault'
|
||||||
import { useWalletLogger } from '@/components/wallet-logger'
|
import { useWalletLogger, useWalletLogs } from '@/components/wallet-logger'
|
||||||
import { decode as bolt11Decode } from 'bolt11'
|
import { decode as bolt11Decode } from 'bolt11'
|
||||||
import walletDefs from '@/wallets/client'
|
import walletDefs from '@/wallets/client'
|
||||||
import { generateMutation } from './graphql'
|
import { generateMutation } from './graphql'
|
||||||
|
@ -67,6 +67,7 @@ export function WalletsProvider ({ children }) {
|
||||||
const [setWalletPriority] = useMutation(SET_WALLET_PRIORITY)
|
const [setWalletPriority] = useMutation(SET_WALLET_PRIORITY)
|
||||||
const [serverWallets, setServerWallets] = useState([])
|
const [serverWallets, setServerWallets] = useState([])
|
||||||
const client = useApolloClient()
|
const client = useApolloClient()
|
||||||
|
const { logs } = useWalletLogs()
|
||||||
|
|
||||||
const { data, refetch } = useQuery(WALLETS,
|
const { data, refetch } = useQuery(WALLETS,
|
||||||
SSR ? {} : { nextFetchPolicy: 'cache-and-network' })
|
SSR ? {} : { nextFetchPolicy: 'cache-and-network' })
|
||||||
|
@ -111,7 +112,10 @@ export function WalletsProvider ({ children }) {
|
||||||
const merged = {}
|
const merged = {}
|
||||||
for (const wallet of [...walletDefsOnly, ...localWallets, ...serverWallets]) {
|
for (const wallet of [...walletDefsOnly, ...localWallets, ...serverWallets]) {
|
||||||
merged[wallet.def.name] = {
|
merged[wallet.def.name] = {
|
||||||
def: wallet.def,
|
def: {
|
||||||
|
...wallet.def,
|
||||||
|
requiresConfig: wallet.def.fields.length > 0
|
||||||
|
},
|
||||||
config: {
|
config: {
|
||||||
...merged[wallet.def.name]?.config,
|
...merged[wallet.def.name]?.config,
|
||||||
...Object.fromEntries(
|
...Object.fromEntries(
|
||||||
|
@ -128,8 +132,21 @@ export function WalletsProvider ({ children }) {
|
||||||
// sort by priority, then add status field
|
// sort by priority, then add status field
|
||||||
return Object.values(merged)
|
return Object.values(merged)
|
||||||
.sort(walletPrioritySort)
|
.sort(walletPrioritySort)
|
||||||
.map(w => ({ ...w, status: w.config?.enabled ? Status.Enabled : Status.Disabled }))
|
.map(w => {
|
||||||
}, [serverWallets, localWallets])
|
return {
|
||||||
|
...w,
|
||||||
|
support: {
|
||||||
|
recv: supportsReceive(w),
|
||||||
|
send: supportsSend(w)
|
||||||
|
},
|
||||||
|
status: {
|
||||||
|
any: w.config?.enabled && isConfigured(w) ? Status.Enabled : Status.Disabled,
|
||||||
|
send: w.config?.enabled && canSend(w) ? Status.Enabled : Status.Disabled,
|
||||||
|
recv: w.config?.enabled && canReceive(w) ? Status.Enabled : Status.Disabled
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).map(w => statusFromLog(w, logs))
|
||||||
|
}, [serverWallets, localWallets, logs])
|
||||||
|
|
||||||
const settings = useMemo(() => {
|
const settings = useMemo(() => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -22,6 +22,5 @@ export const fields = [
|
||||||
|
|
||||||
export const card = {
|
export const card = {
|
||||||
title: 'lightning address',
|
title: 'lightning address',
|
||||||
subtitle: 'autowithdraw to a lightning address',
|
subtitle: 'autowithdraw to a lightning address'
|
||||||
badges: ['receive']
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,5 +55,5 @@ export const fields = [
|
||||||
export const card = {
|
export const card = {
|
||||||
title: 'LNbits',
|
title: 'LNbits',
|
||||||
subtitle: 'use [LNbits](https://lnbits.com/) for payments',
|
subtitle: 'use [LNbits](https://lnbits.com/) for payments',
|
||||||
badges: ['send', 'receive']
|
image: { src: '/wallets/lnbits.svg' }
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,11 +38,11 @@ export async function testSendPayment (credentials, { logger }) {
|
||||||
|
|
||||||
logger.info('connecting ...')
|
logger.info('connecting ...')
|
||||||
await lnc.connect()
|
await lnc.connect()
|
||||||
logger.ok('connected')
|
logger.info('connected')
|
||||||
|
|
||||||
logger.info('validating permissions ...')
|
logger.info('validating permissions ...')
|
||||||
await validateNarrowPerms(lnc)
|
await validateNarrowPerms(lnc)
|
||||||
logger.ok('permissions ok')
|
logger.info('permissions ok')
|
||||||
|
|
||||||
return lnc.credentials.credentials
|
return lnc.credentials.credentials
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -60,6 +60,5 @@ export const fields = [
|
||||||
|
|
||||||
export const card = {
|
export const card = {
|
||||||
title: 'LNC',
|
title: 'LNC',
|
||||||
subtitle: 'use Lightning Node Connect for LND payments',
|
subtitle: 'use Lightning Node Connect for LND payments'
|
||||||
badges: ['send', 'budgetable']
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,5 +50,5 @@ export const fields = [
|
||||||
export const card = {
|
export const card = {
|
||||||
title: 'LND',
|
title: 'LND',
|
||||||
subtitle: 'autowithdraw to your Lightning Labs node',
|
subtitle: 'autowithdraw to your Lightning Labs node',
|
||||||
badges: ['receive']
|
image: { src: '/wallets/lnd.png' }
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,7 @@ export const fields = [
|
||||||
|
|
||||||
export const card = {
|
export const card = {
|
||||||
title: 'NWC',
|
title: 'NWC',
|
||||||
subtitle: 'use Nostr Wallet Connect for payments',
|
subtitle: 'use Nostr Wallet Connect for payments'
|
||||||
badges: ['send', 'receive', 'budgetable']
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function nwcCall ({ nwcUrl, method, params }, { logger, timeout } = {}) {
|
export async function nwcCall ({ nwcUrl, method, params }, { logger, timeout } = {}) {
|
||||||
|
|
|
@ -38,5 +38,5 @@ export const fields = [
|
||||||
export const card = {
|
export const card = {
|
||||||
title: 'phoenixd',
|
title: 'phoenixd',
|
||||||
subtitle: 'use [phoenixd](https://phoenix.acinq.co/server) for payments',
|
subtitle: 'use [phoenixd](https://phoenix.acinq.co/server) for payments',
|
||||||
badges: ['send', 'receive']
|
image: { src: '/wallets/phoenixd.png' }
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,5 @@ export const fields = []
|
||||||
|
|
||||||
export const card = {
|
export const card = {
|
||||||
title: 'WebLN',
|
title: 'WebLN',
|
||||||
subtitle: 'use a [WebLN provider](https://www.webln.guide/ressources/webln-providers) for payments',
|
subtitle: 'use a [WebLN provider](https://www.webln.guide/ressources/webln-providers) for payments'
|
||||||
badges: ['send']
|
|
||||||
}
|
}
|
||||||
|
|