diff --git a/lib/blacklist.js b/lib/blacklist.js index 2459d8fb..5e59107c 100644 --- a/lib/blacklist.js +++ b/lib/blacklist.js @@ -14,7 +14,7 @@ const getBlacklist = () => { // Delete row from blacklist table by crypto code and address const deleteFromBlacklist = (cryptoCode, address) => { return db.none( - 'delete from blacklist where crypto_code = $1 and address = $2;', + `DELETE FROM blacklist WHERE created_by_operator = 't' AND crypto_code = $1 AND address = $2`, [cryptoCode, address] ) } diff --git a/lib/blockchain/common.js b/lib/blockchain/common.js index a5643ea3..0d51f9cc 100644 --- a/lib/blockchain/common.js +++ b/lib/blockchain/common.js @@ -25,12 +25,12 @@ const BINARIES = { dir: 'bitcoin-0.20.1/bin' }, ETH: { - url: 'https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.9.24-cc05b050.tar.gz', - dir: 'geth-linux-amd64-1.9.24-cc05b050' + url: 'https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.9.25-e7872729.tar.gz', + dir: 'geth-linux-amd64-1.9.25-e7872729' }, ZEC: { - url: 'https://z.cash/downloads/zcash-4.1.1-linux64-debian-stretch.tar.gz', - dir: 'zcash-4.1.1/bin' + url: 'https://download.z.cash/downloads/zcash-4.2.0-linux64-debian-stretch.tar.gz', + dir: 'zcash-4.2.0/bin' }, DASH: { url: 'https://github.com/dashpay/dash/releases/download/v0.16.1.1/dashcore-0.16.1.1-x86_64-linux-gnu.tar.gz', diff --git a/migrations/1609346970940-alter-blacklist-unique-constraint.js b/migrations/1609346970940-alter-blacklist-unique-constraint.js new file mode 100644 index 00000000..132eb123 --- /dev/null +++ b/migrations/1609346970940-alter-blacklist-unique-constraint.js @@ -0,0 +1,16 @@ +var db = require('./db') + +exports.up = function (next) { + var sql = [ + `ALTER TABLE blacklist DROP CONSTRAINT blacklist_crypto_code_address_key`, + `ALTER TABLE blacklist ADD CONSTRAINT blacklist_crypto_code_address_created_by_operator_key UNIQUE (crypto_code, address, created_by_operator)`, + `CREATE INDEX ON blacklist (created_by_operator)`, + `REINDEX TABLE blacklist` + ] + + db.multi(sql, next) +} + +exports.down = function (next) { + next() +} diff --git a/new-lamassu-admin/src/pages/Blacklist/BlacklistModal.js b/new-lamassu-admin/src/pages/Blacklist/BlacklistModal.js index 9a6858b2..55e0f6a6 100644 --- a/new-lamassu-admin/src/pages/Blacklist/BlacklistModal.js +++ b/new-lamassu-admin/src/pages/Blacklist/BlacklistModal.js @@ -20,6 +20,9 @@ const BlackListModal = ({ }) => { const classes = useStyles() const handleAddToBlacklist = address => { + if (selectedCoin.code === 'BCH' && !address.startsWith('bitcoincash:')) { + address = 'bitcoincash:' + address + } addToBlacklist(selectedCoin.code, address) } const placeholderAddress = { diff --git a/public/asset-manifest.json b/public/asset-manifest.json index 9d27686b..c52f2524 100644 --- a/public/asset-manifest.json +++ b/public/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { - "main.js": "/static/js/main.0f20b202.chunk.js", - "main.js.map": "/static/js/main.0f20b202.chunk.js.map", + "main.js": "/static/js/main.c5b482a9.chunk.js", + "main.js.map": "/static/js/main.c5b482a9.chunk.js.map", "runtime-main.js": "/static/js/runtime-main.f0000622.js", "runtime-main.js.map": "/static/js/runtime-main.f0000622.js.map", "static/js/2.c456abde.chunk.js": "/static/js/2.c456abde.chunk.js", @@ -82,6 +82,6 @@ "entrypoints": [ "static/js/runtime-main.f0000622.js", "static/js/2.c456abde.chunk.js", - "static/js/main.0f20b202.chunk.js" + "static/js/main.c5b482a9.chunk.js" ] } \ No newline at end of file diff --git a/public/index.html b/public/index.html index 03154ca2..b5f15f1d 100644 --- a/public/index.html +++ b/public/index.html @@ -1 +1 @@ -
\n {children}\n
\n )\n }\n}\n\nexport {\n H1,\n H2,\n H3,\n H4,\n H5,\n TL1,\n TL2,\n P,\n Info1,\n Info2,\n Info3,\n Mono,\n Label1,\n Label2,\n Label3\n}\n","import { makeStyles } from '@material-ui/core'\nimport classnames from 'classnames'\nimport React from 'react'\n\nimport { ReactComponent as ErrorIcon } from 'src/styling/icons/warning-icon/tomato.svg'\nimport { errorColor } from 'src/styling/variables'\n\nimport { Info3 } from './typography'\n\nconst styles = {\n wrapper: {\n display: 'flex',\n alignItems: 'center',\n '& > svg': {\n marginRight: 10\n }\n },\n message: {\n display: 'flex',\n alignItems: 'center',\n color: errorColor,\n margin: 0,\n whiteSpace: 'break-spaces'\n }\n}\n\nconst useStyles = makeStyles(styles)\n\nconst ErrorMessage = ({ className, children, ...props }) => {\n const classes = useStyles()\n\n return (\n\n To pair the machine you need scan the QR code with your machine.\n To do this either snap a picture of this QR code or download it\n through the button above and scan it with the scanning bay on your\n machine.\n
\n| \n {header}\n | \n ))}\n {expandable &&}\n \n \n {loading && |
|---|
Reject reused addresses
\n\n The \"Reject reused addresses\" option means that all addresses\n that are used once will be automatically rejected if there's\n an attempt to use them again on a new transaction.\n
\n\n You are about to activate cash-out functionality on your {name}{' '}\n machine which will allow your customers to sell crypto to you.\n
\n\n In order to activate cash-out for this machine, please enter the\n denominations for the machine.\n
\n\n
\n
Transaction fudge factor
\n\n Automatically accept customer deposits as complete if their\n received amount is 100 crypto atoms or less.\n
\n\n (Crypto atoms are the smallest unit in each cryptocurrency. E.g.,\n satoshis in Bitcoin, or wei in Ethereum.)\n
\n\n {value}\n
\n ))}\n\n {value}\n
\n ))}\n| \n Amount Entered\n | \n\n Balance After\n | \n\n Cash Value\n | \n\n Date\n | \n\n Time (h:m:s)\n | \n\n Performed By\n | \n \n \n {fundingHistory.map((it, idx) => (\n
| \n {it.cryptoAmount} {selected.cryptoCode}\n | \n\n {it.balance} {selected.cryptoCode}\n | \n\n {it.fiatValue} {selected.fiatCode}\n | \n\n {moment(it.date).format('YYYY-MM-DD')}\n | \n\n {moment(it.date).format('hh:mm:ss')}\n | \nadd | \n
\n You are about to enable {name} on your system. This will allow you to\n use this cryptocurrency on your machines. To be able to do that, you’ll\n have to set up all the necessary 3rd party services.\n
\n \n\n Please note that all values you set that were based on your prior fiat\n currency are still the same. If you need to adjust these to reflect the\n new fiat currency (such as minimum transaction amounts, fixed fees, and\n compliance triggers, for example), please do so now.\n
\n\n Also, if you have cash-out enabled, you must define new dispenser bill\n counts for the new currency for cash-out on the new currency to work.\n
\n| {day} | \n ))}\n
|---|
| handleSelect(day, minDate, maxDate)}>\n | \n ))}\n
| Channel | \n {Object.keys(sizes).map(it => (\n\n {startCase(it)}\n | \n ))}\n \n \n
|---|
{title}
\n\n For details on configuring this panel, please read the relevant\n knowledgebase article{' '}\n \n here\n \n .\n
\nInfo card enabled?
\nEnable receipt printing?
\n| \n {title}\n | \n \n \n
|---|
| \n {items && (\n <>\n {items[0] && (\n \n \n )}\n {items[1] && (\n {items[0].label} \n {items[0].value} \n \n \n )}\n >\n )}\n {items[1].label} \n {items[1].value} \n | \n
Reject reused addresses
\n\n This option requires a user to scan a different cryptocurrency\n address if they attempt to scan one that had been previously\n used for a transaction in your network\n
\n\n Two-way machines allow your customers not only to buy (cash-in)\n but also sell cryptocurrencies (cash-out).\n
\n\n You’ll need an SMS service for cash-out transactions and for any\n compliance triggers\n
\n\n These are your wallet settings. You can later edit these and add\n additional coins.\n
\n\n If you are enabling cash-out services, create a Blockcypher account.\n
\n\n To get you started, we’ve put together a wizard that will\n
\n help set up what you need before pairing your machines.\n
{text}
}\n