-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathindex.ts
More file actions
70 lines (61 loc) · 1.99 KB
/
index.ts
File metadata and controls
70 lines (61 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { constants } from "@socket.tech/ll-core";
export * from "./time";
// API-KEY needed for calling socket apis.
export const SOCKET_API_KEY = process.env.REACT_APP_SOCKET_API_KEY;
// SOCKET API URL
export const SOCKET_API = process.env.REACT_APP_SOCKET_API;
// Socket uses this address for native tokens. For example -> ETH on Ethereum, MATIC on Polygon, etc.
export const NATIVE_TOKEN_ADDRESS =
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
// Types of Txs possible in a route.
export enum UserTxType {
FUND_MOVR = "fund-movr",
DEX_SWAP = "dex-swap",
APPROVE = "approve",
CLAIM = "claim",
SIGN = "sign",
}
// Labels for the tx types.
export const USER_TX_LABELS = {
[UserTxType.APPROVE]: "Approve",
[UserTxType.FUND_MOVR]: "Bridge",
[UserTxType.DEX_SWAP]: "Swap",
[UserTxType.CLAIM]: "Claim",
[UserTxType.SIGN]: "Sign",
};
// Display Names for bridges.
export const BRIDGE_DISPLAY_NAMES = {
[constants.bridges.PolygonBridge]: "Polygon",
[constants.bridges.Hop]: "Hop",
[constants.bridges.Across]: "Across",
[constants.bridges.Hyphen]: "Hyphen",
[constants.bridges.refuel]: "Refuel",
[constants.bridges.AnySwapRouterV4]: "Multichain",
[constants.bridges.Celer]: "Celer",
[constants.bridges.ArbitrumBridge]: "Arbitrum",
[constants.bridges.OptimismBridge]: "Optimism",
};
// Status of the prepare API.
export enum PrepareTxStatus {
COMPLETED = "completed",
PENDING = "pending",
READY = "ready",
}
export enum QuoteStatus {
FETCHING_QUOTE = "Fetching best quote...",
NO_ROUTES_AVAILABLE = "No routes available",
ENTER_AMOUNT = "Enter amount",
}
export enum ButtonTexts {
NOT_ENOUGH_NATIVE_BALANCE = "Native token not enough",
NOT_ENOUGH_BALANCE = "Not enough balance",
REVIEW_QUOTE = "Review Quote",
CHECKING_APPROVAL = "Checking approval",
APPROVING = "Approving",
APPROVE = "Approve",
APPROVAL_DONE = "Approved",
BRIDGE_IN_PROGRESS = "Bridging in progress",
INITIATING = "Initiating...",
IN_PROGRESS = "In progress",
REFETCHING = "Refetching...",
}