@@ -55,7 +55,7 @@ export function _flags (instanceId: string, api: DeriveApi): () => Observable<Fl
|
||||
map((values: Codec[]): FlagsIntermediate => {
|
||||
let resultIndex = -1;
|
||||
|
||||
for (let i = 0; i < calls.length; i++) {
|
||||
for (let i = 0, count = calls.length; i < count; i++) {
|
||||
if (isFunction(calls[i])) {
|
||||
results[i] = values[++resultIndex];
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ function injectFunctions (instanceId: string, api: DeriveApi, derives: DeriveCus
|
||||
)
|
||||
));
|
||||
|
||||
for (let i = 0; i < names.length; i++) {
|
||||
for (let i = 0, count = names.length; i < count; i++) {
|
||||
const name = names[i];
|
||||
|
||||
isIncluded(name) &&
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { ApprovalFlag } from '@polkadot/types/interfaces/elections';
|
||||
export function approvalFlagsToBools (flags: Vec<ApprovalFlag> | ApprovalFlag[]): boolean[] {
|
||||
const bools: boolean[] = [];
|
||||
|
||||
for (let i = 0; i < flags.length; i++) {
|
||||
for (let i = 0, count = flags.length; i < count; i++) {
|
||||
const str = flags[i].toString(2);
|
||||
|
||||
// read from lowest bit to highest
|
||||
|
||||
Reference in New Issue
Block a user