Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kewde committed Nov 3, 2017
1 parent 0d2ccbb commit e802513
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions src/app/core/rpc/rpc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,32 +243,32 @@ declare global {
* }
* ```
*/
oldCall(
instance: Injectable,
method: string,
params: Array<any> | null,
successCB: Function,
errorCB?: Function,
isPoll?: boolean,
isLast?: boolean
): void {
this.call(method, params)
.subscribe(
response => {
successCB.call(instance, response);
if (isPoll && isLast) {
this._callOnPoll.forEach((func) => func());
this._callOnNextPoll.forEach((func) => func());
this._callOnNextPoll = [];
}
},
error => {
if (errorCB) {
errorCB.call(instance, error.target ? error.target : error);
}
this.log.er(`oldCall: RPC Call returned an error`, error);
});
}
oldCall(
instance: Injectable,
method: string,
params: Array<any> | null,
successCB: Function,
errorCB?: Function,
isPoll?: boolean,
isLast?: boolean
): void {
this.call(method, params).subscribe(
response => {
successCB.call(instance, response);
if (isPoll && isLast) {
this._callOnPoll.forEach((func) => func());
this._callOnNextPoll.forEach((func) => func());
this._callOnNextPoll = [];
}
},
error => {
if (errorCB) {
errorCB.call(instance, error.target ? error.target : error);
}
this.log.er(`oldCall: RPC Call returned an error`, error);
}
);
}


/**
Expand Down Expand Up @@ -299,28 +299,28 @@ declare global {
*
* @returns void
*/
register(
instance: Injectable,
method: string,
params: Array<any> | Function | null,
successCB: Function,
when: string,
errorCB?: Function
): void {
let valid = false;
const _call = {
instance: instance,
method: method,
params: params,
successCB: successCB,
errorCB: errorCB
};

if (when.indexOf('address') !== -1 || when.indexOf('both') !== -1) {
this._callOnAddress.push(_call);
valid = true;
}
register(
instance: Injectable,
method: string,
params: Array<any> | Function | null,
successCB: Function,
when: string,
errorCB?: Function
): void {
let valid = false;
const _call = {
instance: instance,
method: method,
params: params,
successCB: successCB,
errorCB: errorCB
};

if (when.indexOf('address') !== -1 || when.indexOf('both') !== -1) {
this._callOnAddress.push(_call);
valid = true;
}
}


// TODO: Model / interface..
Expand All @@ -342,7 +342,7 @@ declare global {
* Do one poll for _address table_: execute all the registered calls.
* Triggered from within the GUI!
*/
specialPoll(): void {
specialPoll(): void {
// A poll only for address changes, triggered from the GUI!

this._callOnAddress.forEach(this._pollCall.bind(this));
Expand Down

0 comments on commit e802513

Please sign in to comment.