Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2268 from rht/develop
Browse files Browse the repository at this point in the history
[FIX] Send: stop pathfinding on error-quote (RT-3201)
  • Loading branch information
mrajvanshy committed Mar 2, 2015
2 parents 50aa05c + 5714b73 commit df7ad41
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/js/tabs/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ SendTab.prototype.angular = function (module)
error: function () {
setImmediate(function () {
$scope.$apply(function () {
$scope.send.pathfind.close();
$scope.send.path_status = 'error-quote';
});
});
Expand All @@ -682,6 +683,7 @@ SendTab.prototype.angular = function (module)
!(data.result === 'success' || data.status === 'success') ||
!Array.isArray(data.quote.send) ||
!data.quote.send.length || !data.quote.address) {
$scope.send.pathfind.close();
$scope.send.path_status = 'error-quote';
$scope.send.quote_error = '';
if (data && data.result === 'error' &&
Expand All @@ -704,7 +706,8 @@ SendTab.prototype.angular = function (module)
}
});
} catch (e) {
console.error(e.stack ? e.stack : e);
console.error(e.stack || e);
$scope.send.pathfind.close();
$scope.send.path_status = 'error-quote';
}
};
Expand Down Expand Up @@ -793,9 +796,7 @@ SendTab.prototype.angular = function (module)

alt.rate = alt.amount.ratio_human(amount, {reference_date: slightlyInFuture});
alt.send_max = alt.amount.product_human(Amount.from_json('1.001'));
alt.paths = raw.paths_computed
? raw.paths_computed
: raw.paths_canonical;
alt.paths = raw.paths_computed || raw.paths_canonical;

// Selected currency should be the first option
if (raw.source_amount.currency) {
Expand Down

0 comments on commit df7ad41

Please sign in to comment.