Skip to content

Commit

Permalink
type all the things
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Sep 8, 2023
1 parent d60e45d commit 76a0057
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion .eslintrc
Expand Up @@ -16,7 +16,6 @@
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/typedef": [
"warn",
Expand Down
9 changes: 7 additions & 2 deletions src/interface/token/soul-name.ts
@@ -1,7 +1,8 @@
import type { BigNumber } from "ethers";
import type { BigNumber, ContractTransaction } from "ethers";

import { SoulNameErrorCodes } from "../../collections";
import type { BaseResult } from "../base-result";
import { PaymentMethod } from "../tokens";

export interface Attribute {
display_type?: string;
Expand Down Expand Up @@ -47,7 +48,11 @@ export interface SoulNameResultBase extends BaseResult {

export interface CreateSoulNameResult extends SoulNameResultBase {
soulName?: string;
metadata?: any;
// todo, remove this. It does not belong here
metadata?: ContractTransaction & {
price?: BigNumber;
paymentMethod: PaymentMethod;
};
}

export interface SoulNameMetadataStoreResult extends SoulNameResultBase {
Expand Down
6 changes: 3 additions & 3 deletions src/modules/soul-linker/verify-link.ts
Expand Up @@ -97,13 +97,13 @@ export const verifyLink = async (
result.success = true;
break;
}
} catch (error: any) {
switch (error.errorName) {
} catch (error: unknown) {
switch ((error as { errorName: string }).errorName) {
case "ValidPeriodExpired":
result.message = "Link expired!";
break;
default:
console.error(error.errorName);
console.error((error as { errorName: string }).errorName);
}
}
}
Expand Down

0 comments on commit 76a0057

Please sign in to comment.