Skip to content

Commit

Permalink
gui refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
madMAx43v3r committed May 22, 2023
1 parent 16d6979 commit e74604f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
24 changes: 11 additions & 13 deletions www/web-gui/public/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ Vue.component('transaction-view', {
<tbody>
<tr>
<td class="key-cell">{{ $t('transaction_view.height') }}</td>
<td colspan="2">
<td>
<template v-if="data.height">
<router-link :to="'/explore/block/height/' + data.height">{{data.height}}</router-link>
</template>
Expand All @@ -563,41 +563,39 @@ Vue.component('transaction-view', {
</tr>
<tr v-if="data.did_fail" class="red--text">
<td class="key-cell">{{ $t('transaction_view.message') }}</td>
<td colspan="2">{{data.message}}</td>
<td>{{data.message}}</td>
</tr>
<tr v-if="data.confirm">
<td class="key-cell">{{ $t('transaction_view.confirmed') }}</td>
<td colspan="2">{{data.confirm}}</td>
<td>{{data.confirm}}</td>
</tr>
<tr v-if="data.expires != 4294967295">
<tr v-if="data.expires < 4294967295">
<td class="key-cell">{{ $t('transaction_view.expires') }}</td>
<td colspan="2">{{data.expires}}</td>
<td>{{data.expires}}</td>
</tr>
<tr>
<td class="key-cell">{{ $t('transaction_view.note') }}</td>
<td colspan="2">{{data.note}}</td>
<td>{{data.note}}</td>
</tr>
<tr v-if="data.time">
<td class="key-cell">{{ $t('transaction_view.time') }}</td>
<td colspan="2">{{new Date(data.time * 1000).toLocaleString()}}</td>
<td>{{new Date(data.time * 1000).toLocaleString()}}</td>
</tr>
<tr v-if="data.deployed">
<td class="key-cell">{{ $t('transaction_view.address') }}</td>
<td colspan="2"><router-link :to="'/explore/address/' + data.address">{{data.address}}</router-link></td>
<td><router-link :to="'/explore/address/' + data.address">{{data.address}}</router-link></td>
</tr>
<tr v-if="data.sender">
<td class="key-cell">{{ $t('transaction_view.sender') }}</td>
<td colspan="2"><router-link :to="'/explore/address/' + data.sender">{{data.sender}}</router-link></td>
<td><router-link :to="'/explore/address/' + data.sender">{{data.sender}}</router-link></td>
</tr>
<tr>
<td class="key-cell">{{ $t('transaction_view.cost') }}</td>
<td class="collapsing"><b>{{data.cost.value}}</b></td>
<td>MMX</td>
<td><b>{{data.cost.value}}</b> MMX</td>
</tr>
<tr>
<td class="key-cell">{{ $t('transaction_view.fee') }}</td>
<td class="collapsing"><b>{{data.fee.value}}</b></td>
<td>MMX</td>
<td><b>{{data.fee.value}}</b> MMX</td>
</tr>
</tbody>
</v-simple-table>
Expand Down
9 changes: 4 additions & 5 deletions www/web-gui/public/swap.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,11 +569,10 @@ Vue.component('swap-trade', {
req.amount = amount;
req.min_trade = min_trade;
req.num_iter = num_iter;
const options = {};
req.options = {};
if(fee_ratio) {
options.fee_ratio = fee_ratio;
req.options.fee_ratio = fee_ratio;
}
req.options = options;
fetch('/wapi/wallet/swap/trade', {body: JSON.stringify(req), method: "post"})
.then(response => {
if(response.ok) {
Expand Down Expand Up @@ -633,10 +632,10 @@ Vue.component('swap-trade', {
}
},
buy_amount() {
this.update_buy_estimate(true);
this.update_buy_estimate();
},
buy_num_iter() {
this.update_buy_estimate(true);
this.update_buy_estimate();
},
sell_amount() {
this.update_sell_estimate();
Expand Down

0 comments on commit e74604f

Please sign in to comment.