Skip to content

Commit d509c01

Browse files
authored
Merge pull request #23 from KiFoundation/fix/config-support
Fix/config support
2 parents 407abbc + 2f06427 commit d509c01

File tree

29 files changed

+1250
-509
lines changed

29 files changed

+1250
-509
lines changed

app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<link rel="shortcut icon" type="image/png" href="static/img/chain/[email protected]">
8-
<title>Ki Wallet 0.3.0 beta</title>
8+
<title>Ki Wallet 0.3.1</title>
99
</head>
1010

1111
<body>

app/package-lock.json

Lines changed: 170 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Ki-Wallet",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "ki-wallet",
55
"author": "Ki Foundation",
66
"private": true,
@@ -22,14 +22,14 @@
2222
"bootstrap-vue": "^2.12.0",
2323
"clipboard": "^2.0.4",
2424
"crypto-js": "^4.0.0",
25-
"electron": ">=8.5.2",
2625
"es6-promise": "^4.2.8",
2726
"gsap": "^3.5.1",
2827
"jquery": "^3.4.1",
2928
"kind-of": ">=6.0.3",
3029
"minimist": ">=0.2.1",
3130
"numeral": "^2.0.6",
3231
"popper.js": "^1.15.0",
32+
"qrcode.vue": "^1.7.0",
3333
"request": "^2.88.2",
3434
"vue": "^2.5.2",
3535
"vue-clipboard2": "^0.3.1",
@@ -44,6 +44,7 @@
4444
"vuex": "^3.3.0"
4545
},
4646
"devDependencies": {
47+
"electron": ">=11.1.0",
4748
"autoprefixer": "^7.1.2",
4849
"babel-core": "^6.22.1",
4950
"babel-eslint": "^10.1.0",
@@ -71,7 +72,7 @@
7172
"lodash": ">=4.17.19",
7273
"mem": ">=4.0.0",
7374
"mixin-deep": ">=1.3.2",
74-
"node-notifier": "^5.1.2",
75+
"node-notifier": "^8.0.1",
7576
"optimize-css-assets-webpack-plugin": "^3.2.0",
7677
"ora": "^1.2.0",
7778
"portfinder": "^1.0.13",

app/src/App.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ import {
3232
GET_PRICE
3333
} from '@store/account';
3434
import {
35-
FETCH_VALIDATORS_LIST
35+
FETCH_VALIDATORS_LIST,
36+
FETCH_VALIDATORS_DICT,
3637
} from '@/store/validators';
3738
3839
export default {
@@ -91,6 +92,7 @@ export default {
9192
await this.getChain();
9293
await this.getAccounts();
9394
await this.fetchValidatorsList();
95+
await this.fetchValidatorsDict();
9496
await this.getPrice();
9597
this.isLoading = false;
9698
};
@@ -108,6 +110,7 @@ export default {
108110
}),
109111
...mapActions({
110112
fetchValidatorsList: FETCH_VALIDATORS_LIST,
113+
fetchValidatorsDict: FETCH_VALIDATORS_DICT,
111114
getPrice: GET_PRICE,
112115
}),
113116
getChain() {

app/src/components/info/modals/index.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
<b-row class="text-center" style="margin-bottom:20px; margin-top:40px">
88
<b-col>
99

10-
<b-avatar size="7rem" variant="light" :style="{
10+
<!-- <b-avatar size="7rem" variant="light" :style="{
1111
color: 'white',
1212
backgroundImage: currentWallet.bgImageStyle,
13-
}" :text="currentWallet.account[0].toUpperCase()" />
13+
}" :text="currentWallet.account[0].toUpperCase()" /> -->
14+
<qrcode-vue :value="currentWallet.address" :size="120" level="H" />
1415
</b-col>
1516
</b-row>
1617

