29 padding: 0 20px !important;
47 border-top: 12px solid #3c454b;
48 border-right: 12px solid #3c454b;
49 transform: rotate(45deg);
61 text-transform: uppercase;
76 word-break: break-all;
90 text-transform: uppercase;
111 <div class="warp bg-gray">
112 <section class="header bg-header">
113 <i class="iconfont icon-back" @click="$router.go(-1)"></i>
114 <p>{{ title || $t('vote.voteDetials') }}</p>
117 <div class="scorll-panel">
118 <section class="content bg-white">
122 <td class="col label">{{ accountLabel }}</td>
123 <td class="col value">{{account.alias}}</td>
125 <tr v-if="selectVote.name" class="row">
126 <td class="col label">{{ $t('listVote.bpName')}}</td>
127 <td class="col value">{{selectVote.name}}</td>
129 <tr v-else class="row">
130 <td class="col label">{{ $t('listVote.bpPubkey')}}</td>
131 <td class="col value">{{transaction.toShort}}</td>
133 <div class="divider"></div>
135 <td class="col label">{{ $t('listVote.votes') }}</td>
136 <td class="col value">{{transaction.amount}}<span v-if="assetAlias" class="uint">{{assetAlias}}</span></td>
139 <td class="col label">{{ $t('transfer.fee') }}</td>
140 <td class="col value">{{transaction.fee}}<span class="uint">BTM</span></td>
146 <section class="content bg-white">
148 <div class="form-item">
149 <label class="form-item-label">{{ $t('transfer.confirmPassword') }}</label>
150 <div class="form-item-content">
151 <input type="password" v-model="password" autofocus>
157 <div class="row" style="margin: 20px;">
158 <div class="btn bg-green" @click="transfer">{{ $t('transfer.confirm') }}</div>
167 import address from "@/utils/address";
168 import transaction from "@/models/transaction";
169 import BigNumber from "bignumber.js"
170 import account from "@/models/account";
171 import modalPasswd from "@/components/modal-passwd";
172 import getLang from "@/assets/language/sdk";
173 import { LocalStream } from 'extension-streams';
174 import { mapGetters,mapState } from 'vuex'
184 accountLabel: this.$t('listVote.voteAccount'),
197 beforeRouteEnter (to, from, next) {
199 if(from.name === 'veto') {
200 vm.title = vm.$t('vote.vetoDetials')
201 vm.accountLabel = vm.$t('listVote.vetoAccount')
209 if(this.assetAlias && this.assetAlias.toUpperCase() === 'BTM'){
210 const n = new BigNumber(this.transaction.amount)
211 return n.plus(this.transaction.fee).toNumber()
213 return Number(this.transaction.amount)
225 shortAddress: function (add) {
226 return address.short(add)
228 transfer: function () {
229 if (this.password == "") {
231 body: this.$t("transfer.emptyPassword")
235 let loader = this.$loading.show({
236 // Optional parameters
239 onCancel: this.onCancel
243 transaction.transfer(this.account.guid, this.rawData, this.password)
246 if(this.$route.params.type == 'popup'){
247 LocalStream.send({method:'transfer',action:'success', message:ret});
252 body: this.$t("transfer.success")
254 this.$router.push('/')
255 if(this.transaction.type === 'toVapor'){
256 account.setupNet(`${this.net}vapor`)
262 body: getLang(error.message, this.language)
267 let params = this.$route.params;
269 this.account = params.account;
270 this.transaction = params.transaction;
271 this.transaction.toShort = params.transaction.to;
272 this.rawData = params.rawData;
274 this.assetAlias = params.assetAlias;