less confusing expression for the hint of when the autowithdraw will be initiated (#1015)

* less confusing expression of when the autowithdraw will be initiated

* only change display value

* tentatively resolved linting errors: spacing around * and removed unused var import
This commit is contained in:
nl 2024-04-04 23:18:41 +09:00 committed by GitHub
parent ebcdc21728
commit 32ea514286
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@ import { Checkbox, Input } from './form'
import { useMe } from './me'
import { useEffect, useState } from 'react'
import { isNumber } from 'mathjs'
import { numWithUnits } from '@/lib/format'
function autoWithdrawThreshold ({ me }) {
return isNumber(me?.privates?.autoWithdrawThreshold) ? me?.privates?.autoWithdrawThreshold : 10000
@ -45,7 +44,7 @@ export function AutowithdrawSettings ({ priority }) {
const value = e.target.value
setSendThreshold(Math.max(Math.floor(value / 10), 1))
}}
hint={isNumber(sendThreshold) ? `attempts to keep your balance no greater than ${numWithUnits(sendThreshold)} of this amount` : undefined}
hint={isNumber(sendThreshold) ? `will attempt auto-withdraw when your balance exceeds ${sendThreshold * 11} sats` : undefined}
append={<InputGroup.Text className='text-monospace'>sats</InputGroup.Text>}
/>
<Input