From c722403c4643fcd8ab09b30307f6b4f2e4f023e4 Mon Sep 17 00:00:00 2001 From: mgpai <64056966+mgpai22@users.noreply.github.com> Date: Mon, 6 May 2024 18:16:55 -0400 Subject: [PATCH] refactor --- src/wallet/utils.ts | 4 +--- src/wallet/wallet.ts | 8 ++------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/wallet/utils.ts b/src/wallet/utils.ts index 10a0593..0ef77a2 100644 --- a/src/wallet/utils.ts +++ b/src/wallet/utils.ts @@ -5,9 +5,7 @@ export const meshUtxoToTransUtxo = (utxo: UTxO): TransUtxo => { return { txHash: utxo.input.txHash, outputIndex: utxo.input.outputIndex, - assets: utxo.output.amount.reduce((acc, curr) => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error + assets: utxo.output.amount.reduce((acc: { [key: string]: bigint }, curr) => { acc[curr.unit] = BigInt(curr.quantity); return acc; }, {}), diff --git a/src/wallet/wallet.ts b/src/wallet/wallet.ts index 46b39f8..451096f 100644 --- a/src/wallet/wallet.ts +++ b/src/wallet/wallet.ts @@ -126,9 +126,7 @@ export function discoverOwnUsedTxKeyHashes( const keyHash = toHex(owners.get(i).to_bytes()); usedKeyHashes.push(keyHash); } - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error - const operator = poolParams.operator().to_hex(); + const operator = poolParams!.operator().to_hex(); usedKeyHashes.push(operator); } else if (cert.kind() === 4) { const operator = cert.as_pool_retirement()!.pool_keyhash().to_hex(); @@ -217,7 +215,5 @@ export function discoverOwnUsedTxKeyHashes( } } - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error - return usedKeyHashes.filter((k) => ownKeyHashes.includes(k)); + return usedKeyHashes.filter((k) => ownKeyHashes.includes(k as string)) as string[]; }