-
Notifications
You must be signed in to change notification settings - Fork 19
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
1a0fa0a
commit 68bee7e
Showing
79 changed files
with
14,439 additions
and
333 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
export enum TransactionTypes { | ||
TRANSFER = 'Transfer', | ||
CROSS_CHAIN_TRANSFER = 'CrossChainTransfer', // CrossChain Transfer | ||
CLAIM_TOKEN = 'ClaimToken', // faucet receive transfer | ||
TRANSFER_RED_PACKET = 'TransferRedPacket', | ||
CROSS_CHAIN_RECEIVE = 'ReleaseToken', // CrossChain Receive | ||
SWAP = 'SwapExactTokensForTokens', // Awaken | ||
BATCH_BUY_NOW = 'BatchBuyNow', | ||
DEAL = 'Deal', | ||
PALY = 'Play', | ||
ADDTREEPOINTS = 'AddTreePoints', | ||
JOIN = 'Join', | ||
PLACEBID = 'PlaceBid', | ||
} | ||
|
||
export const DEFAULT_AMOUNT = 0; | ||
export const DEFAULT_DECIMAL = 8; | ||
export const DEFAULT_DIGITS = 4; | ||
export const DEFAULT_NFT_DECIMAL = 0; | ||
|
||
export const ELF_DECIMAL = 8; | ||
|
||
export const AELF_CHIAN_TYPE = 'aelf'; | ||
export const MAIN_CHAIN_ID = 'AELF'; | ||
export const MAIN_CHAIN = 'MainChain'; | ||
export const SIDE_CHAIN = 'dAppChain'; | ||
export const TESTNET = 'TESTNET'; | ||
export const TEST_NET = 'Testnet'; | ||
|
||
export const SHOW_FROM_TRANSACTION_TYPES = [ | ||
TransactionTypes.TRANSFER, | ||
TransactionTypes.CROSS_CHAIN_TRANSFER, | ||
TransactionTypes.CLAIM_TOKEN, | ||
TransactionTypes.TRANSFER_RED_PACKET, | ||
TransactionTypes.SWAP, | ||
TransactionTypes.CROSS_CHAIN_RECEIVE, | ||
TransactionTypes.BATCH_BUY_NOW, | ||
TransactionTypes.DEAL, | ||
TransactionTypes.PALY, | ||
TransactionTypes.ADDTREEPOINTS, | ||
TransactionTypes.JOIN, | ||
TransactionTypes.PLACEBID, | ||
]; | ||
|
||
export const SHOW_DAPP_TRANSACTION_TYPES = [TransactionTypes.SWAP]; | ||
|
||
export const ON_END_REACHED_THRESHOLD = 0.3; | ||
export const ACTIVITY_PAGE_SIZE = 20; |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { ITokenSectionResponse } from '@portkey-wallet/types/types-ca/token'; | ||
|
||
export enum TransactionError { | ||
TOKEN_NOT_ENOUGH = 'Insufficient funds', | ||
NFT_NOT_ENOUGH = 'Insufficient quantity', | ||
FEE_NOT_ENOUGH = 'Insufficient funds for transaction fee', | ||
CROSS_NOT_ENOUGH = 'Insufficient funds for cross-chain transaction fee', | ||
} | ||
|
||
export const REFRESH_TIME = 5 * 60 * 1000; // 5min refresh | ||
|
||
export const NEW_CLIENT_MOCK_ELF_LIST: ITokenSectionResponse[] = [ | ||
{ | ||
balance: '0', | ||
balanceInUsd: '0.000000', | ||
price: 0, | ||
decimals: 8, | ||
imageUrl: 'https://portkey-did.s3.ap-northeast-1.amazonaws.com/img/aelf/Coin-ELF.png', | ||
symbol: 'ELF', | ||
tokens: [ | ||
{ | ||
address: 'JRmBduh4nXWi1aXgdUsj5gJrzeZb2LxmrAbf7W99faZSvoAaE', | ||
balance: '0', | ||
balanceInUsd: '0.000000', | ||
chainId: 'AELF', | ||
decimals: 8, | ||
imageUrl: 'https://portkey-did.s3.ap-northeast-1.amazonaws.com/img/aelf/Coin-ELF.png', | ||
symbol: 'ELF', | ||
tokenContractAddress: 'JRmBduh4nXWi1aXgdUsj5gJrzeZb2LxmrAbf7W99faZSvoAaE', | ||
}, | ||
], | ||
}, | ||
]; | ||
|
||
export const PAGE_SIZE_IN_NFT_ITEM = 15; | ||
|
||
export const PAGE_SIZE_IN_ACCOUNT_NFT_COLLECTION = 20; | ||
|
||
export const PAGE_SIZE_IN_ACCOUNT_TOKEN = 20; | ||
|
||
export const PAGE_SIZE_IN_ACCOUNT_ASSETS = 20; | ||
|
||
export const PAGE_SIZE_DEFAULT = 50; | ||
|
||
export const ELF_SYMBOL = 'ELF'; | ||
|
||
export const NFT_SMALL_SIZE = 144; | ||
export const NFT_MIDDLE_SIZE = 294; | ||
export const NFT_MIDDLE_X_SIZE = 512; | ||
export const NFT_LARGE_SIZE = 1008; | ||
|
||
export enum BalanceTab { | ||
TOKEN = 'token', | ||
NFT = 'nft', | ||
ACTIVITY = 'activity', | ||
} | ||
|
||
export enum ContactsTab { | ||
ALL = 'All', | ||
Chats = 'Chats', | ||
} | ||
|
||
export enum AssetType { | ||
ft = 1, | ||
nft = 2, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
export type ErrorType = { | ||
errorMsg: string; | ||
isError: boolean; | ||
isWarning?: boolean; | ||
}; | ||
|
||
export const INIT_ERROR: ErrorType = { | ||
errorMsg: '', | ||
isError: false, | ||
}; | ||
|
||
export const INIT_NONE_ERROR: ErrorType = { | ||
...INIT_ERROR, | ||
}; | ||
|
||
export const INIT_HAS_ERROR: ErrorType = { | ||
errorMsg: '', | ||
isError: true, | ||
}; | ||
|
||
export enum contractStatusEnum { | ||
MINED = 'MINED', | ||
FAILED = 'FAILED', | ||
PENDING = 'PENDING', | ||
} | ||
|
||
export const HELP_CENTER_URL = 'https://doc.portkey.finance/help'; | ||
|
||
export const AELF_NETWORK_NAME = 'aelf'; |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export const SELL_SOCKET_TIMEOUT = 15 * 1000; | ||
|
||
export const BUY_SOON_TEXT = 'On-ramp is currently not supported. It will be launched in the coming weeks.'; | ||
|
||
export const SELL_SOON_TEXT = 'Off-ramp is currently not supported. It will be launched in the coming weeks.'; | ||
|
||
export const SERVICE_UNAVAILABLE_TEXT = 'Sorry, the service you are using is temporarily unavailable.'; | ||
|
||
export const DISCLAIMER_TEXT = | ||
' is a fiat-to-crypto platform independently operated by a third-party entity. Portkey shall not be held liable for any losses or damages suffered as a result of using '; | ||
|
||
export const INSUFFICIENT_FUNDS_TEXT = 'Insufficient funds'; | ||
|
||
export const SYNCHRONIZING_CHAIN_TEXT = 'Synchronizing on-chain account information...'; | ||
|
||
export const SHOW_RAMP_SYMBOL_LIST = ['ELF', 'USDT']; | ||
|
||
export const SHOW_RAMP_CHAIN_ID_LIST = ['AELF']; |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { useAppEOASelector } from '../index'; | ||
export const useActivity = () => useAppEOASelector(state => state.activity); |
Oops, something went wrong.