mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-26 15:15:49 +00:00
Rename getPathFind to getPaths
This commit is contained in:
@@ -11,7 +11,7 @@ const getTransaction = require('./ledger/transaction');
|
|||||||
const getTransactions = require('./ledger/transactions');
|
const getTransactions = require('./ledger/transactions');
|
||||||
const getTrustlines = require('./ledger/trustlines');
|
const getTrustlines = require('./ledger/trustlines');
|
||||||
const getBalances = require('./ledger/balances');
|
const getBalances = require('./ledger/balances');
|
||||||
const getPathFind = require('./ledger/pathfind');
|
const getPaths = require('./ledger/pathfind');
|
||||||
const getOrders = require('./ledger/orders');
|
const getOrders = require('./ledger/orders');
|
||||||
const getOrderbook = require('./ledger/orderbook');
|
const getOrderbook = require('./ledger/orderbook');
|
||||||
const getSettings = require('./ledger/settings');
|
const getSettings = require('./ledger/settings');
|
||||||
@@ -41,7 +41,7 @@ RippleAPI.prototype = {
|
|||||||
getTransactions,
|
getTransactions,
|
||||||
getTrustlines,
|
getTrustlines,
|
||||||
getBalances,
|
getBalances,
|
||||||
getPathFind,
|
getPaths,
|
||||||
getOrders,
|
getOrders,
|
||||||
getOrderbook,
|
getOrderbook,
|
||||||
getSettings,
|
getSettings,
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ function formatResponse(pathfind, paths) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPathFind(pathfind, callback) {
|
function getPaths(pathfind, callback) {
|
||||||
validate.pathfind(pathfind);
|
validate.pathfind(pathfind);
|
||||||
|
|
||||||
const address = pathfind.source.address;
|
const address = pathfind.source.address;
|
||||||
@@ -102,4 +102,4 @@ function getPathFind(pathfind, callback) {
|
|||||||
], composeAsync(_.partial(formatResponse, pathfind), callback));
|
], composeAsync(_.partial(formatResponse, pathfind), callback));
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = utils.wrapCatch(getPathFind);
|
module.exports = utils.wrapCatch(getPaths);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const getSettingsResponse = require('./fixtures/get-settings-response');
|
|||||||
const getOrdersResponse = require('./fixtures/get-orders-response');
|
const getOrdersResponse = require('./fixtures/get-orders-response');
|
||||||
const getOrderbookResponse = require('./fixtures/get-orderbook-response');
|
const getOrderbookResponse = require('./fixtures/get-orderbook-response');
|
||||||
const getServerInfoResponse = require('./fixtures/get-server-info-response');
|
const getServerInfoResponse = require('./fixtures/get-server-info-response');
|
||||||
const getPathFindResponse = require('./fixtures/get-pathfind-response');
|
const getPathsResponse = require('./fixtures/get-paths-response');
|
||||||
const address = addresses.ACCOUNT;
|
const address = addresses.ACCOUNT;
|
||||||
|
|
||||||
function checkResult(expected, done, error, response) {
|
function checkResult(expected, done, error, response) {
|
||||||
@@ -173,7 +173,7 @@ describe('RippleAPI', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('getPathFind', function(done) {
|
it('getPaths', function(done) {
|
||||||
const pathfind = {
|
const pathfind = {
|
||||||
source: {
|
source: {
|
||||||
address: address
|
address: address
|
||||||
@@ -187,8 +187,8 @@ describe('RippleAPI', function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.api.getPathFind(pathfind,
|
this.api.getPaths(pathfind,
|
||||||
_.partial(checkResult, getPathFindResponse, done));
|
_.partial(checkResult, getPathsResponse, done));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('getLedgerVersion', function() {
|
it('getLedgerVersion', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user