aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorCsaba Solya <csaba.solya@gmail.com>2018-05-31 03:15:59 +0800
committerCsaba Solya <csaba.solya@gmail.com>2018-05-31 03:15:59 +0800
commit1dda0c646940179bec6e886117a8ecf3f0f7ab48 (patch)
treefd2a6c901ca0647af1fae2df7780102e54b28829 /test
parent3e489ea16506569950c10fc3636071075b2495e8 (diff)
downloadtangerine-wallet-browser-1dda0c646940179bec6e886117a8ecf3f0f7ab48.tar
tangerine-wallet-browser-1dda0c646940179bec6e886117a8ecf3f0f7ab48.tar.gz
tangerine-wallet-browser-1dda0c646940179bec6e886117a8ecf3f0f7ab48.tar.bz2
tangerine-wallet-browser-1dda0c646940179bec6e886117a8ecf3f0f7ab48.tar.lz
tangerine-wallet-browser-1dda0c646940179bec6e886117a8ecf3f0f7ab48.tar.xz
tangerine-wallet-browser-1dda0c646940179bec6e886117a8ecf3f0f7ab48.tar.zst
tangerine-wallet-browser-1dda0c646940179bec6e886117a8ecf3f0f7ab48.zip
remove generating blocked accounts and use a config file instead
Diffstat (limited to 'test')
-rw-r--r--test/unit/app/controllers/transactions/recipient-blacklist-checker-test.js21
1 files changed, 10 insertions, 11 deletions
diff --git a/test/unit/app/controllers/transactions/recipient-blacklist-checker-test.js b/test/unit/app/controllers/transactions/recipient-blacklist-checker-test.js
index b55894684..56e8d50db 100644
--- a/test/unit/app/controllers/transactions/recipient-blacklist-checker-test.js
+++ b/test/unit/app/controllers/transactions/recipient-blacklist-checker-test.js
@@ -25,39 +25,38 @@ describe('Recipient Blacklist Checker', function () {
})
describe('#checkAccount', function () {
- it('does not fail on test networks', async function () {
+ it('does not fail on test networks', function () {
let callCount = 0
const networks = [ROPSTEN_CODE, RINKEYBY_CODE, KOVAN_CODE]
for (let networkId in networks) {
- await Promise.all(publicAccounts.map(async (account) => {
- await recipientBlackListChecker.checkAccount(networkId, account)
- callCount++
+ publicAccounts.forEach((account) => {
+ recipientBlackListChecker.checkAccount(networkId, account)
+ callCount++
})
- )
}
assert.equal(callCount, 30)
})
- it('fails on mainnet', async function () {
+ it('fails on mainnet', function () {
const mainnetId = 1
let callCount = 0
- await Promise.all(publicAccounts.map(async (account) => {
+ publicAccounts.forEach((account) => {
try {
- await recipientBlackListChecker.checkAccount(mainnetId, account)
+ recipientBlackListChecker.checkAccount(mainnetId, account)
assert.fail('function should have thrown an error')
} catch (err) {
assert.equal(err.message, 'Recipient is a public account')
}
callCount++
- }))
+ })
assert.equal(callCount, 10)
})
- it('fails for public account - uppercase', async function () {
+ it('fails for public account - uppercase', function () {
const mainnetId = 1
const publicAccount = '0X0D1D4E623D10F9FBA5DB95830F7D3839406C6AF2'
try {
- await recipientBlackListChecker.checkAccount(mainnetId, publicAccount)
+ recipientBlackListChecker.checkAccount(mainnetId, publicAccount)
assert.fail('function should have thrown an error')
} catch (err) {
assert.equal(err.message, 'Recipient is a public account')