Skip to content

Commit

Permalink
chore(3210): replace any with proper types for delete and set
Browse files Browse the repository at this point in the history
  • Loading branch information
DDDDDanica committed Sep 19, 2024
1 parent 4760a4b commit b582c30
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions app/scripts/lib/AddressBookPetnamesBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export class AddressBookPetnamesBridge extends AbstractPetnamesBridge<
const chainEntries = state.addressBook[chainId as Hex];

for (const address of Object.keys(chainEntries)) {

const entry = state.addressBook[chainId as Hex][address];
const normalizedChainId = chainId.toLowerCase();
const { name, isEns } = entry;
Expand All @@ -82,18 +81,15 @@ export class AddressBookPetnamesBridge extends AbstractPetnamesBridge<
*/
protected updateSourceEntry(type: ChangeType, entry: PetnameEntry): void {
if (type === ChangeType.DELETED) {
// TODO: Replace `any` with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.#addressBookController.delete(entry.variation as any, entry.value);
this.#addressBookController.delete(
entry.variation as Hex,
entry.value as string,
);
} else {
this.#addressBookController.set(
entry.value,
// TODO: Replace `any` with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
entry.name as any,
// TODO: Replace `any` with type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
entry.variation as any,
entry.value as string,
entry.name as string,
entry.variation as Hex | undefined,
);
}
}
Expand Down

0 comments on commit b582c30

Please sign in to comment.