diff --git a/eslint.config.mjs b/eslint.config.mjs index 7fc2542..2085ac4 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -18,14 +18,15 @@ export default tseslint.config( }, rules: { '@typescript-eslint/no-namespace': 'off', - '@typescript-eslint/unbound-method': 'off', + '@typescript-eslint/unbound-method': [ + "error", + { + "ignoreStatic": true + } + ], '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/require-await': 'off', } }, { diff --git a/package-lock.json b/package-lock.json index 67f9cc7..c321d15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,6 @@ }, "devDependencies": { "@eslint/js": "^9.5.0", - "@initia/builder.js": "^0.1.6", "@types/bn.js": "^5.1.1", "@types/eslint": "^8.56.10", "@types/eslint__js": "^8.42.3", @@ -886,20 +885,6 @@ "google-protobuf": "^3.14.0" } }, - "node_modules/@initia/builder.js": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@initia/builder.js/-/builder.js-0.1.6.tgz", - "integrity": "sha512-R9akwSaIQMkLdKS4n6PoM6QMvywdqe1qQYWT1igFJhlmDJGWk8vryLhhsEL3VwkpGzFM6qDd2Ps5/BqgyXLXqA==", - "dev": true, - "dependencies": { - "ffi-napi": "^4.0.3", - "ref-napi": "^3.0.3", - "ref-struct-di": "^1.1.1" - }, - "engines": { - "node": ">=14" - } - }, "node_modules/@initia/initia.proto": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@initia/initia.proto/-/initia.proto-0.2.1.tgz", @@ -4334,30 +4319,6 @@ "bser": "2.1.1" } }, - "node_modules/ffi-napi": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/ffi-napi/-/ffi-napi-4.0.3.tgz", - "integrity": "sha512-PMdLCIvDY9mS32RxZ0XGb95sonPRal8aqRhLbeEtWKZTe2A87qRFG9HjOhvG8EX2UmQw5XNRMIOT+1MYlWmdeg==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "debug": "^4.1.1", - "get-uv-event-loop-napi-h": "^1.0.5", - "node-addon-api": "^3.0.0", - "node-gyp-build": "^4.2.1", - "ref-napi": "^2.0.1 || ^3.0.2", - "ref-struct-di": "^1.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ffi-napi/node_modules/node-addon-api": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", - "dev": true - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -4596,21 +4557,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-symbol-from-current-process-h": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-from-current-process-h/-/get-symbol-from-current-process-h-1.0.2.tgz", - "integrity": "sha512-syloC6fsCt62ELLrr1VKBM1ggOpMdetX9hTrdW77UQdcApPHLmf7CI7OKcN1c9kYuNxKcDe4iJ4FY9sX3aw2xw==", - "dev": true - }, - "node_modules/get-uv-event-loop-napi-h": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/get-uv-event-loop-napi-h/-/get-uv-event-loop-napi-h-1.0.6.tgz", - "integrity": "sha512-t5c9VNR84nRoF+eLiz6wFrEp1SE2Acg0wS+Ysa2zF0eROes+LzOfuTaVHxGy8AbS8rq7FHEJzjnCZo1BupwdJg==", - "dev": true, - "dependencies": { - "get-symbol-from-current-process-h": "^1.0.1" - } - }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -7359,46 +7305,6 @@ "node": ">= 0.10" } }, - "node_modules/ref-napi": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/ref-napi/-/ref-napi-3.0.3.tgz", - "integrity": "sha512-LiMq/XDGcgodTYOMppikEtJelWsKQERbLQsYm0IOOnzhwE9xYZC7x8txNnFC9wJNOkPferQI4vD4ZkC0mDyrOA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "debug": "^4.1.1", - "get-symbol-from-current-process-h": "^1.0.2", - "node-addon-api": "^3.0.0", - "node-gyp-build": "^4.2.1" - }, - "engines": { - "node": ">= 10.0" - } - }, - "node_modules/ref-napi/node_modules/node-addon-api": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", - "dev": true - }, - "node_modules/ref-struct-di": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ref-struct-di/-/ref-struct-di-1.1.1.tgz", - "integrity": "sha512-2Xyn/0Qgz89VT+++WP0sTosdm9oeowLP23wRJYhG4BFdMUrLj3jhwHZNEytYNYgtPKLNTP3KJX4HEgBvM1/Y2g==", - "dev": true, - "dependencies": { - "debug": "^3.1.0" - } - }, - "node_modules/ref-struct-di/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", diff --git a/package.json b/package.json index 18d0aff..c89656b 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ }, "devDependencies": { "@eslint/js": "^9.5.0", - "@initia/builder.js": "^0.1.6", "@types/bn.js": "^5.1.1", "@types/eslint": "^8.56.10", "@types/eslint__js": "^8.42.3", diff --git a/src/client/WebSocketClient.ts b/src/client/WebSocketClient.ts index 34e2400..a1c4b5c 100644 --- a/src/client/WebSocketClient.ts +++ b/src/client/WebSocketClient.ts @@ -202,11 +202,11 @@ export class WebSocketClient extends EventEmitter { if ( this.callback && - parsedData.result && - parsedData.result.query === this.queryParams + parsedData.result && // eslint-disable-line @typescript-eslint/no-unsafe-member-access + parsedData.result.query === this.queryParams // eslint-disable-line @typescript-eslint/no-unsafe-member-access ) { // this.emit('message', parsedData.result.data); - this.callback(parsedData.result.data) + this.callback(parsedData.result.data) // eslint-disable-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access } } catch (err) { this.emit('error', err) @@ -248,7 +248,7 @@ export class WebSocketClient extends EventEmitter { public subscribeTx(query: TendermintQuery, callback: Callback): void { const newCallback: Callback = (d) => { - d.value.TxResult.txhash = hashToHex(d.value.TxResult.tx) + d.value.TxResult.txhash = hashToHex(d.value.TxResult.tx as string) // eslint-disable-line @typescript-eslint/no-unsafe-member-access return callback(d) } diff --git a/src/client/lcd/api/TxAPI.ts b/src/client/lcd/api/TxAPI.ts index 50bfcc1..d3f2e51 100644 --- a/src/client/lcd/api/TxAPI.ts +++ b/src/client/lcd/api/TxAPI.ts @@ -479,11 +479,11 @@ export class TxAPI extends BaseAPI { } if (d.code) { - blockResult.code = d.code + blockResult.code = d.code // eslint-disable-line @typescript-eslint/no-unsafe-member-access } if (d.codespace) { - blockResult.codespace = d.codespace + blockResult.codespace = d.codespace // eslint-disable-line @typescript-eslint/no-unsafe-member-access } return blockResult diff --git a/src/core/authz/msgs/MsgExecAuthorized.ts b/src/core/authz/msgs/MsgExecAuthorized.ts index efe9bed..e29561b 100644 --- a/src/core/authz/msgs/MsgExecAuthorized.ts +++ b/src/core/authz/msgs/MsgExecAuthorized.ts @@ -36,7 +36,7 @@ export class MsgExecAuthorized extends JSONSerializable< type: 'cosmos-sdk/MsgExec', value: { grantee, - msgs: msgs.map((msg) => { + msgs: msgs.map((msg): Msg.Amino => { return msg.toAmino() }), }, diff --git a/src/core/gov/msgs/MsgSubmitProposal.ts b/src/core/gov/msgs/MsgSubmitProposal.ts index b3b5c25..478adfc 100644 --- a/src/core/gov/msgs/MsgSubmitProposal.ts +++ b/src/core/gov/msgs/MsgSubmitProposal.ts @@ -72,7 +72,7 @@ export class MsgSubmitProposal extends JSONSerializable< return { type: 'cosmos-sdk/v1/MsgSubmitProposal', value: { - messages: messages.map((msg) => msg.toAmino()), + messages: messages.map((msg): Msg.Amino => msg.toAmino()), initial_deposit: initial_deposit.toAmino(), proposer, metadata: metadata && metadata !== '' ? metadata : undefined, diff --git a/src/core/gov/msgs/MsgSubmitProposalLegacy.ts b/src/core/gov/msgs/MsgSubmitProposalLegacy.ts index bdeb78f..488c63a 100644 --- a/src/core/gov/msgs/MsgSubmitProposalLegacy.ts +++ b/src/core/gov/msgs/MsgSubmitProposalLegacy.ts @@ -21,7 +21,7 @@ export class MsgSubmitProposalLegacy extends JSONSerializable< * @param proposer proposer's account address */ constructor( - public content: Content, + public content: Content | undefined, initial_deposit: Coins.Input, public proposer: AccAddress ) { @@ -36,7 +36,7 @@ export class MsgSubmitProposalLegacy extends JSONSerializable< value: { content, initial_deposit, proposer }, } = data return new MsgSubmitProposalLegacy( - Content.fromAmino(content), + content ? Content.fromAmino(content) : undefined, Coins.fromAmino(initial_deposit), proposer ) @@ -47,7 +47,7 @@ export class MsgSubmitProposalLegacy extends JSONSerializable< return { type: 'cosmos-sdk/MsgSubmitProposal', value: { - content: content.toAmino(), + content: content?.toAmino(), initial_deposit: initial_deposit.toAmino(), proposer, }, @@ -59,7 +59,7 @@ export class MsgSubmitProposalLegacy extends JSONSerializable< ): MsgSubmitProposalLegacy { const { content, initial_deposit, proposer } = data return new MsgSubmitProposalLegacy( - Content.fromData(content), + content ? Content.fromData(content) : undefined, Coins.fromData(initial_deposit), proposer ) @@ -69,7 +69,7 @@ export class MsgSubmitProposalLegacy extends JSONSerializable< const { content, initial_deposit, proposer } = this return { '@type': '/cosmos.gov.v1beta1.MsgSubmitProposal', - content: content.toData(), + content: content?.toData(), initial_deposit: initial_deposit.toData(), proposer, } @@ -79,7 +79,7 @@ export class MsgSubmitProposalLegacy extends JSONSerializable< proto: MsgSubmitProposalLegacy.Proto ): MsgSubmitProposalLegacy { return new MsgSubmitProposalLegacy( - Content.fromProto(proto.content as any), + proto.content ? Content.fromProto(proto.content) : undefined, Coins.fromProto(proto.initialDeposit), proto.proposer ) @@ -88,7 +88,7 @@ export class MsgSubmitProposalLegacy extends JSONSerializable< public toProto(): MsgSubmitProposalLegacy.Proto { const { content, initial_deposit, proposer } = this return MsgSubmitProposal_pb.fromPartial({ - content: content.packAny(), + content: content?.packAny(), initialDeposit: initial_deposit.toProto(), proposer, }) @@ -112,7 +112,7 @@ export namespace MsgSubmitProposalLegacy { export interface Amino { type: 'cosmos-sdk/MsgSubmitProposal' value: { - content: Content.Amino + content: Content.Amino | undefined initial_deposit: Coins.Amino proposer: AccAddress } @@ -120,7 +120,7 @@ export namespace MsgSubmitProposalLegacy { export interface Data { '@type': '/cosmos.gov.v1beta1.MsgSubmitProposal' - content: Content.Data + content: Content.Data | undefined initial_deposit: Coins.Data proposer: AccAddress } diff --git a/src/core/gov/proposals/Proposal.ts b/src/core/gov/proposals/Proposal.ts index db20976..a8dd2bc 100644 --- a/src/core/gov/proposals/Proposal.ts +++ b/src/core/gov/proposals/Proposal.ts @@ -142,7 +142,7 @@ export class Proposal extends JSONSerializable< return { id: id.toString(), - messages: messages.map((msg) => msg.toAmino()), + messages: messages.map((msg): Msg.Amino => msg.toAmino()), status: proposalStatusToJSON(status), final_tally_result: { yes_count: num(final_tally_result.yes_count).toFixed(), diff --git a/src/core/group/GroupProposal.ts b/src/core/group/GroupProposal.ts index c9eb3eb..85fc5fc 100644 --- a/src/core/group/GroupProposal.ts +++ b/src/core/group/GroupProposal.ts @@ -139,7 +139,7 @@ export class GroupProposal extends JSONSerializable< }, voting_period_end: voting_period_end.toISOString(), executor_result: proposalExecutorResultToJSON(executor_result), - messages: messages.map((msg) => msg.toAmino()), + messages: messages.map((msg): Msg.Amino => msg.toAmino()), title, summary, } diff --git a/src/core/group/msgs/MsgSubmitGroupProposal.ts b/src/core/group/msgs/MsgSubmitGroupProposal.ts index e4fd3e8..a482062 100644 --- a/src/core/group/msgs/MsgSubmitGroupProposal.ts +++ b/src/core/group/msgs/MsgSubmitGroupProposal.ts @@ -78,7 +78,7 @@ export class MsgSubmitGroupProposal extends JSONSerializable< group_policy_address, proposers, metadata, - messages: messages.map((msg) => msg.toAmino()), + messages: messages.map((msg): Msg.Amino => msg.toAmino()), exec: execToJSON(exec), title, summary, diff --git a/src/core/ibc/core/connection/msgs/MsgConnectionOpenTry.ts b/src/core/ibc/core/connection/msgs/MsgConnectionOpenTry.ts index 2e2898d..fd6f3f4 100644 --- a/src/core/ibc/core/connection/msgs/MsgConnectionOpenTry.ts +++ b/src/core/ibc/core/connection/msgs/MsgConnectionOpenTry.ts @@ -30,7 +30,7 @@ export class MsgConnectionOpenTry extends JSONSerializable< */ constructor( public client_id: string, - public client_state: any, + public client_state: Any | undefined, public counterparty: ConnectionCounterparty | undefined, public delay_period: number, public counterparty_versions: IbcVersion[], @@ -152,7 +152,7 @@ export class MsgConnectionOpenTry extends JSONSerializable< } = this return MsgConnectionOpenTry_pb.fromPartial({ clientId: client_id, - clientState: client_state.toProto(), + clientState: client_state, counterparty: counterparty?.toProto(), delayPeriod: Long.fromNumber(delay_period), counterpartyVersions: counterparty_versions.map((cv) => cv.toProto()), @@ -183,7 +183,7 @@ export namespace MsgConnectionOpenTry { export interface Data { '@type': '/ibc.core.connection.v1.MsgConnectionOpenTry' client_id: string - client_state: Any + client_state?: Any counterparty?: ConnectionCounterparty.Data delay_period: string counterparty_versions: IbcVersion.Data[] diff --git a/src/core/intertx/msgs/MsgSubmitTx.ts b/src/core/intertx/msgs/MsgSubmitTx.ts index adb4015..6249174 100644 --- a/src/core/intertx/msgs/MsgSubmitTx.ts +++ b/src/core/intertx/msgs/MsgSubmitTx.ts @@ -17,7 +17,7 @@ export class MsgSubmitTx extends JSONSerializable< constructor( public owner: AccAddress, public connection_id: string, - public msg: Msg + public msg?: Msg ) { super() } @@ -27,7 +27,11 @@ export class MsgSubmitTx extends JSONSerializable< value: { owner, connection_id, msg }, } = data - return new MsgSubmitTx(owner, connection_id, Msg.fromAmino(msg)) + return new MsgSubmitTx( + owner, + connection_id, + msg ? Msg.fromAmino(msg) : undefined + ) } public toAmino(): MsgSubmitTx.Amino { @@ -37,14 +41,18 @@ export class MsgSubmitTx extends JSONSerializable< value: { owner, connection_id, - msg: msg.toAmino(), + msg: msg?.toAmino(), }, } } public static fromData(data: MsgSubmitTx.Data): MsgSubmitTx { const { owner, connection_id, msg } = data - return new MsgSubmitTx(owner, connection_id, Msg.fromData(msg)) + return new MsgSubmitTx( + owner, + connection_id, + msg ? Msg.fromData(msg) : undefined + ) } public toData(): MsgSubmitTx.Data { @@ -53,7 +61,7 @@ export class MsgSubmitTx extends JSONSerializable< '@type': '/initia.intertx.v1.MsgSubmitTx', owner, connection_id, - msg: msg.toData(), + msg: msg?.toData(), } } @@ -61,7 +69,7 @@ export class MsgSubmitTx extends JSONSerializable< return new MsgSubmitTx( proto.owner, proto.connectionId, - Msg.fromProto(proto.msg as any) + proto.msg ? Msg.fromProto(proto.msg) : undefined ) } @@ -70,7 +78,7 @@ export class MsgSubmitTx extends JSONSerializable< return MsgSubmitTx_pb.fromPartial({ owner, connectionId: connection_id, - msg: msg.packAny(), + msg: msg?.packAny(), }) } @@ -92,7 +100,7 @@ export namespace MsgSubmitTx { value: { owner: AccAddress connection_id: string - msg: Msg.Amino + msg?: Msg.Amino } } @@ -100,7 +108,7 @@ export namespace MsgSubmitTx { '@type': '/initia.intertx.v1.MsgSubmitTx' owner: AccAddress connection_id: string - msg: Msg.Data + msg?: Msg.Data } export type Proto = MsgSubmitTx_pb diff --git a/src/core/opchild/msgs/MsgExecuteMessages.ts b/src/core/opchild/msgs/MsgExecuteMessages.ts index 8a1af07..8256abc 100644 --- a/src/core/opchild/msgs/MsgExecuteMessages.ts +++ b/src/core/opchild/msgs/MsgExecuteMessages.ts @@ -33,7 +33,7 @@ export class MsgExecuteMessages extends JSONSerializable< type: 'opchild/MsgExecuteMessages', value: { sender, - messages: messages.map((msg) => msg.toAmino()), + messages: messages.map((msg): Msg.Amino => msg.toAmino()), }, } } diff --git a/src/core/tx/SignDoc.ts b/src/core/tx/SignDoc.ts index 0c7eae4..2c1a612 100644 --- a/src/core/tx/SignDoc.ts +++ b/src/core/tx/SignDoc.ts @@ -55,7 +55,7 @@ export class SignDoc extends JSONSerializable< ? timeout_height.toString() : undefined, fee: fee.toAmino(), - msgs: messages.map((m) => m.toAmino()), + msgs: messages.map((m): Msg.Amino => m.toAmino()), memo: memo ?? '', } } diff --git a/src/key/RawKey.ts b/src/key/RawKey.ts index 4ddff2d..5b57a7a 100644 --- a/src/key/RawKey.ts +++ b/src/key/RawKey.ts @@ -28,6 +28,7 @@ export class RawKey extends Key { return new RawKey(Buffer.from(hex, 'hex')) } + // eslint-disable-next-line @typescript-eslint/require-await public async sign(payload: Buffer): Promise { const hash = Buffer.from( SHA256.hash(new Word32Array(payload)).toString(), @@ -42,6 +43,7 @@ export class RawKey extends Key { return Buffer.from(signature) } + // eslint-disable-next-line @typescript-eslint/require-await public async signWithKeccak256(payload: Buffer): Promise { const hash = keccak256(payload) diff --git a/src/key/ledger/LedgerKey.ts b/src/key/ledger/LedgerKey.ts index 84833ca..7a48cc3 100644 --- a/src/key/ledger/LedgerKey.ts +++ b/src/key/ledger/LedgerKey.ts @@ -123,6 +123,7 @@ export class LedgerKey extends Key { return this } + // eslint-disable-next-line @typescript-eslint/require-await public async sign(message: Buffer): Promise { if (!this.publicKey) { await this.loadAccountDetails() @@ -130,14 +131,15 @@ export class LedgerKey extends Key { const res = await this.app.sign(this.path, message) checkLedgerErrors(res) - return Buffer.from(signatureImport(Buffer.from(res.signature as any))) + return Buffer.from(signatureImport(Buffer.from(res.signature as any))) // eslint-disable-line @typescript-eslint/no-unsafe-argument } + // eslint-disable-next-line @typescript-eslint/require-await public async signWithKeccak256(): Promise { throw new Error('LedgerKey does not support signWithKeccak256()') } - // eslint-disable-next-line @typescript-eslint/no-unused-vars + // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await public async createSignature(_tx: SignDoc): Promise { throw new Error('direct sign mode is not supported') } diff --git a/src/key/ledger/device.ts b/src/key/ledger/device.ts index edb9a87..58c5cac 100644 --- a/src/key/ledger/device.ts +++ b/src/key/ledger/device.ts @@ -38,8 +38,8 @@ function processErrorResponse(response: any) { if (isDict(response)) { if (Object.prototype.hasOwnProperty.call(response, 'statusCode')) { return { - return_code: response.statusCode, - error_message: errorCodeToString(response.statusCode), + return_code: response.statusCode, // eslint-disable-line @typescript-eslint/no-unsafe-member-access + error_message: errorCodeToString(response.statusCode as number), // eslint-disable-line @typescript-eslint/no-unsafe-member-access } } @@ -53,13 +53,13 @@ function processErrorResponse(response: any) { return { return_code: 0xffff, - error_message: response.toString(), + error_message: response.toString(), // eslint-disable-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access } } return { return_code: 0xffff, - error_message: response.toString(), + error_message: response.toString(), // eslint-disable-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access } } diff --git a/src/util/json.ts b/src/util/json.ts index c402293..db487d6 100644 --- a/src/util/json.ts +++ b/src/util/json.ts @@ -10,11 +10,12 @@ export function prepareSignBytes(obj: any): any { const sorted: any = {} + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument Object.keys(obj) .sort() .forEach((key) => { - if (obj[key] === undefined || obj[key] === null) return - sorted[key] = prepareSignBytes(obj[key]) + if (obj[key] === undefined || obj[key] === null) return // eslint-disable-line @typescript-eslint/no-unsafe-member-access + sorted[key] = prepareSignBytes(obj[key]) // eslint-disable-line @typescript-eslint/no-unsafe-member-access }) return sorted } @@ -33,7 +34,8 @@ export abstract class JSONSerializable { export function removeNull(obj: any): any { if (obj !== null && typeof obj === 'object') { - return Object.entries(obj) + // eslint-disable-line @typescript-eslint/no-unsafe-argument + return Object.entries(obj) // eslint-disable-line @typescript-eslint/no-unsafe-argument .filter(([, v]) => v != null) .reduce( (acc, [k, v]) => ({