@@ -227,13 +228,15 @@ import {
227228
tokenUtil
228229
} from '@static/js/token';
229230
import * as numeral from 'numeral';
231+
import QrcodeVue from 'qrcode.vue';
230232
231233
export default {
232234
components: {
233235
BRow,
234236
BCol,
235-
BAvatar,
237+
// BAvatar,
236238
BBadge,
239+
QrcodeVue,
237240
},
238241
props: {
239242
modalId: {

app/src/components/private-layout/topbar/wallet-actions.vue

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,34 @@
33
<div class="d-flex flex-row">
44
<div class="d-flex justify-content-center align-items-center">
55
<a v-b-modal="'info-modal'" class="d-flex flex-column align-items-center justify-content-center">
6-
<b-avatar class="d-flex justify-content-center align-items-center" size="3.5rem" variant="light" :style="{
6+
<b-avatar badge-offset="-2px" class="d-flex justify-content-center align-items-center" size="3.5rem" variant="light" :style="{
77
color: 'white',
88
backgroundImage: currentWallet.bgImageStyle,
9-
}" :text="currentWallet.account[0].toUpperCase()" />
9+
}" :text="currentWallet.account[0].toUpperCase()" >
10+
<template #badge><div style="color:white;font-weight:400;font-size:10px">+</div></template>
11+
</b-avatar>
1012
</a>
11-
1213
</div>
1314
<div class="d-flex justify-content-center flex-column ml-3">
14-
<a v-if="!show_add" @click="show_add=!show_add">
1515
<h5 >{{ currentWallet.account }}</h5>
16-
</a>
17-
<div v-else>
18-
<a @click="show_add=!show_add">
19-
<h6 style=" display: inline;">
20-
{{ currentWallet.address }}
16+
<h6 class="mt-1" style=" display: inline; font-weight:400; cursor: pointer;">
17+
<span id="popover-target-copy" v-clipboard:copy="currentWallet.address" @click="copy_text='Copied'"> {{ currentWallet.address }} </span>
18+
<b-popover target="popover-target-copy" triggers="hover" placement="right" @hidden="onHidden">
19+
{{copy_text}}
20+
</b-popover>
2121
</h6>
22-
</a>
23-
<img type="button" v-clipboard:copy="currentWallet.address" src="static/img/icons/copy.png" width="15px" class="copy" />
24-
25-
</div>
26-
<h4>
27-
<span :style="{ fontWeight: '800' }">{{ total_available }} </span>
22+
<h4 class="mt-1">
23+
<span :style="{ fontSize:'1.4rem', fontWeight: '800' }">{{ total_available }} </span>
2824
<span :style="{ fontWeight: '400' }">{{ globalData.kichain.token }}</span>
29-
</h4>
30-
<p :style="{
31-
color: 'var(--secondary)',
32-
fontSize: '0.9rem',
33-
fontWeight: '600',
34-
}">
25+
<span :style="{
26+
color: 'var(--secondary)',
27+
fontSize: '0.9rem',
28+
fontWeight: '600'
29+
}">
3530

36-
≈ ${{total_usd}} (${{ token_price }}/{{ globalData.kichain.token }})
37-
</p>
31+
≈ ${{total_usd}} (${{ token_price }}/{{ globalData.kichain.token }})
32+
</span>
33+
</h4>
3834
</div>
3935
</div>
4036

