Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1894 from LiskHQ/1892-update-lisk-sdk-to-v6-0-0-rc-4
Browse files Browse the repository at this point in the history
Update Lisk SDK to v6.0.0-rc.4
  • Loading branch information
sameersubudhi authored Oct 23, 2023
2 parents afceb5f + b28c0bb commit 3463ca5
Show file tree
Hide file tree
Showing 94 changed files with 1,391 additions and 1,615 deletions.
5 changes: 3 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
],
"globals": {
"ipc": true,
"BigInt": true,
"PRODUCTION": true,
"TEST": true,
"BigInt": true
"TEST": true
},
"env": {
"node": true,
Expand Down Expand Up @@ -43,6 +43,7 @@
]
}
],
"no-await-in-loop": "off",
"no-loop-func": "off",
"no-plusplus": "off",
"no-restricted-properties": "off",
Expand Down
1 change: 1 addition & 0 deletions framework/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"newIsCap": false,
"capIsNew": false
}],
"no-await-in-loop": "off",
"no-loop-func": "off",
"no-plusplus": "off",
"no-restricted-properties": "off",
Expand Down
2 changes: 0 additions & 2 deletions framework/src/database/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ const loadSchema = async (knex, tableName, tableConfig) => {
const indexColumns = directions.map(dir => `\`${dir.key}\` ${dir.direction}`).join(', ');

const sqlStatement = `ALTER TABLE ${tableName} ADD INDEX ${indexName} (${indexColumns})`;

// eslint-disable-next-line no-await-in-loop
await knex.raw(sqlStatement);
}

