Skip to content

Commit

Permalink
feat: add MultiChainToken and ChainToken type
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioJames committed May 23, 2024
1 parent acadab0 commit 01b7d9d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
5 changes: 0 additions & 5 deletions .changeset/bright-pugs-glow.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/brown-eyes-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ant-design/web3-common': patch
---

feat: add MultiChainToken and ChainToken type
6 changes: 0 additions & 6 deletions .changeset/moody-moons-hug.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/yellow-cameras-know.md

This file was deleted.

20 changes: 20 additions & 0 deletions packages/common/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export type BalanceMetadata = {
export interface Chain {
id: ChainIds | number;
name: string;
type?: string;
icon?: React.ReactNode;
browser?: {
icon?: React.ReactNode;
Expand Down Expand Up @@ -258,3 +259,22 @@ export interface Locale {
export interface UniversalEIP6963Config {
autoAddInjectedWallets?: boolean;
}

type TokenBase = {
name: string;
symbol: string;
icon: React.ReactNode;
decimal: number;
};

export type ChainToken = TokenBase & {
contract: string;
chain: Chain;
};

export type MultiChainToken = TokenBase & {
channels: {
chain: Chain;
contract: string;
}[];
};

0 comments on commit 01b7d9d

Please sign in to comment.