fix: create sweepable coins list
This commit is contained in:
parent
10245bbb19
commit
cd8f29cc64
3 changed files with 7 additions and 3 deletions
|
|
@ -807,7 +807,7 @@ function plugins (settings, deviceId) {
|
|||
|
||||
function sweepHd () {
|
||||
const sql = `SELECT id, crypto_code, hd_index FROM cash_out_txs
|
||||
WHERE hd_index IS NOT NULL AND NOT swept AND status IN ('confirmed', 'instant') AND created < now() - interval '1 week'`
|
||||
WHERE hd_index IS NOT NULL AND NOT swept AND status IN ('confirmed', 'instant') AND created > now() - interval '1 week'`
|
||||
|
||||
return db.any(sql)
|
||||
.then(rows => Promise.all(rows.map(sweepHdRow)))
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import {
|
|||
offErrorColor
|
||||
} from 'src/styling/variables'
|
||||
import { URI } from 'src/utils/apollo'
|
||||
import { SWEEPABLE_CRYPTOS } from 'src/utils/constants'
|
||||
import * as Customer from 'src/utils/customer'
|
||||
|
||||
import CopyToClipboard from './CopyToClipboard'
|
||||
|
|
@ -405,7 +406,7 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
|||
</ActionButton>
|
||||
)}
|
||||
</div>
|
||||
{!R.isNil(tx.swept) && (
|
||||
{!R.isNil(tx.swept) && R.includes(tx.cryptoCode, SWEEPABLE_CRYPTOS) && (
|
||||
<div className={classes.swept}>
|
||||
<Label>Sweep status</Label>
|
||||
<span className={classes.bold}>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ const MANUAL = 'manual'
|
|||
|
||||
const IP_CHECK_REGEX = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
|
||||
|
||||
const SWEEPABLE_CRYPTOS = ['ETH']
|
||||
|
||||
export {
|
||||
CURRENCY_MAX,
|
||||
MIN_NUMBER_OF_CASSETTES,
|
||||
|
|
@ -15,5 +17,6 @@ export {
|
|||
AUTOMATIC,
|
||||
MANUAL,
|
||||
WALLET_SCORING_DEFAULT_THRESHOLD,
|
||||
IP_CHECK_REGEX
|
||||
IP_CHECK_REGEX,
|
||||
SWEEPABLE_CRYPTOS
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue