Merge pull request #450 from clark800/api-names

Rename API parameters
This commit is contained in:
Chris Clark
2015-07-27 17:06:14 -07:00
2 changed files with 7 additions and 8 deletions

View File

@@ -98,8 +98,8 @@ function getTransactionsInternal(remote, address, options, callback) {
utils.getRecursive(getter, options.limit, composeAsync(format, callback));
}
function getTransactions(address, options, callback) {
validate.address(address);
function getTransactions(account, options, callback) {
validate.address(account);
validate.getTransactionsOptions(options);
const defaults = {maxLedgerVersion: this.remote.getLedgerSequence()};
@@ -113,11 +113,11 @@ function getTransactions(address, options, callback) {
const bound = options.earliestFirst ?
{minLedgerVersion: ledgerVersion} : {maxLedgerVersion: ledgerVersion};
const newOptions = _.assign(defaults, options, {startTx: tx}, bound);
getTransactionsInternal(this.remote, address, newOptions, callback);
getTransactionsInternal(this.remote, account, newOptions, callback);
});
} else {
const newOptions = _.assign(defaults, options);
getTransactionsInternal(this.remote, address, newOptions, callback);
getTransactionsInternal(this.remote, account, newOptions, callback);
}
}