mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-29 00:25:48 +00:00
Add Request.add_account
This commit is contained in:
@@ -248,9 +248,21 @@ Request.prototype.accounts = function (accounts, realtime) {
|
||||
});
|
||||
|
||||
if (realtime) {
|
||||
this.message.rt_accounts = (this.message.rt_accounts || []).concat(processedAccounts);
|
||||
this.message.rt_accounts = processedAccounts;
|
||||
} else {
|
||||
this.message.accounts = (this.message.accounts || []).concat(processedAccounts);
|
||||
this.message.accounts = processedAccounts;
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Request.prototype.add_account = function(account, realtime) {
|
||||
var processedAccount = UInt160.json_rewrite(account);
|
||||
|
||||
if (realtime) {
|
||||
this.message.rt_accounts = (this.message.rt_accounts || []).concat(processedAccount);
|
||||
} else {
|
||||
this.message.accounts = (this.message.accounts || []).concat(processedAccount);
|
||||
}
|
||||
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user