Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mgpai22 committed May 6, 2024
1 parent f6f58eb commit c722403
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/wallet/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}, {}),
Expand Down
8 changes: 2 additions & 6 deletions src/wallet/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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[];
}

0 comments on commit c722403

Please sign in to comment.