-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e70385c
commit 2054f81
Showing
5 changed files
with
79 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
import { atom } from "jotai"; | ||
import type { Network, Token } from "@/types/teleport"; | ||
import { atom } from 'jotai' | ||
import type { Network, Token } from '@/types/teleport' | ||
import type { DepositAction } from '@/types/utila' | ||
|
||
export const sourceNetworkAtom = atom<Network | undefined>(undefined); | ||
export const timeToExpireAtom = atom<number>(0); | ||
export const sourceAssetAtom = atom<Token | undefined>(undefined); | ||
export const destinationNetworkAtom = atom<Network | undefined>(undefined); | ||
export const destinationAssetAtom = atom<Token | undefined>(undefined); | ||
export const destinationAddressAtom = atom<string>(""); | ||
export const sourceAmountAtom = atom<string>(""); | ||
export const ethPriceAtom = atom<number>(0); | ||
export const swapStatusAtom = atom<string>(""); | ||
export const swapIdAtom = atom<string>(""); | ||
export const userTransferTransactionAtom = atom<string>(""); | ||
export const bridgeMintTransactionAtom = atom<string>(""); | ||
export const mpcSignatureAtom = atom<string>(""); | ||
export const useTelepoterAtom = atom<boolean>(true); | ||
export const sourceNetworkAtom = atom<Network | undefined>(undefined) | ||
export const timeToExpireAtom = atom<number>(0) | ||
export const sourceAssetAtom = atom<Token | undefined>(undefined) | ||
export const destinationNetworkAtom = atom<Network | undefined>(undefined) | ||
export const destinationAssetAtom = atom<Token | undefined>(undefined) | ||
export const destinationAddressAtom = atom<string>('') | ||
export const sourceAmountAtom = atom<string>('') | ||
export const ethPriceAtom = atom<number>(0) | ||
export const swapStatusAtom = atom<string>('') | ||
export const swapIdAtom = atom<string>('') | ||
export const userTransferTransactionAtom = atom<string>('') | ||
export const bridgeMintTransactionAtom = atom<string>('') | ||
export const mpcSignatureAtom = atom<string>('') | ||
export const useTelepoterAtom = atom<boolean>(true) | ||
export const depositActionsAtom = atom<DepositAction[]>([]) | ||
|
||
export const depositAddressAtom = atom<undefined|string>(undefined); | ||
export const depositAddressAtom = atom<undefined|string>(undefined) |
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,41 +1,55 @@ | ||
export type Desposit = { | ||
address: string, | ||
address: string | ||
memo?: string | ||
} | ||
|
||
export type Network = { | ||
display_name: string, | ||
internal_name: string, | ||
native_currency: string, | ||
logo: string, | ||
is_testnet: boolean, | ||
is_featured: boolean, | ||
average_completion_time: string, | ||
chain_id: number | null, | ||
status: string, | ||
type: string, | ||
deposit_address?: Desposit, | ||
refuel_amount_in_usd: number, | ||
transaction_explorer_template: string, | ||
account_explorer_template: string, | ||
node: string, | ||
currencies: Token[], | ||
display_name: string | ||
internal_name: string | ||
native_currency: string | ||
logo: string | ||
is_testnet: boolean | ||
is_featured: boolean | ||
average_completion_time: string | ||
chain_id: number | null | ||
status: string | ||
type: string | ||
deposit_address?: Desposit | ||
refuel_amount_in_usd: number | ||
transaction_explorer_template: string | ||
account_explorer_template: string | ||
node: string | ||
currencies: Token[] | ||
} | ||
|
||
export type Token = { | ||
name: string, | ||
asset: string, | ||
logo: string, | ||
contract_address: string | null, | ||
decimals: number, | ||
status: string, | ||
is_deposit_enabled: boolean, | ||
is_withdrawal_enabled: boolean, | ||
is_refuel_enabled: boolean, | ||
max_withdrawal_amount: number, | ||
deposit_fee: number, | ||
withdrawal_fee: number, | ||
source_base_fee: number, | ||
destination_base_fee: number, | ||
name: string | ||
asset: string | ||
logo: string | ||
contract_address: string | null | ||
decimals: number | ||
status: string | ||
is_deposit_enabled: boolean | ||
is_withdrawal_enabled: boolean | ||
is_refuel_enabled: boolean | ||
max_withdrawal_amount: number | ||
deposit_fee: number | ||
withdrawal_fee: number | ||
source_base_fee: number | ||
destination_base_fee: number | ||
is_native: boolean | ||
} | ||
|
||
export type DepositAction = { | ||
id: number | ||
type: string | ||
status: string | ||
from: string | ||
to: string | ||
amount: number | ||
transaction_hash: string | ||
max_confirmations: number | ||
confirmations: number | ||
created_date: Date | ||
timestamp: Date | ||
} |
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