Fix: blacklist modal not opening

Fix: no more fetching of non operator added addresses for blacklisted
addresses table.

Fix: trim address white spaces before sending it to database query
This commit is contained in:
Cesar 2020-12-17 16:00:39 +00:00 committed by Josh Harvey
parent e381efed6d
commit 0cd14ba398
3 changed files with 4 additions and 4 deletions

View file

@ -1,8 +1,8 @@
const db = require('./db')
// Get all blacklist rows from the DB "blacklist" table
// Get all blacklist rows from the DB "blacklist" table that were manually inserted by the operator
const getBlacklist = () => {
return db.any('select * from blacklist').then(res =>
return db.any(`SELECT * FROM blacklist WHERE created_by_operator = 't'`).then(res =>
res.map(item => ({
cryptoCode: item.crypto_code,
address: item.address,