Skip to content

Commit

Permalink
remaining the types and rearranging the order
Browse files Browse the repository at this point in the history
  • Loading branch information
NiranjanaBinoy committed Mar 27, 2024
1 parent 777efe9 commit 47ae366
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions app/scripts/lib/rpc-method-middleware/handlers/handlers-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
} from '@metamask/permission-controller';
import type { Json } from '@metamask/utils';

export type HandlerWrapperType = {
export type HandlerWrapper = {
methodNames: [string];
hookNames: Record<string, boolean>;
};
Expand All @@ -30,10 +30,16 @@ export type SubjectMetadataToAdd = PermissionSubjectMetadata & {
iconUrl?: string | null;
} & Record<string, Json>;

export type GetAccountsType = () => Promise<string[]>;
export type GetProviderStateType = (
export type AddSubjectMetadata = (metadata: SubjectMetadataToAdd) => void;
export type GetAccounts = () => Promise<string[]>;
export type GetProviderState = (
origin: string,
) => Promise<ProviderStateHandlerResult>;
export type GetWeb3ShimUsageStateType = (origin: string) => undefined | 1 | 2;
export type SetWeb3ShimUsageRecordedType = (origin: string) => void;
export type AddSubjectMetadata = (metadata: SubjectMetadataToAdd) => void;
export type GetWeb3ShimUsageState = (origin: string) => undefined | 1 | 2;
export type HandleWatchAssetRequest = ({
asset,
type,
origin,
networkClientId,
}: Record<string, string>) => Promise<void>;
export type SetWeb3ShimUsageRecorded = (origin: string) => void;

0 comments on commit 47ae366

Please sign in to comment.