Bytom Wallet for Chrome
Révision | 21f88ba27fe06a9c6ac3104aec621e8f7141809b (tree) |
---|---|
l'heure | 2020-10-30 12:03:57 |
Auteur | Zhiting Lin <zlin035@uott...> |
Commiter | Zhiting Lin |
update 0 amount reciever address
@@ -336,7 +336,7 @@ export default { | ||
336 | 336 | transaction.direct = "+"; |
337 | 337 | const resultAddr = inputAddresses.pop() |
338 | 338 | transaction.address = (resultAddr && resultAddr.includes(' '))?resultAddr:address.short(resultAddr); |
339 | - } else { | |
339 | + } else if (Number(balanceObject[0].amount) < 0) { | |
340 | 340 | if(!transaction.type) { |
341 | 341 | transaction.type = this.$t("common.transfer_out"); |
342 | 342 | } |
@@ -344,6 +344,13 @@ export default { | ||
344 | 344 | transaction.direct = "-"; |
345 | 345 | const resultAddr = outputAddresses.pop() |
346 | 346 | transaction.address = (resultAddr && resultAddr.includes(' '))?resultAddr:address.short(resultAddr); |
347 | + }else{ | |
348 | + if(!transaction.type) { | |
349 | + transaction.type = this.$t("common.transfer_out"); | |
350 | + } | |
351 | + | |
352 | + const resultAddr = outputAddresses.pop() || this.address | |
353 | + transaction.address = (resultAddr && resultAddr.includes(' '))?resultAddr:address.short(resultAddr); | |
347 | 354 | } |
348 | 355 | |
349 | 356 | if(transaction.types.includes('in_crosschain')){ |
@@ -376,7 +383,11 @@ export default { | ||
376 | 383 | transaction.type = this.$t("common.transfer_out"); |
377 | 384 | } |
378 | 385 | transaction.val = 0 |
379 | - transaction.address = address.short(this.address) | |
386 | + let resultAddr = transaction.outputs | |
387 | + .find(output => output.address !== this.address) | |
388 | + resultAddr = resultAddr? resultAddr.address : this.address | |
389 | + | |
390 | + transaction.address = address.short(resultAddr) | |
380 | 391 | |
381 | 392 | formattedTransactions.push(transaction); |
382 | 393 | } |
@@ -1,8 +1,4 @@ | ||
1 | 1 | <style lang="scss" scoped> |
2 | -.alias { | |
3 | - font-size: 13px; | |
4 | -} | |
5 | - | |
6 | 2 | .transactions { |
7 | 3 | font-size: 15px; |
8 | 4 | height:calc(100% - 80px); |
@@ -22,70 +18,51 @@ font-size: 15px; | ||
22 | 18 | display: block; |
23 | 19 | } |
24 | 20 | |
25 | - .symbol{ | |
26 | - display: flex; | |
27 | - align-items: center; | |
28 | - font-weight: 600; | |
29 | - font-size: 15px; | |
30 | - } | |
31 | - | |
32 | - .currency-banner{ | |
33 | - display: flex; | |
34 | - justify-content: space-between; | |
35 | - padding: 20px; | |
36 | - align-items: center; | |
37 | - font-size: 15px; | |
38 | - font-weight: 600; | |
39 | - .addr{ | |
40 | - font-weight: normal; | |
41 | - } | |
42 | - } | |
21 | +.back{ | |
22 | + width: 56px; | |
23 | + height: 28px; | |
43 | 24 | |
44 | - .back{ | |
45 | - width: 56px; | |
46 | - height: 28px; | |
25 | + background: #EEEEEE; | |
26 | + border-radius: 20px; | |
27 | +} | |
47 | 28 | |
48 | - background: #EEEEEE; | |
49 | - border-radius: 20px; | |
29 | +.header{ | |
30 | + display: flex; | |
31 | + margin-bottom: 20px; | |
32 | + h1{ | |
33 | + margin-left: 12px; | |
34 | + font-size: 20px; | |
50 | 35 | } |
36 | +} | |
51 | 37 | |
52 | - .header{ | |
53 | - display: flex; | |
54 | - margin-bottom: 20px; | |
55 | - h1{ | |
56 | - margin-left: 12px; | |
57 | - font-size: 20px; | |
58 | - } | |
59 | - } | |
38 | +.list-item a{ | |
39 | + display: flex; | |
40 | + justify-content: space-between; | |
41 | + width: 100%; | |
42 | + color: rgba(0, 0, 0, 0.88); | |
43 | + font-size: 14px; | |
44 | +} | |
60 | 45 | |
61 | - .list-item a{ | |
62 | - display: flex; | |
63 | - justify-content: space-between; | |
64 | - width: 100%; | |
65 | - color: rgba(0, 0, 0, 0.88); | |
66 | - font-size: 14px; | |
46 | +.transaction-title{ | |
47 | + display: flex; | |
48 | + font-weight: 600; | |
49 | + font-size: 15px; | |
50 | + margin: 16px 0; | |
51 | + color: rgba(0, 0, 0, 0.24); | |
52 | + div:not(:first-child) { | |
53 | + margin-left: 25px; | |
67 | 54 | } |
68 | 55 | |
69 | - .transaction-title{ | |
70 | - display: flex; | |
71 | - font-weight: 600; | |
72 | - font-size: 15px; | |
73 | - margin: 16px 0; | |
74 | - color: rgba(0, 0, 0, 0.24); | |
75 | - div:not(:first-child) { | |
76 | - margin-left: 25px; | |
77 | - } | |
78 | - | |
79 | - div{ | |
80 | - cursor: pointer; | |
81 | - } | |
82 | - } | |
83 | - .icon_circle_selected{ | |
84 | - color: #06BE85; | |
85 | - font-size: 16px; | |
86 | - vertical-align: middle; | |
87 | - margin-right: 5px; | |
56 | + div{ | |
57 | + cursor: pointer; | |
88 | 58 | } |
59 | +} | |
60 | +.icon_circle_selected{ | |
61 | + color: #06BE85; | |
62 | + font-size: 16px; | |
63 | + vertical-align: middle; | |
64 | + margin-right: 5px; | |
65 | +} | |
89 | 66 | </style> |
90 | 67 | |
91 | 68 | <template> |
@@ -140,12 +117,8 @@ font-size: 15px; | ||
140 | 117 | import address from "@/utils/address"; |
141 | 118 | import query from "@/models/query"; |
142 | 119 | import transaction from "@/models/transaction"; |
143 | -import { camelize } from "@/utils/utils"; | |
144 | 120 | import { BTM } from "@/utils/constants"; |
145 | -import { mapActions, mapGetters, mapState } from 'vuex' | |
146 | -import * as Actions from '@/store/constants'; | |
147 | -import _ from 'lodash'; | |
148 | -import { Number as Num } from "@/utils/Number" | |
121 | +import { mapGetters, mapState } from 'vuex' | |
149 | 122 | import moment from 'moment' |
150 | 123 | |
151 | 124 | const EnterActive = 'animated faster fadeInLeft'; |
@@ -165,7 +138,6 @@ export default { | ||
165 | 138 | enterActive: EnterActive, |
166 | 139 | leaveActive: LeaveActive, |
167 | 140 | currentBlockHeight:0, |
168 | - currentTimeStamp:0 | |
169 | 141 | }; |
170 | 142 | }, |
171 | 143 | watch: { |
@@ -218,17 +190,6 @@ export default { | ||
218 | 190 | $state.complete(); |
219 | 191 | } |
220 | 192 | }, |
221 | - img:function (symbol) { | |
222 | - const _symbol = symbol.toLowerCase(); | |
223 | - if(this.netType === 'vapor'){ | |
224 | - return `https://cdn.blockmeta.com/resources/logo/vapor/${_symbol}.png` | |
225 | - }else{ | |
226 | - return `https://cdn.blockmeta.com/resources/logo/bytom/${_symbol}.png` | |
227 | - } | |
228 | - }, | |
229 | - onImgError: function(event) { | |
230 | - event.target.src = require(`@/assets/img/asset/${this.netType}.png`) | |
231 | - }, | |
232 | 193 | blockmeta:function (txid) { |
233 | 194 | if(this.netType === 'vapor'){ |
234 | 195 | return `https://vapor.blockmeta.com/tx/${txid}` |
@@ -236,9 +197,6 @@ export default { | ||
236 | 197 | return `https://blockmeta.com/tx/${txid}` |
237 | 198 | } |
238 | 199 | }, |
239 | - camelize: function (object) { | |
240 | - return camelize(object) | |
241 | - }, | |
242 | 200 | close: function () { |
243 | 201 | this.$router.go(-1) |
244 | 202 | }, |
@@ -295,10 +253,6 @@ export default { | ||
295 | 253 | }); |
296 | 254 | return formattedTransactions; |
297 | 255 | }, |
298 | - ...mapActions([ | |
299 | - Actions.UPDATE_STORED_BYTOM, | |
300 | - Actions.SET_LIST_VOTE | |
301 | - ]) | |
302 | 256 | }, |
303 | 257 | async mounted() { |
304 | 258 | if(this.language === 'zh' ||this.language === 'cn'){ |
@@ -1,6 +1,6 @@ | ||
1 | 1 | <?xml version='1.0' encoding='UTF-8'?> |
2 | 2 | <gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'> |
3 | 3 | <app appid='gnooapainaenaagmljnopepbheiaaaok'> |
4 | - <updatecheck codebase='http://localhost:8000/chrome-ext.crx' version='3.0.6' prodversionmin='64.0.3242' /> | |
4 | + <updatecheck codebase='http://localhost:8000/chrome-ext.crx' version='3.0.7' prodversionmin='64.0.3242' /> | |
5 | 5 | </app> |
6 | 6 | </gupdate> |
\ No newline at end of file |