@@ -65,7 +61,8 @@ import InfoModal from '@cmp/info/modals/index';
6561
import ErrorModal from '@cmp/error/modals/index';
6662
import {
6763
BAvatar,
68-
BTooltip
64+
BTooltip,
65+
BPopover
6966
} from 'bootstrap-vue';
7067
import {
7168
mapGetters,
@@ -89,7 +86,8 @@ export default {
8986
TransferModal,
9087
BAvatar,
9188
InfoModal,
92-
ErrorModal
89+
ErrorModal,
90+
BPopover
9391
},
9492
data() {
9593
return {
@@ -98,7 +96,8 @@ export default {
9896
invalidWallet: false,
9997
total_usd:0,
10098
total_available:0,
101-
show_add: false
99+
show_add: false,
100+
copy_text: "Click to copy"
102101
};
103102
},
104103
computed: {
@@ -136,6 +135,9 @@ export default {
136135
this.refreshing = false;
137136
},
138137
toggleCopiedTooltip() {},
138+
onHidden(){
139+
this.copy_text= "Click to copy"
140+
}
139141
},
140142
};
141143
</script>

app/src/components/transfer/modals/index.vue

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export default {
257257
this.$emit('onResetModal');
258258
},
259259
// Make transfer
260-
sendTransfer() {
260+
async sendTransfer() {
261261
this.transfer.alert = 'danger';
262262
let filled = true;
263263
@@ -296,7 +296,7 @@ export default {
296296
type: 'cosmos-sdk/MsgSend',
297297
value: {
298298
from_address: account,
299-
to_address: this.transfer.account,
299+
to_address: this.transfer.account.trim(),
300300
amount: [
301301
{
302302
denom: this.udenom,
@@ -326,14 +326,26 @@ export default {
326326
}
327327
else {
328328
try {
329-
this.postTx({
329+
let res = await this.postTx({
330330
transaction,
331331
password: this.wallet_pass_tmp,
332332
});
333-
this.$bvToast.toast('Transaction sent with success', {
333+
334+
const $txhashlink = this.$createElement(
335+
'a',
336+
{
337+
attrs: {
338+
href: this.explorer + "transactions/" + res.data.txhash,
339+
target: "_blank"
340+
}
341+
},
342+
res.data.txhash.slice(0, 30) + "..."
343+
)
344+
345+
this.$bvToast.toast([$txhashlink] , {
334346
title: `Transaction success`,
335347
variant: 'success',
336-
autoHideDelay: 2000,
348+
autoHideDelay: 5000,
337349
solid: true,
338350
toaster: 'b-toaster-bottom-center',
339351
});
@@ -372,7 +384,8 @@ export default {
372384
}
373385
},
374386
download() {
375-
return util.download( 'transfer_' + this.transfer.amount + 'ki_tx.json', document, this.transfer.output);
387+
var date_today = util.getFormatedDate()
388+
return util.download( 'transfer_' + this.transfer.amount + 'ki_tx_' + date_today + '.json', document, this.transfer.output);
376389
},
377390
},
378391
};

app/src/components/tx/tx.card.vue

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,44 @@
77
<unicon name="location-arrow" :fill="colors.secondary" />
88
<h6 class="ml-2 text-truncate"><a :href="explorer+ 'transactions/' + transaction[0]" target="_blank" > {{ transaction[0] }}</a></h6>
99
</b-col>
10-
<b-col cols="1">
10+
<b-col cols="1" style="padding-left:0px">
1111
<b-badge :class="[ 'badge-'+transaction[1]]" :style="{ fontSize: '12px' }" >
1212
{{transaction[1]}}
1313
</b-badge>
1414
</b-col>
15-
<b-col cols="2"><a :href="explorer+ 'account/' + transaction[6]" target="_blank" :title="wallets_dict[transaction[6]]? wallets_dict[transaction[6]] : transaction[6]" ><h6 class="ml-3 text-truncate">{{wallets_dict[transaction[6]]? wallets_dict[transaction[6]] : transaction[6] }}</h6></a></b-col>
16-
<b-col cols="2" v-if="transaction[1]=='delegate'"><a :href="explorer+ 'validator/' + transaction[2]" target="_blank"><h6 class="text-truncate">{{validators_dict[transaction[2]]? validators_dict[transaction[2]] : transaction[2] }}</h6></a></b-col>
17-
<b-col cols="2" v-else class="text"><a :href="explorer+ 'account/' + transaction[2]" target="_blank" :title="wallets_dict[transaction[2]]? wallets_dict[transaction[2]] : transaction[2]"><h6 class="text-truncate">{{wallets_dict[transaction[2]]? wallets_dict[transaction[2]] : transaction[2] }}</h6></a></b-col>
15+
<b-col cols="2" v-if="transaction[1]=='undelegate' || transaction[1]=='redelegate'">
16+
<a :href="explorer+ 'validator/' + transaction[6]" target="_blank" >
17+
<h6 class="ml-3 text-truncate" :title="transaction[6]">{{validators_dict[transaction[6]] ? validators_dict[transaction[6]].moniker : transaction[6] }}</h6>
18+
</a>
19+
</b-col>
20+
<b-col cols="2" v-else >
21+
<a :href="explorer+ 'account/' + transaction[6]" target="_blank" :title="wallets_dict[transaction[6]]? wallets_dict[transaction[6]] : transaction[6]">
22+
<h6 class="ml-3 text-truncate" :title="transaction[6]">{{wallets_dict[transaction[6]]? wallets_dict[transaction[6]] : transaction[6] }}</h6>
23+
</a>
24+
</b-col>
25+
<b-col cols="2" v-if="transaction[1]=='delegate' || transaction[1]=='undelegate' || transaction[1]=='redelegate'">
26+
<a :href="explorer+ 'validator/' + transaction[2]" target="_blank" >
27+
<h6 class="text-truncate" :title="transaction[2]">{{validators_dict[transaction[2]] ? validators_dict[transaction[2]].moniker : transaction[2] }}</h6>
28+
</a>
29+
</b-col>
30+
<b-col cols="2" v-else class="text">
31+
<a :href="explorer+ 'account/' + transaction[2]" target="_blank" :title="wallets_dict[transaction[2]]? wallets_dict[transaction[2]] : transaction[2]">
32+
<h6 class="text-truncate" :title="transaction[2]">{{wallets_dict[transaction[2]]? wallets_dict[transaction[2]] : transaction[2] }}</h6>
33+
</a>
34+
</b-col>
1835
<b-col cols="3">
1936
<span>
2037
{{ globalData.kichain.token }} {{transaction[3]}}
2138
</span>
2239
</b-col>
2340
<b-col cols="2"><span>{{ globalData.kichain.token }} {{transaction[4]}}</span></b-col>
24-
25-
<!-- <b-col cols="4" class="d-flex justify-content-end"> -->
26-
<!-- <slot /> -->
27-
<!-- </b-col> -->
2841
</b-row>
2942
</b-col>
3043
</b-row>
3144
</template>
3245

3346
<script>
34-
import { BRow, BCol, BButton, BBadge} from 'bootstrap-vue';
47+
import { BRow, BCol, BButton, BBadge, } from 'bootstrap-vue';
3548
import * as numeral from 'numeral';
3649
import { mapState } from 'vuex';
3750
import { tokenUtil } from '@static/js/token';
@@ -46,7 +59,8 @@ export default {
4659
components: {
4760
BRow,
4861
BCol,
49-
BBadge
62+
BBadge,
63+
// BPopover
5064
},
5165
props: {
5266
transaction: {
@@ -59,7 +73,7 @@ export default {
5973
...mapState({
6074
currentWallet: state => state.wallets.current,
6175
wallets_dict: state => state.wallets.dict,
62-
validators_dict: state => state.wallets.current.validators_dict,
76+
validators_dict: state => state.validators.dict,
6377
}),
6478
},
6579
methods: {

0 commit comments

Comments
 (0)