Skip to content

Commit

Permalink
[BLP-452] add default delegate_share (#56)
Browse files Browse the repository at this point in the history
* [BLP-481] echo 0.13

* [BLP-452] add default delegate_share
  • Loading branch information
vital-33 committed Nov 26, 2019
1 parent 681cb97 commit 2f9d59e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion app/actions/account-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
ECHO_ASSET_ID,
GLOBAL_ID_1,
EXPIRATION_INFELICITY,
CREATE_ACCOUNT_DELEGATE_SHARE_PERCENT,
} from '../constants/global-constants';
import { toggleLoading, setValue } from './form-actions';
import { setValue as setGlobal, setValue as setValueGlobal, setAccounts } from './global-actions';
Expand Down Expand Up @@ -135,7 +136,7 @@ export const registerAccount = (accountName) => async (dispatch, getState) => {
voting_account: config.ECHO_PROXY_TO_SELF_ACCOUNT,
delegating_account: account.id,
num_committee: 0,
delegate_share: 0,
delegate_share: CREATE_ACCOUNT_DELEGATE_SHARE_PERCENT * config.ECHO_1_PERCENT,
votes: [],
},
extensions: [],
Expand Down
4 changes: 2 additions & 2 deletions app/actions/auth-actions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { OPERATIONS_IDS } from 'echojs-lib';

import { TEMPLATE_ECHO_KEY } from '../constants/global-constants';
import { TEMPLATE_ECHO_KEY, CREATE_ACCOUNT_DELEGATE_SHARE_PERCENT } from '../constants/global-constants';
import { FORM_SIGN_UP } from '../constants/form-constants';
import { getOperationFee } from './transaction-actions';
import { setInValue } from './form-actions';
Expand Down Expand Up @@ -50,7 +50,7 @@ export const getAccountCreateFee = async (accountId, name = '') => {
voting_account: config.ECHO_PROXY_TO_SELF_ACCOUNT,
delegating_account: accountId,
num_committee: 0,
delegate_share: 0,
delegate_share: CREATE_ACCOUNT_DELEGATE_SHARE_PERCENT * config.ECHO_1_PERCENT,
votes: [],
},
extensions: [],
Expand Down
2 changes: 2 additions & 0 deletions app/constants/global-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export const CONTRACT_ID_PREFIX = `1.${constants.PROTOCOL_OBJECT_TYPE_ID.CONTRAC
export const EETH_ASSET_SYMBOL = 'EETH';
export const ERC20_TOKEN_PRECISION = 18;

export const CREATE_ACCOUNT_DELEGATE_SHARE_PERCENT = 20;

export const DISCONNECT_STATUS = 'disconnect';
export const CONNECT_STATUS = 'connect';
export const ACTIVE_KEY = 'active';
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "blip-wallet",
"productName": "BlipWallet",
"version": "0.7.0-rc.2",
"version": "0.8.0-rc.1",
"description": "Blip Wallet",
"scripts": {
"web": "cross-env NODE_ENV=development node --trace-warnings -r @babel/register ./node_modules/webpack-dev-server/bin/webpack-dev-server --config configs/webpack.config.web.babel.js --mode development --progress --colors --history-api-fallback --hot --inline",
Expand All @@ -26,14 +26,14 @@
"package-win": "yarn build && electron-builder build --win --x64 --publish never",
"package-mac": "yarn build && electron-builder build -m --publish never",
"package-mac-with-download-build": "yarn download-mac-build && yarn package-mac",
"postinstall": "yarn flow-typed && electron-builder install-app-deps package.json && yarn build-dll && opencollective-postinstall",
"postinstall": "electron-builder install-app-deps package.json && yarn build-dll && opencollective-postinstall",
"preinstall": "node ./internals/scripts/CheckYarn.js",
"prestart": "yarn build",
"start": "cross-env electron -r @babel/register ./app/main.dev.js",
"start-main-dev": "cross-env HOT=1 NODE_ENV=development electron -r @babel/register ./app/main.dev.js",
"start-renderer-dev": "cross-env NODE_ENV=development webpack-dev-server --config configs/webpack.config.renderer.dev.babel.js",
"test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 jest",
"test-all": "yarn lint && yarn flow && yarn build && yarn test && yarn build-e2e && yarn test-e2e",
"test-all": "yarn lint && yarn build && yarn test && yarn build-e2e && yarn test-e2e",
"test-e2e": "node -r @babel/register ./internals/scripts/CheckBuiltsExist.js && cross-env NODE_ENV=test testcafe electron:./ ./test/e2e/HomePage.e2e.js",
"test-e2e-live": "node -r @babel/register ./internals/scripts/CheckBuiltsExist.js && cross-env NODE_ENV=test testcafe-live electron:./ ./test/e2e/HomePage.e2e.js",
"test-watch": "yarn test --watch",
Expand Down Expand Up @@ -271,7 +271,7 @@
"connected-react-router": "^5.0.1",
"crypto-random-string": "^1.0.0",
"devtron": "^1.4.0",
"echojs-lib": "^1.9.1-rc.1",
"echojs-lib": "1.9.1-echo.13-rc.1",
"echojs-ping": "^0.1.5",
"electron-debug": "^2.0.0",
"electron-log": "^2.2.17",
Expand Down

0 comments on commit 2f9d59e

Please sign in to comment.