Skip to content

Commit

Permalink
Remove requests initialization when initializing state
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziovigevani committed Oct 18, 2019
1 parent 9bf727c commit d36718a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/script.js
Expand Up @@ -80,6 +80,7 @@ async function createStore(tokenManagerContract, tokens, settings) {
function initializeState(tokenManagerContract, tokens, settings) {
return async cachedState => {
try {

const minimeAddress = await tokenManagerContract.token().toPromise()
const token = await getTokenData(minimeAddress, settings)
const acceptedTokens = await getAcceptedTokens(tokens, settings)
Expand All @@ -94,7 +95,6 @@ function initializeState(tokenManagerContract, tokens, settings) {
isSyncing: true,
token,
acceptedTokens: acceptedTokens,
requests: [],
}
} catch (error) {
console.error('Error initializing state: ', error)
Expand Down Expand Up @@ -123,7 +123,7 @@ async function newTokenRequest(
blockNumber
) {
try {
const { requests } = state
const { requests = [] } = state
const { decimals, name, symbol } =
depositToken === ETHER_TOKEN_FAKE_ADDRESS ? ETHER_DATA : await getTokenData(depositToken, settings)

Expand Down

0 comments on commit d36718a

Please sign in to comment.