Skip to content

Commit

Permalink
Fixed #1292
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyapotti committed Dec 15, 2020
1 parent 94fd9a7 commit 84ffc2b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/src/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import log from 'loglevel'

import {
APPLE,
APPLE_LINKED_VERIFIER,
Expand Down Expand Up @@ -63,6 +65,8 @@ const {
VUE_APP_KAKAO_CLIENT_ID,
} = process.env

log.info('baseurl', VUE_APP_BASE_ROUTE)

const baseUrl = VUE_APP_BASE_ROUTE || 'https://localhost:3000'

const baseRoute = baseUrl + process.env.BASE_URL
Expand Down
6 changes: 4 additions & 2 deletions app/src/store/preferencesActions.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import BigNumber from 'bignumber.js'
import log from 'loglevel'
import { fromWei, isAddress, toBN, toChecksumAddress } from 'web3-utils'

Expand Down Expand Up @@ -111,12 +112,13 @@ export default {
;[amountTo, amountValue] = methodParams || []
}
}
const { symbol: contractSymbol, name, logo } = contractParams
const { symbol: contractSymbol, name, logo, decimals } = contractParams
symbol = contractSymbol
type = 'erc20'
typeName = name || 'ERC20'
typeImageLink = logo
totalAmount = fromWei(toBN(amountValue && amountValue.value ? amountValue.value : txParams.value || 0))
const bnAmount = new BigNumber(amountValue && amountValue.value ? amountValue.value : txParams.value || 0)
totalAmount = decimals ? bnAmount.div(new BigNumber(10).pow(new BigNumber(decimals))).toString() : fromWei(bnAmount)
finalTo = amountTo && isAddress(amountTo.value) && toChecksumAddress(amountTo.value)
} else {
tokenRate = 1
Expand Down

0 comments on commit 84ffc2b

Please sign in to comment.