Expand Down
1 change: 0 additions & 1 deletion framework/src/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ const getDirectories = async (directoryPath, options = { withFileTypes: true })
const subDirectories = dirs.filter(subDir => subDir.isDirectory());
for (let i = 0; i < subDirectories.length; i++) {
const fullSubDirPath = path.join(directoryPath, subDirectories[i].name);
// eslint-disable-next-line no-await-in-loop
const stat = await stats(fullSubDirPath);
subDirsWithTime.push({ name: fullSubDirPath, time: stat.ctime.getTime() });
}
Expand Down
2 changes: 0 additions & 2 deletions framework/src/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const performRequestUntilSuccess = async (url, params) => {
let response;

do {
/* eslint-disable no-await-in-loop */
response = await performRequest(url, params);
const firstErrorCoreDigit = response.status.toString()[0];
if (firstErrorCoreDigit === '1') return response;
Expand All @@ -68,7 +67,6 @@ const performRequestUntilSuccess = async (url, params) => {

--retries;
await delay(params.retryDelay || 100);
/* eslint-enable no-await-in-loop */
} while (retries > 0);

return response;
Expand Down
94 changes: 48 additions & 46 deletions framework/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ bytes@3.1.2:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==

call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4:
call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513"
integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==
Expand Down Expand Up @@ -1041,9 +1041,9 @@ camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==

caniuse-lite@^1.0.30001541:
version "1.0.30001551"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001551.tgz#1f2cfa8820bd97c971a57349d7fd8f6e08664a3e"
integrity sha512-vtBAez47BoGMMzlbYhfXrMV1kvRF2WP/lqiMuDu1Sb4EE4LKEgjopFDSRtZfdVnslNRpOqV/woE+Xgrwj6VQlg==
version "1.0.30001553"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001553.tgz#e64e7dc8fd4885cd246bb476471420beb5e474b5"
integrity sha512-N0ttd6TrFfuqKNi+pMgWJTb9qrdJu4JSpgPFLe/lrD19ugC6fZgF0pUewRowDwzdDnb9V41mFcdlYgl/PyKf4A==

chalk@2.4.2, chalk@^2.4.1, chalk@^2.4.2:
version "2.4.2"
Expand Down Expand Up @@ -1362,9 +1362,9 @@ ee-first@1.1.1:
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==

electron-to-chromium@^1.4.535:
version "1.4.561"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.561.tgz#816f31d9ae01fe58abbf469fca7e125b16befd85"
integrity sha512-eS5t4ulWOBfVHdq9SW2dxEaFarj1lPjvJ8PaYMOjY0DecBaj/t4ARziL2IPpDr4atyWwjLFGQ2vo/VCgQFezVQ==
version "1.4.563"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.563.tgz#dabb424202754c1fed2d2938ff564b23d3bbf0d3"
integrity sha512-dg5gj5qOgfZNkPNeyKBZQAQitIQ/xwfIDmEQJHCbXaD9ebTZxwJXUsDYcBlAvZGZLi+/354l35J1wkmP6CqYaw==

emittery@^0.8.1:
version "0.8.1"
Expand Down Expand Up @@ -1428,25 +1428,25 @@ error-ex@^1.3.1:
is-arrayish "^0.2.1"

es-abstract@^1.22.1:
version "1.22.2"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.2.tgz#90f7282d91d0ad577f505e423e52d4c1d93c1b8a"
integrity sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==
version "1.22.3"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.3.tgz#48e79f5573198de6dee3589195727f4f74bc4f32"
integrity sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==
dependencies:
array-buffer-byte-length "^1.0.0"
arraybuffer.prototype.slice "^1.0.2"
available-typed-arrays "^1.0.5"
call-bind "^1.0.2"
call-bind "^1.0.5"
es-set-tostringtag "^2.0.1"
es-to-primitive "^1.2.1"
function.prototype.name "^1.1.6"
get-intrinsic "^1.2.1"
get-intrinsic "^1.2.2"
get-symbol-description "^1.0.0"
globalthis "^1.0.3"
gopd "^1.0.1"
has "^1.0.3"
has-property-descriptors "^1.0.0"
has-proto "^1.0.1"
has-symbols "^1.0.3"
hasown "^2.0.0"
internal-slot "^1.0.5"
is-array-buffer "^3.0.2"
is-callable "^1.2.7"
Expand All @@ -1456,7 +1456,7 @@ es-abstract@^1.22.1:
is-string "^1.0.7"
is-typed-array "^1.1.12"
is-weakref "^1.0.2"
object-inspect "^1.12.3"
object-inspect "^1.13.1"
object-keys "^1.1.1"
object.assign "^4.1.4"
regexp.prototype.flags "^1.5.1"
Expand All @@ -1470,21 +1470,21 @@ es-abstract@^1.22.1:
typed-array-byte-offset "^1.0.0"
typed-array-length "^1.0.4"
unbox-primitive "^1.0.2"
which-typed-array "^1.1.11"
which-typed-array "^1.1.13"

es-array-method-boxes-properly@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e"
integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==

es-set-tostringtag@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8"
integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==
version "2.0.2"
resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz#11f7cc9f63376930a5f20be4915834f4bc74f9c9"
integrity sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==
dependencies:
get-intrinsic "^1.1.3"
has "^1.0.3"
get-intrinsic "^1.2.2"
has-tostringtag "^1.0.0"
hasown "^2.0.0"

es-to-primitive@^1.2.1:
version "1.2.1"
Expand Down Expand Up @@ -1700,7 +1700,7 @@ fsevents@^2.3.2:
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

function-bind@^1.1.1, function-bind@^1.1.2:
function-bind@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
Expand Down Expand Up @@ -1737,15 +1737,15 @@ get-caller-file@^2.0.5:
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==

get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82"
integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==
get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b"
integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==
dependencies:
function-bind "^1.1.1"
has "^1.0.3"
function-bind "^1.1.2"
has-proto "^1.0.1"
has-symbols "^1.0.3"
hasown "^2.0.0"

get-package-type@^0.1.0:
version "0.1.0"
Expand Down Expand Up @@ -1832,11 +1832,11 @@ has-flag@^4.0.0:
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==

has-property-descriptors@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861"
integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==
version "1.0.1"
resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340"
integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==
dependencies:
get-intrinsic "^1.1.1"
get-intrinsic "^1.2.2"

has-proto@^1.0.1:
version "1.0.1"
Expand All @@ -1855,10 +1855,12 @@ has-tostringtag@^1.0.0:
dependencies:
has-symbols "^1.0.2"

has@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6"
integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==
hasown@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c"
integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==
dependencies:
function-bind "^1.1.2"

html-encoding-sniffer@^2.0.1:
version "2.0.1"
Expand Down Expand Up @@ -1961,12 +1963,12 @@ ini@~1.3.0:
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==

internal-slot@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986"
integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==
version "1.0.6"
resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.6.tgz#37e756098c4911c5e912b8edbf71ed3aa116f930"
integrity sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==
dependencies:
get-intrinsic "^1.2.0"
has "^1.0.3"
get-intrinsic "^1.2.2"
hasown "^2.0.0"
side-channel "^1.0.4"

interpret@^2.2.0:
Expand Down Expand Up @@ -2046,11 +2048,11 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7:
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==

is-core-module@^2.13.0:
version "2.13.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db"
integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==
version "2.13.1"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384"
integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==
dependencies:
has "^1.0.3"
hasown "^2.0.0"

is-date-object@^1.0.1:
version "1.0.5"
Expand Down Expand Up @@ -3130,7 +3132,7 @@ object-assign@^4:
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==

object-inspect@^1.12.3, object-inspect@^1.9.0:
object-inspect@^1.13.1, object-inspect@^1.9.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2"
integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==
Expand Down Expand Up @@ -4267,7 +4269,7 @@ which-boxed-primitive@^1.0.2:
is-string "^1.0.5"
is-symbol "^1.0.3"

which-typed-array@^1.1.11:
which-typed-array@^1.1.11, which-typed-array@^1.1.13:
version "1.1.13"
resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36"
integrity sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==
Expand Down
2 changes: 0 additions & 2 deletions services/blockchain-app-registry/jobs/deleteNonMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const removeEmptyDirectoriesAndNonMetaFiles = async dirPath => {
const contents = await getFilesAndDirs(dirPath);

for (let i = 0; i < contents.length; i++) {
/* eslint-disable no-await-in-loop */
const filePath = contents[i];
const isDirectory = (await stats(filePath)).isDirectory();

Expand All @@ -51,7 +50,6 @@ const removeEmptyDirectoriesAndNonMetaFiles = async dirPath => {
await rm(filePath);
logger.trace(`Removed file: ${filePath}.`);
}
/* eslint-enable no-await-in-loop */
}
};

Expand Down
5 changes: 2 additions & 3 deletions services/blockchain-app-registry/shared/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ const resolveTokenMetaInfo = async tokenInfoFromDB => {
const processedChainIDs = new Set();
const resultTokenIDsSet = new Set(tokenInfoFromDB.map(tokenInfo => tokenInfo.tokenID));

/* eslint-disable no-restricted-syntax, no-await-in-loop, no-continue */
/* eslint-disable no-restricted-syntax, no-continue */
for (const entry of tokenInfoFromDB) {
const chainID = entry.tokenID.substring(0, LENGTH_CHAIN_ID);

Expand Down Expand Up @@ -406,15 +406,14 @@ const resolveTokenMetaInfo = async tokenInfoFromDB => {
}
}
}
/* eslint-enable no-restricted-syntax, no-await-in-loop */
/* eslint-enable no-restricted-syntax */

return tokensMeta;
};

const getSupportedTokensFromServiceURLs = async serviceURLs => {
for (let i = 0; i < serviceURLs.length; i++) {
const tokenSummaryEndpoint = `${serviceURLs[i].http}/api/v3/token/summary`;
// eslint-disable-next-line no-await-in-loop
const response = await HTTP.request(tokenSummaryEndpoint);

if (response && response.data && response.data.data && response.data.data.supportedTokens) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ const buildEventPayload = async allFilesModified => {
const numSupportedNetworks = supportedNetworks.length;

for (let index = 0; index < numSupportedNetworks; index++) {
/* eslint-disable no-await-in-loop */
const networkType = supportedNetworks[index];
const filesUpdated = await filterMetaConfigFilesByNetwork(networkType, allFilesModified);

Expand All @@ -208,7 +207,6 @@ const buildEventPayload = async allFilesModified => {
);

eventPayload[networkType] = appsUpdated;
/* eslint-enable no-await-in-loop */
}

return eventPayload;
Expand Down Expand Up @@ -320,7 +318,6 @@ const syncWithRemoteRepo = async (_dbTrx = null) => {
// Should process app files sequentially as nativetokens.json is dependant on app.json
// eslint-disable-next-line no-restricted-syntax
for (const modifiedFile of appFiles) {
/* eslint-disable no-await-in-loop */
const remoteFilePath = modifiedFile.filename;
const localFilePath = path.join(appDirPath, remoteFilePath);

Expand Down Expand Up @@ -358,7 +355,6 @@ const syncWithRemoteRepo = async (_dbTrx = null) => {
from: tempFilePath,
to: localFilePath,
});
/* eslint-enable no-await-in-loop */
}
},
{ concurrency: Object.keys(appsInNetwork).length },
Expand Down
Loading

0 comments on commit 3463ca5

Please sign in to comment.