diff --git a/js/remote.js b/js/remote.js index 8919d630..3bf421d6 100644 --- a/js/remote.js +++ b/js/remote.js @@ -299,16 +299,30 @@ Remote.prototype.server_subscribe = function (onDone, onFailure) { this.request( { 'command' : 'server_subscribe' }, - function (r) { - self.ledger_current_index = r.ledger_current_index; - self.ledger_closed = r.ledger_closed; - self.stand_alone = r.stand_alone; - onDone(); + function (r) { + self.ledger_current_index = r.ledger_current_index; + self.ledger_closed = r.ledger_closed; + self.stand_alone = r.stand_alone; + onDone(); }, 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 // done(result); Remote.prototype.account_seq = function (account, advance, onDone, onFailure) {