From b803a925b4eebd71f166e95b0dd4109ff78ecaaa Mon Sep 17 00:00:00 2001 From: Ivan Tivonenko Date: Wed, 19 Aug 2015 22:50:28 +0300 Subject: [PATCH] [FIX] fix send_max calculation using new ripple-lib --- src/js/tabs/exchange.js | 2 +- src/js/tabs/send.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/tabs/exchange.js b/src/js/tabs/exchange.js index 84cd87e1b..bce8ed719 100644 --- a/src/js/tabs/exchange.js +++ b/src/js/tabs/exchange.js @@ -155,7 +155,7 @@ ExchangeTab.prototype.angular = function (module) var alt = {}; alt.amount = Amount.from_json(raw.source_amount); alt.rate = alt.amount.ratio_human(amount); - alt.send_max = alt.amount.product_human(Amount.from_json('1.01')); + alt.send_max = alt.amount.scale(1.01); alt.paths = raw.paths_computed ? raw.paths_computed : raw.paths_canonical; diff --git a/src/js/tabs/send.js b/src/js/tabs/send.js index a2a2196f1..6c94b7feb 100644 --- a/src/js/tabs/send.js +++ b/src/js/tabs/send.js @@ -508,7 +508,7 @@ SendTab.prototype.angular = function (module) var slightlyInFuture = new Date(+new Date() + 5 * 60000); alt.rate = alt.amount.ratio_human(amount, {reference_date: slightlyInFuture}); - alt.send_max = alt.amount.product_human(Amount.from_json('1.01')); + alt.send_max = alt.amount.scale(1.01); alt.paths = raw.paths_computed ? raw.paths_computed : raw.paths_canonical;