Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug PM-630: Header/Dashboard shows 0 OLY balance #383

Merged
merged 13 commits into from
May 31, 2018
12 changes: 7 additions & 5 deletions .bootstraprc
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
useFlexbox: true
styleLoaders:
- style-loader
- css-loader?sourceMap
- postcss-loader?sourceMap
- sass-loader?sourceMap
styles:
grid: true
buttons: true
Expand All @@ -20,3 +15,10 @@ env:
- css-loader
- postcss-loader
- sass-loader
development:
styleLoaders:
- style-loader
- css-loader?sourceMap
- postcss-loader?sourceMap
- sass-loader?sourceMap

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ deploy:
skip_cleanup: true
local_dir: dist
on:
branch: master
branch: olympia-qa
condition: $PROJECT = olympia
# mainnet deployments
- provider: s3
Expand Down
12 changes: 4 additions & 8 deletions config/environments/olympia/staging/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"gnosisdb": {
"protocol": "https",
"host": "gnosisdb-prod.gnosis.pm",
"host": "tradingdb.staging.gnosisdev.com",
"port": 443
},
"ethereum": {
Expand All @@ -10,11 +10,7 @@
"port": 443
},
"whitelist": {
"0xb2e87b8ce41184e0688027f370a972a436abe77e": "Giacomo",
"0xb00a24c899f88e5514583cfa8c40e4cdab6c473e": "Andre",
"0x65039084cc6f4773291a6ed7dcf5bc3a2e894ff3": "Denis",
"0x4b07f5a08639bcde3b7275a98dae265cbda608ca": "Lama",
"0xe7e3272a84cf3fe180345b9f7234ba705eb5e2ca": "Mikhail",
"0x95db47d3e9d574cd15b0f02c845bc2971b0fc3e1": "Lauti"
}
"0xf73037eacc54c8d9e3dd2847f76d2022e18746c8": "Lauti",
"0x13a1d49d0f5285586373755ec96d0ac81e7a1928": "Denis"
}
}
2 changes: 1 addition & 1 deletion env_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ ${PROJECT} == "mainnet" ]]; then
fi
elif [[ ${PROJECT} == "olympia" ]]; then
# olympia
if [[ ${TRAVIS_BRANCH} == "master" ]]; then
if [[ ${TRAVIS_BRANCH} == "master" ]] || [[ ${TRAVIS_BRANCH} == "olympia-qa" ]]; then
export GNOSIS_ENV=olympia/staging;
export NODE_ENV=production;
else
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"identity-obj-proxy": "^3.0.0",
"jest": "^23.0.1",
"json-loader": "^0.5.7",
"mini-css-extract-plugin": "^0.4.0",
"node-sass": "^4.9.0",
"postcss-loader": "^2.1.2",
"pre-commit": "^1.2.2",
Expand Down
2 changes: 1 addition & 1 deletion src/api/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export const getTokenBalance = async (tokenAddress, accountAddress) => {
const gnosis = await getROGnosisConnection()
const token = await gnosis.contracts.Token.at(tokenAddress)
const balance = await token.balanceOf(accountAddress)
return balance
return balance.toString()
}
1 change: 1 addition & 0 deletions src/store/selectors/blockchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const isGasCostFetched = (state, property) => state.blockchain.getIn(['ga
export const getTokenAmount = (state, tokenAddress) => {
const tokenAmount = state.blockchain.getIn(['tokenBalances', tokenAddress], 0)
let defaultTokenDecimal

try {
defaultTokenDecimal = Decimal(tokenAmount)
} catch (e) {
Expand Down
78 changes: 37 additions & 41 deletions webpack.prod.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FaviconsWebpackPlugin = require('favicons-webpack-plugin')
const UglifyJsWebpackPlugin = require('uglifyjs-webpack-plugin')
Expand Down Expand Up @@ -51,47 +51,43 @@ module.exports = (env = {}) => {
},
{
test: /\.mod\.(scss|css)$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]__[hash:base64:5]',
importLoaders: 2,
},
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]__[hash:base64:5]',
importLoaders: 2,
},
{
loader: 'postcss-loader',
},
{
loader: 'sass-loader',
options: { includePaths: [path.resolve(__dirname, './src')] },
},
],
}),
},
{
loader: 'postcss-loader',
},
{
loader: 'sass-loader',
options: { includePaths: [path.resolve(__dirname, './src')] },
},
],
},
{
test: /^((?!\.mod).)*\.(css|scss)$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
options: {
importLoaders: 2,
},
},
{
loader: 'postcss-loader',
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
importLoaders: 2,
},
{
loader: 'sass-loader',
options: { includePaths: [path.resolve(__dirname, './src')] },
},
],
}),
},
{
loader: 'postcss-loader',
},
{
loader: 'sass-loader',
options: { includePaths: [path.resolve(__dirname, './src')] },
},
],
},
{
test: /\.(ttf|otf|eot|woff(2)?)(\?[a-z0-9]+)?$/,
Expand All @@ -104,7 +100,9 @@ module.exports = (env = {}) => {
],
},
plugins: [
new ExtractTextPlugin('styles.css'),
new MiniCssExtractPlugin({
filename: 'styles.css',
}),
new FaviconsWebpackPlugin({
logo: interfaceConfig.logo.favicon,
// Generate a cache file with control hashes and
Expand Down Expand Up @@ -143,9 +141,7 @@ module.exports = (env = {}) => {
},
}),
new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en/),
new CopyWebpackPlugin([
{ from: path.join(__dirname, 'src/assets'), to: path.join(__dirname, 'dist/assets') },
]),
new CopyWebpackPlugin([{ from: path.join(__dirname, 'src/assets'), to: path.join(__dirname, 'dist/assets') }]),
],
}
}