Use the initial path find response as a first set of alternatives.

This commit is contained in:
Stefan Thomas
2013-08-08 18:43:06 -07:00
parent 08a2d771cd
commit 7c5e9bae2a

View File

@@ -38,10 +38,21 @@ util.inherits(PathFind, EventEmitter);
*/
PathFind.prototype.create = function ()
{
var self = this;
var req = this.remote.request_path_find_create(this.src_account,
this.dst_account,
this.dst_amount,
this.src_currencies);
this.src_currencies,
handleInitialPath);
function handleInitialPath(err, msg) {
if (err) {
// XXX Handle error
return;
}
self.notify_update(msg);
}
req.request();
};