-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the currency types. Add the union of the specific types
- Loading branch information
1 parent
715a6eb
commit 82e8344
Showing
9 changed files
with
33 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export type { EthereumCurrency, ERC20EthereumCurrency } from './currency'; | ||
export type { EthereumCurrency, NativeEthereumCurrency, ERC20EthereumCurrency } from './currency'; | ||
export type { EthereumWeb3AtomexProtocolV1Options, ERC20EthereumWeb3AtomexProtocolV1Options } from './atomexProtocolOptions'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
import type { Currency } from '../../common/index'; | ||
|
||
export interface TezosCurrency extends Currency { | ||
export interface NativeTezosCurrency extends Currency { | ||
readonly name: 'Tezos'; | ||
readonly symbol: 'XTZ'; | ||
readonly blockchain: 'tezos'; | ||
readonly type: 'native'; | ||
readonly decimals: 6; | ||
} | ||
|
||
export interface TezosFA12Currency extends Currency { | ||
export interface FA12TezosCurrency extends Currency { | ||
readonly blockchain: 'tezos'; | ||
readonly type: 'fa1.2'; | ||
readonly contractAddress: string; | ||
} | ||
|
||
export interface TezosFA2Currency extends Currency { | ||
export interface FA2TezosCurrency extends Currency { | ||
readonly blockchain: 'tezos'; | ||
readonly type: 'fa2'; | ||
readonly contractAddress: string; | ||
readonly tokenId: number; | ||
} | ||
|
||
export type TezosCurrency = | ||
| NativeTezosCurrency | ||
| FA12TezosCurrency | ||
| FA2TezosCurrency; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export { TezosAtomexSigningDataType } from './tezosAtomexSigningDataType'; | ||
|
||
export type { SigPrefix } from './sigPrefix'; | ||
export type { TezosCurrency, TezosFA12Currency, TezosFA2Currency } from './currency'; | ||
export type { TezosCurrency, NativeTezosCurrency, FA12TezosCurrency, FA2TezosCurrency } from './currency'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters