From e74604f3431e0b8ed11a0c0d9c679206dff2bbb7 Mon Sep 17 00:00:00 2001 From: Max Wittal Date: Tue, 23 May 2023 00:00:28 +0700 Subject: [PATCH] gui refactor --- www/web-gui/public/explorer.js | 24 +++++++++++------------- www/web-gui/public/swap.js | 9 ++++----- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/www/web-gui/public/explorer.js b/www/web-gui/public/explorer.js index d9c563bab..659e46694 100644 --- a/www/web-gui/public/explorer.js +++ b/www/web-gui/public/explorer.js @@ -554,7 +554,7 @@ Vue.component('transaction-view', { {{ $t('transaction_view.height') }} - + @@ -563,41 +563,39 @@ Vue.component('transaction-view', { {{ $t('transaction_view.message') }} - {{data.message}} + {{data.message}} {{ $t('transaction_view.confirmed') }} - {{data.confirm}} + {{data.confirm}} - + {{ $t('transaction_view.expires') }} - {{data.expires}} + {{data.expires}} {{ $t('transaction_view.note') }} - {{data.note}} + {{data.note}} {{ $t('transaction_view.time') }} - {{new Date(data.time * 1000).toLocaleString()}} + {{new Date(data.time * 1000).toLocaleString()}} {{ $t('transaction_view.address') }} - {{data.address}} + {{data.address}} {{ $t('transaction_view.sender') }} - {{data.sender}} + {{data.sender}} {{ $t('transaction_view.cost') }} - {{data.cost.value}} - MMX + {{data.cost.value}} MMX {{ $t('transaction_view.fee') }} - {{data.fee.value}} - MMX + {{data.fee.value}} MMX diff --git a/www/web-gui/public/swap.js b/www/web-gui/public/swap.js index 2ae663164..6c2202365 100644 --- a/www/web-gui/public/swap.js +++ b/www/web-gui/public/swap.js @@ -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) { @@ -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();