39 word-break: break-all;
63 text-overflow: ellipsis;
75 <div class="warp bg-gray">
76 <section class="header bg-header">
77 <i class="iconfont icon-back" @click="close"></i>
78 <p>{{ $t('transfer.confirmTransaction') }}</p>
81 <section class="content bg-white">
85 <td class="col label">{{ $t('transfer.from') }}</td>
86 <td class="col value">{{currentAccount.alias}}</td>
88 <div class="divider"></div>
90 <td class="col label">Input</td>
91 <td class="col value" v-bind:class="{ hide: !full }" >{{transaction.input}}</td>
94 <td class="col label">Output</td>
95 <td class="col value" v-bind:class="{ hide: !full }" >{{transaction.output}}</td>
97 <tr v-if="transaction.args" class="row">
98 <td class="col label">Args</td>
99 <td class="col value" v-bind:class="{ hide: !full }" >{{transaction.args}}</td>
102 <td colspan="2" class="center-text">
103 <a v-on:click="full = !full" class="view-link">
104 {{ full? $t('transfer.hideAll'): $t('transfer.viewAll') }} >>
109 <div class="divider"></div>
112 <td class="col label">{{ $t('transfer.fee') }}</td>
113 <td class="col value">{{transaction.fee}}<span class="uint">BTM</span></td>
118 <section class="content bg-white">
120 <div class="form-item">
121 <label class="form-item-label">{{ $t('transfer.confirmPassword') }}</label>
122 <div class="form-item-content">
123 <input type="password" v-model="password" autofocus>
129 <div class="row" style="margin: 20px;">
130 <div class="btn bg-green" @click="transfer">{{ $t('transfer.confirm') }}</div>
137 import transaction from "@/models/transaction";
138 import getLang from "@/assets/language/sdk";
139 import { LocalStream } from 'extension-streams';
140 import {apis} from '@/utils/BrowserApis';
141 import NotificationService from '../../services/NotificationService'
142 import { mapActions, mapGetters, mapState } from 'vuex'
171 NotificationService.close();
173 transfer: function () {
174 let loader = this.$loading.show({
175 // Optional parameters
178 onCancel: this.onCancel
181 transaction.buildTransaction(this.currentAccount.guid, this.transaction.input, this.transaction.output, this.transaction.fee * 100000000, this.transaction.confirmations).then(async (result) => {
184 if(this.transaction.args){
185 arrayData = await transaction.convertArgument(this.transaction.args)
188 return transaction.advancedTransfer(this.currentAccount.guid, result, this.password, arrayData)
191 this.prompt.responder(resp);
194 body: this.$t("transfer.success")
196 NotificationService.close();
205 body: getLang(error.message)
210 this.prompt = window.data || apis.extension.getBackgroundPage().notification || null;
212 if(this.prompt.data !== undefined){
213 const inout = this.prompt.data
214 if(inout.input !== undefined){
215 this.transaction.input = inout.input
217 if(inout.output !== undefined){
218 this.transaction.output = inout.output
220 if(inout.args !== undefined){
221 this.transaction.args = inout.args
223 if(inout.gas !== undefined){
224 this.transaction.fee = inout.gas/100000000
226 if(inout.confirmations !== undefined){
227 this.transaction.confirmations = inout.confirmations
230 const array = inout.input.filter(action => action.type ==='spend_wallet')
231 this.transaction.amounts = array