Skip to content

Commit

Permalink
added originalTokenId to UnattestedTokenId type
Browse files Browse the repository at this point in the history
  • Loading branch information
kev1n-peters committed Jan 22, 2025
1 parent 1e6e315 commit d2b488d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/definitions/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ export function isTokenId<C extends Chain>(thing: any): thing is TokenId<C> {
export type UnattestedTokenId<C extends Chain = Chain> = TokenId<C> & {
isUnattested: true;
decimals: number; // expected decimals for the token
originalTokenId: TokenId;
};
export function isUnattestedTokenId<C extends Chain>(thing: any): thing is UnattestedTokenId<C> {
return (
isTokenId(thing) &&
(<UnattestedTokenId<C>>thing).isUnattested === true &&
(<UnattestedTokenId<C>>thing).decimals !== undefined
(<UnattestedTokenId<C>>thing).decimals !== undefined &&
(<UnattestedTokenId<C>>thing).originalTokenId !== undefined
);
}

Expand Down

0 comments on commit d2b488d

Please sign in to comment.