mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-29 00:25:48 +00:00
JS: Add ledger_accept to remote.js
This commit is contained in:
committed by
Stefan Thomas
parent
7c802e501b
commit
63262c9be7
24
js/remote.js
24
js/remote.js
@@ -299,16 +299,30 @@ Remote.prototype.server_subscribe = function (onDone, onFailure) {
|
|||||||
|
|
||||||
this.request(
|
this.request(
|
||||||
{ 'command' : 'server_subscribe' },
|
{ 'command' : 'server_subscribe' },
|
||||||
function (r) {
|
function (r) {
|
||||||
self.ledger_current_index = r.ledger_current_index;
|
self.ledger_current_index = r.ledger_current_index;
|
||||||
self.ledger_closed = r.ledger_closed;
|
self.ledger_closed = r.ledger_closed;
|
||||||
self.stand_alone = r.stand_alone;
|
self.stand_alone = r.stand_alone;
|
||||||
onDone();
|
onDone();
|
||||||
},
|
},
|
||||||
onFailure
|
onFailure
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Remote.prototype.ledger_accept = function (onDone, onFailure) {
|
||||||
|
if (this.stand_alone)
|
||||||
|
{
|
||||||
|
this.request(
|
||||||
|
{ 'command' : 'ledger_accept' },
|
||||||
|
onDone,
|
||||||
|
onFailure
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
onFailure({ 'error' : 'notStandAlone' });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Refresh accounts[account].seq
|
// Refresh accounts[account].seq
|
||||||
// done(result);
|
// done(result);
|
||||||
Remote.prototype.account_seq = function (account, advance, onDone, onFailure) {
|
Remote.prototype.account_seq = function (account, advance, onDone, onFailure) {
|
||||||
|
|||||||
Reference in New Issue
Block a user