Skip to content

Commit 9d708e9

Browse files
authored
Merge pull request #71 from KiFoundation/fix/divers
Fix/divers
2 parents 5fe14c1 + 789e24e commit 9d708e9

File tree

10 files changed

+38
-33
lines changed

10 files changed

+38
-33
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ki-desktop-wallet",
33
"description": "The KiChain wallet",
4-
"version": "0.5.0",
4+
"version": "0.5.1",
55
"private": true,
66
"main": "build/main/main.js",
77
"email": "[email protected]",

src/main/static/splashscreen.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</main>
3939

4040
<footer>
41-
<span> 0.5.0 </span>
41+
<span> 0.5.1 </span>
4242
</footer>
4343
</body>
4444
</html>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export default {
302302
'a',
303303
{
304304
attrs: {
305-
href: this.explorer + 'transactions/' + res.data.tx_response.txhash,
305+
href: this.explorer + 'ki-chain/txs/' + res.data.tx_response.txhash,
306306
target: '_blank',
307307
},
308308
},

src/renderer/store/wallets/actions.ts

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -142,31 +142,36 @@ export const actions = {
142142
case 'withdraw': {
143143
let amount = 0;
144144
const denom = config.kichain.token;
145-
146-
let withdraw_msg = tx.logs[0].events.filter((e) => {
147-
return e.type.includes('withdraw_rewards');
148-
});
149-
150-
if (withdraw_msg.length > 0 && withdraw_msg[0].attributes) {
151-
const amountWithDenomMatch = String(withdraw_msg[0].attributes[0].value).match(
152-
new RegExp(/(\d+)(\w+)/)
153-
);
154-
const [_, withdrawAmount, withdrawDenom] = amountWithDenomMatch;
155-
amount += withdrawAmount;
145+
146+
if (tx.logs.length == 0) {
147+
continue;
156148
}
157-
158-
transactions.push([
159-
tx.txhash,
160-
'withdraw',
161-
'',
162-
tokenUtil.formatShort(amount),
163-
fee,
164-
tx.timestamp,
165-
tx.tx.body.messages[0].validator_address,
166-
denom,
167-
]);
168-
break;
169-
}
149+
else{
150+
let withdraw_msg = tx.logs[0].events.filter((e) => {
151+
return e.type.includes('withdraw_rewards');
152+
});
153+
154+
if (withdraw_msg.length > 0 && withdraw_msg[0].attributes) {
155+
const amountWithDenomMatch = String(withdraw_msg[0].attributes[0].value).match(
156+
new RegExp(/(\d+)(\w+)/)
157+
);
158+
const [_, withdrawAmount, withdrawDenom] = amountWithDenomMatch;
159+
amount += withdrawAmount;
160+
}
161+
162+
transactions.push([
163+
tx.txhash,
164+
'withdraw',
165+
'',
166+
tokenUtil.formatShort(amount),
167+
fee,
168+
tx.timestamp,
169+
tx.tx.body.messages[0].validator_address,
170+
denom,
171+
]);
172+
}
173+
break;
174+
}
170175

171176
default:
172177
transactions.push([

src/renderer/views/wallet/delegation/modals/delegate.modal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export default {
272272
'a',
273273
{
274274
attrs: {
275-
href: this.explorer + 'transactions/' + res.data.tx_response.txhash,
275+
href: this.explorer + 'ki-chain/txs/' + res.data.tx_response.txhash,
276276
target: '_blank',
277277
},
278278
},

src/renderer/views/wallet/delegation/modals/redelegate.modal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export default {
284284
'a',
285285
{
286286
attrs: {
287-
href: this.explorer + 'transactions/' + res.data.tx_response.txhash,
287+
href: this.explorer + 'ki-chain/txs/' + res.data.tx_response.txhash,
288288
target: '_blank',
289289
},
290290
},

src/renderer/views/wallet/delegation/modals/undelegate.modal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export default {
293293
'a',
294294
{
295295
attrs: {
296-
href: this.explorer + 'transactions/' + res.data.tx_response.txhash,
296+
href: this.explorer + 'ki-chain/txs/' + res.data.tx_response.txhash,
297297
target: '_blank',
298298
},
299299
},

src/renderer/views/wallet/sign/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export default {
192192
this.sign.summary = this.parseMessage(this.sign.file_content);
193193
},
194194
getDenomFormatted(denom: string) {
195-
if (denom === this.globalData.kichain.denom) {
195+
if (denom === this.globalData.kichain.udenom) {
196196
return this.globalData.kichain.denom;
197197
}
198198
return 'usdc';

src/renderer/views/wallet/withdraw/modals/withdraw-all.modal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export default {
202202
'a',
203203
{
204204
attrs: {
205-
href: this.explorer + 'transactions/' + res.data.tx_response.txhash,
205+
href: this.explorer + 'ki-chain/txs/' + res.data.tx_response.txhash,
206206
target: '_blank',
207207
},
208208
},

src/renderer/views/wallet/withdraw/modals/withdraw.modal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export default {
236236
'a',
237237
{
238238
attrs: {
239-
href: this.explorer + 'transactions/' + res.data.tx_response.txhash,
239+
href: this.explorer + 'ki-chain/txs/' + res.data.tx_response.txhash,
240240
target: '_blank',
241241
},
242242
},

0 commit comments

Comments
 (0)