diff --git a/src/api/index.js b/src/api/index.js index a3807858..dd5d5824 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -11,7 +11,7 @@ const getTransaction = require('./ledger/transaction'); const getTransactions = require('./ledger/transactions'); const getTrustlines = require('./ledger/trustlines'); const getBalances = require('./ledger/balances'); -const getPathFind = require('./ledger/pathfind'); +const getPaths = require('./ledger/pathfind'); const getOrders = require('./ledger/orders'); const getOrderbook = require('./ledger/orderbook'); const getSettings = require('./ledger/settings'); @@ -41,7 +41,7 @@ RippleAPI.prototype = { getTransactions, getTrustlines, getBalances, - getPathFind, + getPaths, getOrders, getOrderbook, getSettings, diff --git a/src/api/ledger/pathfind.js b/src/api/ledger/pathfind.js index b60c3f90..0bb49968 100644 --- a/src/api/ledger/pathfind.js +++ b/src/api/ledger/pathfind.js @@ -92,7 +92,7 @@ function formatResponse(pathfind, paths) { } } -function getPathFind(pathfind, callback) { +function getPaths(pathfind, callback) { validate.pathfind(pathfind); const address = pathfind.source.address; @@ -102,4 +102,4 @@ function getPathFind(pathfind, callback) { ], composeAsync(_.partial(formatResponse, pathfind), callback)); } -module.exports = utils.wrapCatch(getPathFind); +module.exports = utils.wrapCatch(getPaths); diff --git a/test/api-test.js b/test/api-test.js index bde6436d..0c123fbd 100644 --- a/test/api-test.js +++ b/test/api-test.js @@ -30,7 +30,7 @@ const getSettingsResponse = require('./fixtures/get-settings-response'); const getOrdersResponse = require('./fixtures/get-orders-response'); const getOrderbookResponse = require('./fixtures/get-orderbook-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; function checkResult(expected, done, error, response) { @@ -173,7 +173,7 @@ describe('RippleAPI', function() { }); }); - it('getPathFind', function(done) { + it('getPaths', function(done) { const pathfind = { source: { address: address @@ -187,8 +187,8 @@ describe('RippleAPI', function() { } } }; - this.api.getPathFind(pathfind, - _.partial(checkResult, getPathFindResponse, done)); + this.api.getPaths(pathfind, + _.partial(checkResult, getPathsResponse, done)); }); it('getLedgerVersion', function() { diff --git a/test/fixtures/get-pathfind-response.json b/test/fixtures/get-paths-response.json similarity index 100% rename from test/fixtures/get-pathfind-response.json rename to test/fixtures/get-paths-response.json