Skip to content

Commit

Permalink
Updated blacklist check to use async/await
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuggins committed Mar 24, 2018
1 parent c28dcca commit 20fce8d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/Root.jsx → app/Root/Root.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// @flow
import React from 'react'
import { Provider } from 'react-redux'
import Routes from './Routes'
import { BrowserRouter } from 'react-router-dom'

import Routes from '../Routes'

type Props = {
store: Object,
}
Expand Down
5 changes: 5 additions & 0 deletions app/Root/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { hot } from 'react-hot-loader'

import Root from './Root'

export default hot(module)(Root)
3 changes: 2 additions & 1 deletion app/core/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import { toBigNumber } from './math'
const MIN_PASSPHRASE_LEN = 4

let addressBlacklist: Array<string> | null = null
export const isInBlacklist = async (address: string): Promise<boolean> => {

export const isBlacklisted = async (address: string): Promise<boolean> => {
if (addressBlacklist === null) {
const { data } = await axios.get('https://raw.githubusercontent.com/CityOfZion/phishing/master/blockedAddresses.json')
addressBlacklist = data
Expand Down

0 comments on commit 20fce8d

Please sign in to comment.