diff --git a/mmx-node/linux/x86_64/lib/libmmx_modules.so b/mmx-node/linux/x86_64/lib/libmmx_modules.so index 3c71658..fd1296b 100644 Binary files a/mmx-node/linux/x86_64/lib/libmmx_modules.so and b/mmx-node/linux/x86_64/lib/libmmx_modules.so differ diff --git a/mmx-node/linux/x86_64/www/web-gui/public/GIT_COMMIT_HASH.json b/mmx-node/linux/x86_64/www/web-gui/public/GIT_COMMIT_HASH.json index 811da8f..cbcadb8 100644 --- a/mmx-node/linux/x86_64/www/web-gui/public/GIT_COMMIT_HASH.json +++ b/mmx-node/linux/x86_64/www/web-gui/public/GIT_COMMIT_HASH.json @@ -1 +1 @@ -{ "GIT_COMMIT_HASH": "8a0f73d83671b6494972216f60676bdcd2f1814c" } \ No newline at end of file +{ "GIT_COMMIT_HASH": "df961cbf0f19b8e6605192d8432b35b87ee55a2b" } \ No newline at end of file diff --git a/mmx-node/linux/x86_64/www/web-gui/public/explorer.js b/mmx-node/linux/x86_64/www/web-gui/public/explorer.js index d9c563b..659e466 100644 --- a/mmx-node/linux/x86_64/www/web-gui/public/explorer.js +++ b/mmx-node/linux/x86_64/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/mmx-node/linux/x86_64/www/web-gui/public/swap.js b/mmx-node/linux/x86_64/www/web-gui/public/swap.js index 18b78d8..6c22023 100644 --- a/mmx-node/linux/x86_64/www/web-gui/public/swap.js +++ b/mmx-node/linux/x86_64/www/web-gui/public/swap.js @@ -517,6 +517,7 @@ Vue.component('swap-trade', { return { data: null, buy_fee: null, + buy_price: null, buy_amount: null, buy_balance: null, buy_estimate: null, @@ -524,6 +525,7 @@ Vue.component('swap-trade', { buy_slippage: 0.98, buy_tx_fee: null, sell_fee: null, + sell_price: null, sell_amount: null, sell_balance: null, sell_estimate: null, @@ -567,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) { @@ -597,24 +598,28 @@ Vue.component('swap-trade', { }, update_buy_estimate() { this.buy_fee = null; + this.buy_price = null; this.buy_estimate = null; if(this.buy_amount > 0) { fetch('/wapi/swap/trade_estimate?id=' + this.address + '&index=1&amount=' + this.buy_amount + '&iters=' + this.buy_num_iter) .then(response => response.json()) .then(data => { - this.buy_fee = (100 * data.fee.value / (parseFloat(data.trade.value) + parseFloat(data.fee.value))).toFixed(2); + this.buy_fee = data.fee_percent.toFixed(2); + this.buy_price = parseFloat((1 / data.avg_price).toPrecision(6)); this.buy_estimate = data.trade.value; }); } }, update_sell_estimate() { this.sell_fee = null; + this.sell_price = null; this.sell_estimate = null; if(this.sell_amount > 0) { fetch('/wapi/swap/trade_estimate?id=' + this.address + '&index=0&amount=' + this.sell_amount + '&iters=' + this.sell_num_iter) .then(response => response.json()) .then(data => { - this.sell_fee = (100 * data.fee.value / (parseFloat(data.trade.value) + parseFloat(data.fee.value))).toFixed(2); + this.sell_fee = data.fee_percent.toFixed(2); + this.sell_price = parseFloat(data.avg_price.toPrecision(6)); this.sell_estimate = data.trade.value; }); } @@ -685,6 +690,15 @@ Vue.component('swap-trade', { + + + + + + + Update {{ $t('swap.buy') }} @@ -746,6 +761,15 @@ Vue.component('swap-trade', { + + + + + + + Update {{ $t('swap.sell') }} diff --git a/mmx-node/linux/x86_64/www/web-gui/public/wallet.js b/mmx-node/linux/x86_64/www/web-gui/public/wallet.js index f957013..3ed9473 100644 --- a/mmx-node/linux/x86_64/www/web-gui/public/wallet.js +++ b/mmx-node/linux/x86_64/www/web-gui/public/wallet.js @@ -1446,7 +1446,7 @@ Vue.component('account-send-form', { source: null, address: "", currency: null, - fee_ratio: 1, // TODO + fee_ratio: 1024, confirmed: false, result: null, error: null, @@ -1507,6 +1507,7 @@ Vue.component('account-send-form', { } req.dst_addr = this.target; req.options = {}; + req.options.fee_ratio = this.fee_ratio; req.options.passphrase = passphrase; fetch('/wapi/wallet/send', {body: JSON.stringify(req), method: "post"}) @@ -1596,11 +1597,18 @@ Vue.component('account-send-form', { :disabled="!!target_"> - - + + + + + + + + + @@ -1627,7 +1635,7 @@ Vue.component('account-send-form', {
- {{ $t('account_send_form.send') }} + {{ $t('account_send_form.send') }}