Skip to content

Commit

Permalink
Merge pull request #18 from KiFoundation/features/withdraw
Browse files Browse the repository at this point in the history
Features/withdraw
  • Loading branch information
TarekAwwad committed Jan 6, 2021
2 parents bb34e12 + 5b7e5de commit 407abbc
Show file tree
Hide file tree
Showing 45 changed files with 1,664 additions and 401 deletions.
2 changes: 1 addition & 1 deletion app/index.html
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="shortcut icon" type="image/png" href="static/img/chain/kichain_icon@2x.png">
<title>Ki Wallet 0.2.2</title>
<title>Ki Wallet 0.3.0 beta</title>
</head>

<body>
Expand Down
129 changes: 81 additions & 48 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions app/package.json
@@ -1,6 +1,6 @@
{
"name": "Ki-Wallet",
"version": "0.2.2",
"version": "0.3.0",
"description": "ki-wallet",
"author": "Ki Foundation",
"private": true,
Expand All @@ -16,34 +16,34 @@
"@fortawesome/vue-fontawesome": "^0.1.9",
"@tendermint/sig": "^0.4.1",
"acorn": ">=5.7.4",
"axios": "^0.19.2",
"axios": "^0.21.1",
"bip39": "^3.0.2",
"bootstrap": "^4.4.1",
"bootstrap-vue": "^2.12.0",
"clipboard": "^2.0.4",
"crypto-js": "^4.0.0",
"electron": "^8.2.4",
"electron": ">=8.5.2",
"es6-promise": "^4.2.8",
"gsap": "^3.5.1",
"jquery": "^3.4.1",
"kind-of": ">=6.0.3",
"minimist": ">=0.2.1",
"numeral": "^2.0.6",
"popper.js": "^1.15.0",
"request": "^2.88.2",
"vue": "^2.5.2",
"vue-clipboard2": "^0.3.1",
"vue-context": "^5.2.0",
"vue-cookie": "^1.1.4",
"vue-foldable": "^1.0.0",
"vue-i18n": "^8.11.2",
"vue-js-toggle-button": "^1.3.3",
"vue-resource": "^1.5.1",
"vue-router": "^3.0.1",
"vue-simple-context-menu": "^3.1.10",
"vue-unicons": "^2.1.0",
"vuex": "^3.3.0"
},
"devDependencies": {
"acorn": ">=5.7.4",
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^10.1.0",
Expand All @@ -68,10 +68,8 @@
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"js-yaml": ">=3.13.1",
"kind-of": ">=6.0.3",
"lodash": ">=4.17.19",
"mem": ">=4.0.0",
"minimist": ">=0.2.1",
"mixin-deep": ">=1.3.2",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
Expand Down
29 changes: 24 additions & 5 deletions app/src/App.vue
Expand Up @@ -24,10 +24,12 @@ import {
} from 'vuex';
import {
SET_WALLETS_LIST,
SET_WALLETS_DICT
SET_WALLETS_DICT,
SET_CATEGORY_LIST
} from '@store/wallets';
import {
SET_ACCOUNT
SET_ACCOUNT,
GET_PRICE
} from '@store/account';
import {
FETCH_VALIDATORS_LIST
Expand Down Expand Up @@ -81,26 +83,32 @@ export default {
wallets: [],
delegations: {},
transactions: [],
categories: '',
};
},
created() {
const bootstrap = async () => {
await this.getChain();
await this.getAccounts();
await this.fetchValidatorsList();
await this.getPrice();
this.isLoading = false;
};
bootstrap();
},
mounted() {},
mounted() {
this.getCategories();
},
methods: {
...mapMutations({
setWalletsList: SET_WALLETS_LIST,
setWalletsDict: SET_WALLETS_DICT,
setAccount: SET_ACCOUNT,
setCategoryList: SET_CATEGORY_LIST,
}),
...mapActions({
fetchValidatorsList: FETCH_VALIDATORS_LIST,
getPrice: GET_PRICE,
}),
getChain() {
return new Promise(async res => {
Expand All @@ -126,6 +134,17 @@ export default {
res(1);
});
},
getCategories(){
let categories = [];
if (localStorage.getItem('categories')) {
categories = localStorage.getItem('categories').split(',');
}else{
categories = ['personal','work','multisignature','uncategorized']
localStorage.setItem('categories', categories);
}
this.categories = categories.join(",");
this.setCategoryList(categories);
},
getAccounts() {
return new Promise(res => {
if (localStorage.getItem('wallet_list')) {
Expand Down Expand Up @@ -164,7 +183,8 @@ export default {
publickey: Buffer.from(lse_temp.publicKey, ).toString('hex'),
ms: lse_temp.ms,
offline: lse_temp.offline,
invalid: lse_temp.invalid
invalid: lse_temp.invalid,
category: (lse_temp.category != undefined && this.categories.includes(lse_temp.category)) ? lse_temp.category : "uncategorized"
}
if (wallet_tmp.ms) {
Expand All @@ -177,7 +197,6 @@ export default {
}
}
}
this.setWalletsList(wallets);
this.setWalletsDict(wallets_dict);
res(1);
Expand Down

0 comments on commit 407abbc

Please sign in to comment.