mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
@@ -98,8 +98,8 @@ function getTransactionsInternal(remote, address, options, callback) {
|
|||||||
utils.getRecursive(getter, options.limit, composeAsync(format, callback));
|
utils.getRecursive(getter, options.limit, composeAsync(format, callback));
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTransactions(address, options, callback) {
|
function getTransactions(account, options, callback) {
|
||||||
validate.address(address);
|
validate.address(account);
|
||||||
validate.getTransactionsOptions(options);
|
validate.getTransactionsOptions(options);
|
||||||
|
|
||||||
const defaults = {maxLedgerVersion: this.remote.getLedgerSequence()};
|
const defaults = {maxLedgerVersion: this.remote.getLedgerSequence()};
|
||||||
@@ -113,11 +113,11 @@ function getTransactions(address, options, callback) {
|
|||||||
const bound = options.earliestFirst ?
|
const bound = options.earliestFirst ?
|
||||||
{minLedgerVersion: ledgerVersion} : {maxLedgerVersion: ledgerVersion};
|
{minLedgerVersion: ledgerVersion} : {maxLedgerVersion: ledgerVersion};
|
||||||
const newOptions = _.assign(defaults, options, {startTx: tx}, bound);
|
const newOptions = _.assign(defaults, options, {startTx: tx}, bound);
|
||||||
getTransactionsInternal(this.remote, address, newOptions, callback);
|
getTransactionsInternal(this.remote, account, newOptions, callback);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const newOptions = _.assign(defaults, options);
|
const newOptions = _.assign(defaults, options);
|
||||||
getTransactionsInternal(this.remote, address, newOptions, callback);
|
getTransactionsInternal(this.remote, account, newOptions, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ const utils = require('./utils');
|
|||||||
const validate = utils.common.validate;
|
const validate = utils.common.validate;
|
||||||
const Request = utils.common.core.Request;
|
const Request = utils.common.core.Request;
|
||||||
|
|
||||||
function submit(tx_blob: string,
|
function submit(txBlob: string, callback: (err: any, data: any) => void): void {
|
||||||
callback: (err: any, data: any) => void): void {
|
validate.blob(txBlob);
|
||||||
validate.blob(tx_blob);
|
|
||||||
const request = new Request(this.remote, 'submit');
|
const request = new Request(this.remote, 'submit');
|
||||||
request.message.tx_blob = tx_blob;
|
request.message.tx_blob = txBlob;
|
||||||
request.request(null, callback);
|
request.request(null, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user