@lifi/sdk 2.0.0-beta.14 → 2.0.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{src/execution → execution}/StepExecutionManager.js +11 -3
- package/dist/cjs/{src/utils → utils}/errors.js +6 -6
- package/dist/cjs/{src/utils → utils}/preRestart.js +10 -0
- package/dist/cjs/version.d.ts +2 -0
- package/dist/cjs/{src/version.js → version.js} +1 -1
- package/dist/{src/execution → execution}/StepExecutionManager.js +11 -3
- package/dist/{src/utils → utils}/preRestart.js +10 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +2 -0
- package/package.json +9 -9
- package/dist/cjs/src/execution/RouteExecutionManager.unit.handlers.d.ts +0 -1
- package/dist/cjs/src/execution/RouteExecutionManager.unit.handlers.js +0 -20
- package/dist/cjs/src/execution/RouteExecutionManager.unit.mock.d.ts +0 -80
- package/dist/cjs/src/execution/RouteExecutionManager.unit.mock.js +0 -76
- package/dist/cjs/src/services/ApiService.unit.handlers.d.ts +0 -1
- package/dist/cjs/src/services/ApiService.unit.handlers.js +0 -50
- package/dist/cjs/src/version.d.ts +0 -2
- package/dist/cjs/test/fixtures.d.ts +0 -7
- package/dist/cjs/test/fixtures.js +0 -157
- package/dist/src/execution/RouteExecutionManager.unit.handlers.d.ts +0 -1
- package/dist/src/execution/RouteExecutionManager.unit.handlers.js +0 -14
- package/dist/src/execution/RouteExecutionManager.unit.mock.d.ts +0 -80
- package/dist/src/execution/RouteExecutionManager.unit.mock.js +0 -72
- package/dist/src/services/ApiService.unit.handlers.d.ts +0 -1
- package/dist/src/services/ApiService.unit.handlers.js +0 -44
- package/dist/src/version.d.ts +0 -2
- package/dist/src/version.js +0 -2
- package/dist/test/fixtures.d.ts +0 -7
- package/dist/test/fixtures.js +0 -152
- /package/dist/{cjs/src/LiFi.d.ts → LiFi.d.ts} +0 -0
- /package/dist/{src/LiFi.js → LiFi.js} +0 -0
- /package/dist/{cjs/src/allowance → allowance}/checkAllowance.d.ts +0 -0
- /package/dist/{src/allowance → allowance}/checkAllowance.js +0 -0
- /package/dist/{cjs/src/allowance → allowance}/index.d.ts +0 -0
- /package/dist/{src/allowance → allowance}/index.js +0 -0
- /package/dist/{cjs/src/allowance → allowance}/tokenApproval.d.ts +0 -0
- /package/dist/{src/allowance → allowance}/tokenApproval.js +0 -0
- /package/dist/{cjs/src/allowance → allowance}/utils.d.ts +0 -0
- /package/dist/{src/allowance → allowance}/utils.js +0 -0
- /package/dist/{cjs/src/balance → balance}/checkBalance.d.ts +0 -0
- /package/dist/{src/balance → balance}/checkBalance.js +0 -0
- /package/dist/{cjs/src/balance → balance}/getTokenBalance.d.ts +0 -0
- /package/dist/{src/balance → balance}/getTokenBalance.js +0 -0
- /package/dist/{cjs/src/balance → balance}/index.d.ts +0 -0
- /package/dist/{src/balance → balance}/index.js +0 -0
- /package/dist/{cjs/src/balance → balance}/utils.d.ts +0 -0
- /package/dist/{src/balance → balance}/utils.js +0 -0
- /package/dist/{src → cjs}/LiFi.d.ts +0 -0
- /package/dist/cjs/{src/LiFi.js → LiFi.js} +0 -0
- /package/dist/{src → cjs}/allowance/checkAllowance.d.ts +0 -0
- /package/dist/cjs/{src/allowance → allowance}/checkAllowance.js +0 -0
- /package/dist/{src → cjs}/allowance/index.d.ts +0 -0
- /package/dist/cjs/{src/allowance → allowance}/index.js +0 -0
- /package/dist/{src → cjs}/allowance/tokenApproval.d.ts +0 -0
- /package/dist/cjs/{src/allowance → allowance}/tokenApproval.js +0 -0
- /package/dist/{src → cjs}/allowance/utils.d.ts +0 -0
- /package/dist/cjs/{src/allowance → allowance}/utils.js +0 -0
- /package/dist/{src → cjs}/balance/checkBalance.d.ts +0 -0
- /package/dist/cjs/{src/balance → balance}/checkBalance.js +0 -0
- /package/dist/{src → cjs}/balance/getTokenBalance.d.ts +0 -0
- /package/dist/cjs/{src/balance → balance}/getTokenBalance.js +0 -0
- /package/dist/{src → cjs}/balance/index.d.ts +0 -0
- /package/dist/cjs/{src/balance → balance}/index.js +0 -0
- /package/dist/{src → cjs}/balance/utils.d.ts +0 -0
- /package/dist/cjs/{src/balance → balance}/utils.js +0 -0
- /package/dist/cjs/{src/connectors.d.ts → connectors.d.ts} +0 -0
- /package/dist/cjs/{src/connectors.js → connectors.js} +0 -0
- /package/dist/cjs/{src/execution → execution}/RouteExecutionManager.d.ts +0 -0
- /package/dist/cjs/{src/execution → execution}/RouteExecutionManager.js +0 -0
- /package/dist/cjs/{src/execution → execution}/StatusManager.d.ts +0 -0
- /package/dist/cjs/{src/execution → execution}/StatusManager.js +0 -0
- /package/dist/cjs/{src/execution → execution}/StepExecutionManager.d.ts +0 -0
- /package/dist/cjs/{src/execution → execution}/StepExecutor.d.ts +0 -0
- /package/dist/cjs/{src/execution → execution}/StepExecutor.js +0 -0
- /package/dist/cjs/{src/execution → execution}/index.d.ts +0 -0
- /package/dist/cjs/{src/execution → execution}/index.js +0 -0
- /package/dist/cjs/{src/execution → execution}/stepComparison.d.ts +0 -0
- /package/dist/cjs/{src/execution → execution}/stepComparison.js +0 -0
- /package/dist/cjs/{src/execution → execution}/switchChain.d.ts +0 -0
- /package/dist/cjs/{src/execution → execution}/switchChain.js +0 -0
- /package/dist/cjs/{src/execution → execution}/utils.d.ts +0 -0
- /package/dist/cjs/{src/execution → execution}/utils.js +0 -0
- /package/dist/cjs/{src/helpers.d.ts → helpers.d.ts} +0 -0
- /package/dist/cjs/{src/helpers.js → helpers.js} +0 -0
- /package/dist/cjs/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/cjs/{src/index.js → index.js} +0 -0
- /package/dist/cjs/{src/request.d.ts → request.d.ts} +0 -0
- /package/dist/cjs/{src/request.js → request.js} +0 -0
- /package/dist/cjs/{src/services → services}/ApiService.d.ts +0 -0
- /package/dist/cjs/{src/services → services}/ApiService.js +0 -0
- /package/dist/cjs/{src/services → services}/ChainsService.d.ts +0 -0
- /package/dist/cjs/{src/services → services}/ChainsService.js +0 -0
- /package/dist/cjs/{src/services → services}/ConfigService.d.ts +0 -0
- /package/dist/cjs/{src/services → services}/ConfigService.js +0 -0
- /package/dist/cjs/{src/typeguards.d.ts → typeguards.d.ts} +0 -0
- /package/dist/cjs/{src/typeguards.js → typeguards.js} +0 -0
- /package/dist/cjs/{src/types → types}/ERC20.d.ts +0 -0
- /package/dist/cjs/{src/types → types}/ERC20.js +0 -0
- /package/dist/cjs/{src/types → types}/index.d.ts +0 -0
- /package/dist/cjs/{src/types → types}/index.js +0 -0
- /package/dist/cjs/{src/types → types}/internal.types.d.ts +0 -0
- /package/dist/cjs/{src/types → types}/internal.types.js +0 -0
- /package/dist/cjs/{src/utils → utils}/errors.d.ts +0 -0
- /package/dist/cjs/{src/utils → utils}/getProvider.d.ts +0 -0
- /package/dist/cjs/{src/utils → utils}/getProvider.js +0 -0
- /package/dist/cjs/{src/utils → utils}/multicall.d.ts +0 -0
- /package/dist/cjs/{src/utils → utils}/multicall.js +0 -0
- /package/dist/cjs/{src/utils → utils}/multicallAbi.json +0 -0
- /package/dist/cjs/{src/utils → utils}/parseError.d.ts +0 -0
- /package/dist/cjs/{src/utils → utils}/parseError.js +0 -0
- /package/dist/cjs/{src/utils → utils}/preRestart.d.ts +0 -0
- /package/dist/cjs/{src/utils → utils}/utils.d.ts +0 -0
- /package/dist/cjs/{src/utils → utils}/utils.js +0 -0
- /package/dist/{src/connectors.d.ts → connectors.d.ts} +0 -0
- /package/dist/{src/connectors.js → connectors.js} +0 -0
- /package/dist/{src/execution → execution}/RouteExecutionManager.d.ts +0 -0
- /package/dist/{src/execution → execution}/RouteExecutionManager.js +0 -0
- /package/dist/{src/execution → execution}/StatusManager.d.ts +0 -0
- /package/dist/{src/execution → execution}/StatusManager.js +0 -0
- /package/dist/{src/execution → execution}/StepExecutionManager.d.ts +0 -0
- /package/dist/{src/execution → execution}/StepExecutor.d.ts +0 -0
- /package/dist/{src/execution → execution}/StepExecutor.js +0 -0
- /package/dist/{src/execution → execution}/index.d.ts +0 -0
- /package/dist/{src/execution → execution}/index.js +0 -0
- /package/dist/{src/execution → execution}/stepComparison.d.ts +0 -0
- /package/dist/{src/execution → execution}/stepComparison.js +0 -0
- /package/dist/{src/execution → execution}/switchChain.d.ts +0 -0
- /package/dist/{src/execution → execution}/switchChain.js +0 -0
- /package/dist/{src/execution → execution}/utils.d.ts +0 -0
- /package/dist/{src/execution → execution}/utils.js +0 -0
- /package/dist/{src/helpers.d.ts → helpers.d.ts} +0 -0
- /package/dist/{src/helpers.js → helpers.js} +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/request.d.ts → request.d.ts} +0 -0
- /package/dist/{src/request.js → request.js} +0 -0
- /package/dist/{src/services → services}/ApiService.d.ts +0 -0
- /package/dist/{src/services → services}/ApiService.js +0 -0
- /package/dist/{src/services → services}/ChainsService.d.ts +0 -0
- /package/dist/{src/services → services}/ChainsService.js +0 -0
- /package/dist/{src/services → services}/ConfigService.d.ts +0 -0
- /package/dist/{src/services → services}/ConfigService.js +0 -0
- /package/dist/{src/typeguards.d.ts → typeguards.d.ts} +0 -0
- /package/dist/{src/typeguards.js → typeguards.js} +0 -0
- /package/dist/{src/types → types}/ERC20.d.ts +0 -0
- /package/dist/{src/types → types}/ERC20.js +0 -0
- /package/dist/{src/types → types}/index.d.ts +0 -0
- /package/dist/{src/types → types}/index.js +0 -0
- /package/dist/{src/types → types}/internal.types.d.ts +0 -0
- /package/dist/{src/types → types}/internal.types.js +0 -0
- /package/dist/{src/utils → utils}/errors.d.ts +0 -0
- /package/dist/{src/utils → utils}/errors.js +0 -0
- /package/dist/{src/utils → utils}/getProvider.d.ts +0 -0
- /package/dist/{src/utils → utils}/getProvider.js +0 -0
- /package/dist/{src/utils → utils}/multicall.d.ts +0 -0
- /package/dist/{src/utils → utils}/multicall.js +0 -0
- /package/dist/{src/utils → utils}/multicallAbi.json +0 -0
- /package/dist/{src/utils → utils}/parseError.d.ts +0 -0
- /package/dist/{src/utils → utils}/parseError.js +0 -0
- /package/dist/{src/utils → utils}/preRestart.d.ts +0 -0
- /package/dist/{src/utils → utils}/utils.d.ts +0 -0
- /package/dist/{src/utils → utils}/utils.js +0 -0
|
@@ -90,10 +90,18 @@ class StepExecutionManager {
|
|
|
90
90
|
transactionRequest.maxFeePerGas = customConfig.maxFeePerGas;
|
|
91
91
|
}
|
|
92
92
|
else {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
try {
|
|
94
|
+
const estimatedGasLimit = await signer.estimateGas(transactionRequest);
|
|
95
|
+
if (estimatedGasLimit) {
|
|
96
|
+
transactionRequest.gasLimit = `${(BigInt(estimatedGasLimit.toString()) * 125n) / 100n}`;
|
|
97
|
+
}
|
|
98
|
+
// Fetch latest gasPrice from provider and use it
|
|
99
|
+
const gasPrice = await signer.getGasPrice();
|
|
100
|
+
if (gasPrice) {
|
|
101
|
+
transactionRequest.gasPrice = gasPrice;
|
|
102
|
+
}
|
|
96
103
|
}
|
|
104
|
+
catch (error) { }
|
|
97
105
|
}
|
|
98
106
|
// Submit the transaction
|
|
99
107
|
transaction = await signer.sendTransaction(transactionRequest);
|
|
@@ -30,13 +30,13 @@ var LifiErrorCode;
|
|
|
30
30
|
LifiErrorCode[LifiErrorCode["BalanceError"] = 1013] = "BalanceError";
|
|
31
31
|
LifiErrorCode[LifiErrorCode["AllowanceRequired"] = 1014] = "AllowanceRequired";
|
|
32
32
|
LifiErrorCode[LifiErrorCode["InsufficientFunds"] = 1015] = "InsufficientFunds";
|
|
33
|
-
})(LifiErrorCode
|
|
33
|
+
})(LifiErrorCode || (exports.LifiErrorCode = LifiErrorCode = {}));
|
|
34
34
|
var EthersErrorType;
|
|
35
35
|
(function (EthersErrorType) {
|
|
36
36
|
EthersErrorType["ActionRejected"] = "ACTION_REJECTED";
|
|
37
37
|
EthersErrorType["CallExecption"] = "CALL_EXCEPTION";
|
|
38
38
|
EthersErrorType["InsufficientFunds"] = "INSUFFICIENT_FUNDS";
|
|
39
|
-
})(EthersErrorType
|
|
39
|
+
})(EthersErrorType || (exports.EthersErrorType = EthersErrorType = {}));
|
|
40
40
|
var EthersErrorMessage;
|
|
41
41
|
(function (EthersErrorMessage) {
|
|
42
42
|
EthersErrorMessage["ERC20Allowance"] = "ERC20: transfer amount exceeds allowance";
|
|
@@ -44,7 +44,7 @@ var EthersErrorMessage;
|
|
|
44
44
|
EthersErrorMessage["OutOfGas"] = "out of gas";
|
|
45
45
|
EthersErrorMessage["Underpriced"] = "underpriced";
|
|
46
46
|
EthersErrorMessage["LowReplacementFee"] = "replacement fee too low";
|
|
47
|
-
})(EthersErrorMessage
|
|
47
|
+
})(EthersErrorMessage || (exports.EthersErrorMessage = EthersErrorMessage = {}));
|
|
48
48
|
var ErrorMessage;
|
|
49
49
|
(function (ErrorMessage) {
|
|
50
50
|
ErrorMessage["UnknownError"] = "Unknown error occurred.";
|
|
@@ -52,7 +52,7 @@ var ErrorMessage;
|
|
|
52
52
|
ErrorMessage["GasLimitLow"] = "Gas limit is too low.";
|
|
53
53
|
ErrorMessage["TransactionUnderpriced"] = "Transaction is underpriced.";
|
|
54
54
|
ErrorMessage["Default"] = "Something went wrong.";
|
|
55
|
-
})(ErrorMessage
|
|
55
|
+
})(ErrorMessage || (exports.ErrorMessage = ErrorMessage = {}));
|
|
56
56
|
var MetaMaskRPCErrorCode;
|
|
57
57
|
(function (MetaMaskRPCErrorCode) {
|
|
58
58
|
MetaMaskRPCErrorCode[MetaMaskRPCErrorCode["invalidInput"] = -32000] = "invalidInput";
|
|
@@ -66,7 +66,7 @@ var MetaMaskRPCErrorCode;
|
|
|
66
66
|
MetaMaskRPCErrorCode[MetaMaskRPCErrorCode["methodNotFound"] = -32601] = "methodNotFound";
|
|
67
67
|
MetaMaskRPCErrorCode[MetaMaskRPCErrorCode["invalidParams"] = -32602] = "invalidParams";
|
|
68
68
|
MetaMaskRPCErrorCode[MetaMaskRPCErrorCode["internal"] = -32603] = "internal";
|
|
69
|
-
})(MetaMaskRPCErrorCode
|
|
69
|
+
})(MetaMaskRPCErrorCode || (exports.MetaMaskRPCErrorCode = MetaMaskRPCErrorCode = {}));
|
|
70
70
|
var MetaMaskProviderErrorCode;
|
|
71
71
|
(function (MetaMaskProviderErrorCode) {
|
|
72
72
|
MetaMaskProviderErrorCode[MetaMaskProviderErrorCode["userRejectedRequest"] = 4001] = "userRejectedRequest";
|
|
@@ -74,7 +74,7 @@ var MetaMaskProviderErrorCode;
|
|
|
74
74
|
MetaMaskProviderErrorCode[MetaMaskProviderErrorCode["unsupportedMethod"] = 4200] = "unsupportedMethod";
|
|
75
75
|
MetaMaskProviderErrorCode[MetaMaskProviderErrorCode["disconnected"] = 4900] = "disconnected";
|
|
76
76
|
MetaMaskProviderErrorCode[MetaMaskProviderErrorCode["chainDisconnected"] = 4901] = "chainDisconnected";
|
|
77
|
-
})(MetaMaskProviderErrorCode
|
|
77
|
+
})(MetaMaskProviderErrorCode || (exports.MetaMaskProviderErrorCode = MetaMaskProviderErrorCode = {}));
|
|
78
78
|
class LifiError extends Error {
|
|
79
79
|
constructor(type, code, message, htmlMessage, stack) {
|
|
80
80
|
super(message);
|
|
@@ -31,6 +31,16 @@ const handleErrorType = async (route, index, signer) => {
|
|
|
31
31
|
route.steps[index].estimate.gasCosts?.forEach((gasCost) => (gasCost.limit = `${Math.round(Number(gasCost.limit) * 1.25)}`));
|
|
32
32
|
}
|
|
33
33
|
if (isGasPriceError) {
|
|
34
|
+
if (transactionRequest) {
|
|
35
|
+
let gasPrice = transactionRequest.gasPrice;
|
|
36
|
+
try {
|
|
37
|
+
gasPrice = await signer.getGasPrice();
|
|
38
|
+
}
|
|
39
|
+
catch (error) { }
|
|
40
|
+
if (gasPrice) {
|
|
41
|
+
transactionRequest.gasPrice = `${(BigInt(gasPrice.toString()) * 125n) / 100n}`;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
34
44
|
route.steps[index].estimate.gasCosts?.forEach((gasCost) => (gasCost.price = `${Math.round(Number(gasCost.price) * 1.25)}`));
|
|
35
45
|
}
|
|
36
46
|
};
|
|
@@ -84,10 +84,18 @@ export class StepExecutionManager {
|
|
|
84
84
|
transactionRequest.maxFeePerGas = customConfig.maxFeePerGas;
|
|
85
85
|
}
|
|
86
86
|
else {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
try {
|
|
88
|
+
const estimatedGasLimit = await signer.estimateGas(transactionRequest);
|
|
89
|
+
if (estimatedGasLimit) {
|
|
90
|
+
transactionRequest.gasLimit = `${(BigInt(estimatedGasLimit.toString()) * 125n) / 100n}`;
|
|
91
|
+
}
|
|
92
|
+
// Fetch latest gasPrice from provider and use it
|
|
93
|
+
const gasPrice = await signer.getGasPrice();
|
|
94
|
+
if (gasPrice) {
|
|
95
|
+
transactionRequest.gasPrice = gasPrice;
|
|
96
|
+
}
|
|
90
97
|
}
|
|
98
|
+
catch (error) { }
|
|
91
99
|
}
|
|
92
100
|
// Submit the transaction
|
|
93
101
|
transaction = await signer.sendTransaction(transactionRequest);
|
|
@@ -27,6 +27,16 @@ const handleErrorType = async (route, index, signer) => {
|
|
|
27
27
|
route.steps[index].estimate.gasCosts?.forEach((gasCost) => (gasCost.limit = `${Math.round(Number(gasCost.limit) * 1.25)}`));
|
|
28
28
|
}
|
|
29
29
|
if (isGasPriceError) {
|
|
30
|
+
if (transactionRequest) {
|
|
31
|
+
let gasPrice = transactionRequest.gasPrice;
|
|
32
|
+
try {
|
|
33
|
+
gasPrice = await signer.getGasPrice();
|
|
34
|
+
}
|
|
35
|
+
catch (error) { }
|
|
36
|
+
if (gasPrice) {
|
|
37
|
+
transactionRequest.gasPrice = `${(BigInt(gasPrice.toString()) * 125n) / 100n}`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
30
40
|
route.steps[index].estimate.gasCosts?.forEach((gasCost) => (gasCost.price = `${Math.round(Number(gasCost.price) * 1.25)}`));
|
|
31
41
|
}
|
|
32
42
|
};
|
package/dist/version.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/sdk",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.16",
|
|
4
4
|
"description": "LI.FI Any-to-Any Cross-Chain-Swap SDK",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -82,14 +82,14 @@
|
|
|
82
82
|
"ethers": "^5.7.2"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@commitlint/cli": "^17.6.
|
|
86
|
-
"@commitlint/config-conventional": "^17.6.
|
|
85
|
+
"@commitlint/cli": "^17.6.5",
|
|
86
|
+
"@commitlint/config-conventional": "^17.6.5",
|
|
87
87
|
"@mswjs/interceptors": "^0.22.15",
|
|
88
|
-
"@typescript-eslint/eslint-plugin": "^5.59.
|
|
89
|
-
"@typescript-eslint/parser": "^5.59.
|
|
90
|
-
"@vitest/coverage-c8": "^0.
|
|
88
|
+
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
|
89
|
+
"@typescript-eslint/parser": "^5.59.9",
|
|
90
|
+
"@vitest/coverage-c8": "^0.32.0",
|
|
91
91
|
"cross-fetch": "^3.1.6",
|
|
92
|
-
"eslint": "^8.
|
|
92
|
+
"eslint": "^8.42.0",
|
|
93
93
|
"eslint-config-prettier": "^8.8.0",
|
|
94
94
|
"eslint-plugin-prettier": "^4.2.1",
|
|
95
95
|
"husky": "^8.0.3",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"pinst": "^3.0.0",
|
|
100
100
|
"prettier": "^2.8.8",
|
|
101
101
|
"standard-version": "^9.5.0",
|
|
102
|
-
"typescript": "^5.
|
|
103
|
-
"vitest": "^0.
|
|
102
|
+
"typescript": "^5.1.3",
|
|
103
|
+
"vitest": "^0.32.0"
|
|
104
104
|
},
|
|
105
105
|
"directories": {
|
|
106
106
|
"test": "test"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const lifiHandlers: import("msw").RestHandler<import("msw/lib/glossary-de6278a9").M<import("msw/lib/glossary-de6278a9").h>>[];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.lifiHandlers = void 0;
|
|
7
|
-
const msw_1 = require("msw");
|
|
8
|
-
const RouteExecutionManager_unit_mock_1 = require("./RouteExecutionManager.unit.mock");
|
|
9
|
-
const ConfigService_1 = __importDefault(require("../services/ConfigService"));
|
|
10
|
-
const fixtures_1 = require("../../test/fixtures");
|
|
11
|
-
const config = ConfigService_1.default.getInstance().getConfig();
|
|
12
|
-
exports.lifiHandlers = [
|
|
13
|
-
msw_1.rest.post(`${config.apiUrl}/advanced/stepTransaction`, async (_, response, context) => response(context.status(200), context.json((0, RouteExecutionManager_unit_mock_1.mockStepTransactionWithTxRequest)((0, fixtures_1.buildStepObject)({
|
|
14
|
-
includingExecution: true,
|
|
15
|
-
}))))),
|
|
16
|
-
msw_1.rest.get(`${config.apiUrl}/chains`, async (_, response, context) => response(context.status(200), context.json({
|
|
17
|
-
chains: RouteExecutionManager_unit_mock_1.mockChainsResponse,
|
|
18
|
-
}))),
|
|
19
|
-
msw_1.rest.get(`${config.apiUrl}/status`, async (_, response, context) => response(context.status(200), context.json(RouteExecutionManager_unit_mock_1.mockStatus))),
|
|
20
|
-
];
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { LifiStep } from '@lifi/types';
|
|
2
|
-
export declare const mockChainsResponse: {
|
|
3
|
-
key: string;
|
|
4
|
-
chainType: string;
|
|
5
|
-
name: string;
|
|
6
|
-
coin: string;
|
|
7
|
-
id: number;
|
|
8
|
-
mainnet: boolean;
|
|
9
|
-
logoURI: string;
|
|
10
|
-
tokenlistUrl: string;
|
|
11
|
-
faucetUrls: string[];
|
|
12
|
-
multicallAddress: string;
|
|
13
|
-
metamask: {
|
|
14
|
-
chainId: string;
|
|
15
|
-
blockExplorerUrls: string[];
|
|
16
|
-
chainName: string;
|
|
17
|
-
nativeCurrency: {
|
|
18
|
-
name: string;
|
|
19
|
-
symbol: string;
|
|
20
|
-
decimals: number;
|
|
21
|
-
};
|
|
22
|
-
rpcUrls: string[];
|
|
23
|
-
};
|
|
24
|
-
nativeToken: {
|
|
25
|
-
address: string;
|
|
26
|
-
chainId: number;
|
|
27
|
-
symbol: string;
|
|
28
|
-
decimals: number;
|
|
29
|
-
name: string;
|
|
30
|
-
priceUSD: string;
|
|
31
|
-
logoURI: string;
|
|
32
|
-
coinKey: string;
|
|
33
|
-
};
|
|
34
|
-
}[];
|
|
35
|
-
export declare const mockTransactionRequest: {
|
|
36
|
-
transactionRequest: {
|
|
37
|
-
data: string;
|
|
38
|
-
to: string;
|
|
39
|
-
value: string;
|
|
40
|
-
from: string;
|
|
41
|
-
chainId: number;
|
|
42
|
-
gasPrice: string;
|
|
43
|
-
gasLimit: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export declare const mockStatus: {
|
|
47
|
-
status: string;
|
|
48
|
-
receiving: boolean;
|
|
49
|
-
sending: {
|
|
50
|
-
amount: string;
|
|
51
|
-
gasAmount: string;
|
|
52
|
-
gasAmountUSD: string;
|
|
53
|
-
gasPrice: string;
|
|
54
|
-
gasToken: string;
|
|
55
|
-
gasUsed: string;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export declare const mockStepTransactionWithTxRequest: (step?: LifiStep) => {
|
|
59
|
-
transactionRequest: {
|
|
60
|
-
transactionRequest: {
|
|
61
|
-
data: string;
|
|
62
|
-
to: string;
|
|
63
|
-
value: string;
|
|
64
|
-
from: string;
|
|
65
|
-
chainId: number;
|
|
66
|
-
gasPrice: string;
|
|
67
|
-
gasLimit: string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
type: "lifi";
|
|
71
|
-
includedSteps: import("@lifi/types").Step[];
|
|
72
|
-
id: string;
|
|
73
|
-
referrer?: string | undefined;
|
|
74
|
-
action: import("@lifi/types").Action | import("@lifi/types").CallAction;
|
|
75
|
-
estimate: import("@lifi/types").Estimate;
|
|
76
|
-
tool: string;
|
|
77
|
-
toolDetails: Pick<import("@lifi/types").Bridge | import("@lifi/types").ExchangeAggregator | import("@lifi/types").Exchange, "key" | "name" | "logoURI">;
|
|
78
|
-
integrator?: string | undefined;
|
|
79
|
-
execution?: import("@lifi/types").Execution | undefined;
|
|
80
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mockStepTransactionWithTxRequest = exports.mockStatus = exports.mockTransactionRequest = exports.mockChainsResponse = void 0;
|
|
4
|
-
const fixtures_1 = require("../../test/fixtures");
|
|
5
|
-
exports.mockChainsResponse = [
|
|
6
|
-
{
|
|
7
|
-
key: 'pol',
|
|
8
|
-
chainType: 'EVM',
|
|
9
|
-
name: 'Polygon',
|
|
10
|
-
coin: 'MATIC',
|
|
11
|
-
id: 137,
|
|
12
|
-
mainnet: true,
|
|
13
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/polygon.svg',
|
|
14
|
-
tokenlistUrl: 'https://unpkg.com/quickswap-default-token-list@1.0.71/build/quickswap-default.tokenlist.json',
|
|
15
|
-
faucetUrls: ['https://stakely.io/faucet/polygon-matic'],
|
|
16
|
-
multicallAddress: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
17
|
-
metamask: {
|
|
18
|
-
chainId: '0x89',
|
|
19
|
-
blockExplorerUrls: [
|
|
20
|
-
'https://polygonscan.com/',
|
|
21
|
-
'https://explorer-mainnet.maticvigil.com/',
|
|
22
|
-
],
|
|
23
|
-
chainName: 'Matic(Polygon) Mainnet',
|
|
24
|
-
nativeCurrency: {
|
|
25
|
-
name: 'MATIC',
|
|
26
|
-
symbol: 'MATIC',
|
|
27
|
-
decimals: 18,
|
|
28
|
-
},
|
|
29
|
-
rpcUrls: [
|
|
30
|
-
'https://polygon-rpc.com/',
|
|
31
|
-
'https://rpc-mainnet.maticvigil.com/',
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
nativeToken: {
|
|
35
|
-
address: '0x0000000000000000000000000000000000000000',
|
|
36
|
-
chainId: 137,
|
|
37
|
-
symbol: 'MATIC',
|
|
38
|
-
decimals: 18,
|
|
39
|
-
name: 'MATIC',
|
|
40
|
-
priceUSD: '0.899628',
|
|
41
|
-
logoURI: 'https://static.debank.com/image/matic_token/logo_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png',
|
|
42
|
-
coinKey: 'MATIC',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
];
|
|
46
|
-
exports.mockTransactionRequest = {
|
|
47
|
-
transactionRequest: {
|
|
48
|
-
// eslint-disable-next-line max-len
|
|
49
|
-
data: '0xdata',
|
|
50
|
-
to: '0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE',
|
|
51
|
-
value: '0x0600830dbc7f5bf7',
|
|
52
|
-
from: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0',
|
|
53
|
-
chainId: 137,
|
|
54
|
-
gasPrice: '0x27c01c1727',
|
|
55
|
-
gasLimit: '682701',
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
exports.mockStatus = {
|
|
59
|
-
status: 'DONE',
|
|
60
|
-
receiving: true,
|
|
61
|
-
sending: {
|
|
62
|
-
amount: '123',
|
|
63
|
-
gasAmount: '123',
|
|
64
|
-
gasAmountUSD: '123',
|
|
65
|
-
gasPrice: '123',
|
|
66
|
-
gasToken: '123',
|
|
67
|
-
gasUsed: '123',
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
const mockStepTransactionWithTxRequest = (step = (0, fixtures_1.buildStepObject)({
|
|
71
|
-
includingExecution: false,
|
|
72
|
-
})) => ({
|
|
73
|
-
...step,
|
|
74
|
-
transactionRequest: exports.mockTransactionRequest,
|
|
75
|
-
});
|
|
76
|
-
exports.mockStepTransactionWithTxRequest = mockStepTransactionWithTxRequest;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const handlers: import("msw").RestHandler<import("msw/lib/glossary-de6278a9").M<import("msw/lib/glossary-de6278a9").h>>[];
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.handlers = void 0;
|
|
7
|
-
const types_1 = require("@lifi/types");
|
|
8
|
-
const msw_1 = require("msw");
|
|
9
|
-
const ConfigService_1 = __importDefault(require("./ConfigService"));
|
|
10
|
-
const config = ConfigService_1.default.getInstance().getConfig();
|
|
11
|
-
exports.handlers = [
|
|
12
|
-
msw_1.rest.post(`${config.apiUrl}/advanced/routes`, async (request, response, context) => {
|
|
13
|
-
const data = await request.json();
|
|
14
|
-
if (isNaN(parseFloat(data.fromAmount))) {
|
|
15
|
-
return response(context.status(500), context.json({ message: `Oops` }));
|
|
16
|
-
}
|
|
17
|
-
return response(context.json({}));
|
|
18
|
-
}),
|
|
19
|
-
msw_1.rest.post(`${config.apiUrl}/advanced/possibilities`, async (request, response, context) => {
|
|
20
|
-
return response(context.json({}));
|
|
21
|
-
}),
|
|
22
|
-
msw_1.rest.get(`${config.apiUrl}/token`, async (request, response, context) => {
|
|
23
|
-
return response(context.json({}));
|
|
24
|
-
}),
|
|
25
|
-
msw_1.rest.get(`${config.apiUrl}/quote`, async (request, response, context) => {
|
|
26
|
-
return response(context.json({}));
|
|
27
|
-
}),
|
|
28
|
-
msw_1.rest.get(`${config.apiUrl}/status`, async (request, response, context) => {
|
|
29
|
-
return response(context.json({}));
|
|
30
|
-
}),
|
|
31
|
-
msw_1.rest.get(`${config.apiUrl}/chains`, async (request, response, context) => {
|
|
32
|
-
return response(context.json({ chains: [{ id: 1 }] }));
|
|
33
|
-
}),
|
|
34
|
-
msw_1.rest.get(`${config.apiUrl}/tools`, async (request, response, context) => {
|
|
35
|
-
return response(context.json({ bridges: [], exchanges: [] }));
|
|
36
|
-
}),
|
|
37
|
-
msw_1.rest.get(`${config.apiUrl}/tokens`, async (request, response, context) => {
|
|
38
|
-
return response(context.json({
|
|
39
|
-
tokens: {
|
|
40
|
-
[types_1.ChainId.ETH]: [(0, types_1.findDefaultToken)(types_1.CoinKey.ETH, types_1.ChainId.ETH)],
|
|
41
|
-
},
|
|
42
|
-
}));
|
|
43
|
-
}),
|
|
44
|
-
msw_1.rest.post(`${config.apiUrl}/advanced/stepTransaction`, async (request, response, context) => {
|
|
45
|
-
return response(context.json({}));
|
|
46
|
-
}),
|
|
47
|
-
msw_1.rest.get(`${config.apiUrl}/gas/suggestion/${types_1.ChainId.OPT}`, async (request, response, context) => {
|
|
48
|
-
return response(context.json({}));
|
|
49
|
-
}),
|
|
50
|
-
];
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { LifiStep, Route } from '@lifi/types';
|
|
2
|
-
export declare const buildStepObject: ({ includingExecution, }: {
|
|
3
|
-
includingExecution?: boolean | undefined;
|
|
4
|
-
}) => LifiStep;
|
|
5
|
-
export declare const buildRouteObject: ({ step, }: {
|
|
6
|
-
step?: LifiStep | undefined;
|
|
7
|
-
}) => Route;
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file holds generator functions to create objects for testing purposes
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.buildRouteObject = exports.buildStepObject = void 0;
|
|
5
|
-
const types_1 = require("@lifi/types");
|
|
6
|
-
const SOME_TOKEN = {
|
|
7
|
-
...(0, types_1.findDefaultToken)(types_1.CoinKey.USDC, types_1.ChainId.DAI),
|
|
8
|
-
priceUSD: '',
|
|
9
|
-
};
|
|
10
|
-
const SOME_OTHER_TOKEN = {
|
|
11
|
-
...(0, types_1.findDefaultToken)(types_1.CoinKey.USDT, types_1.ChainId.DAI),
|
|
12
|
-
priceUSD: '',
|
|
13
|
-
};
|
|
14
|
-
const SOME_DATE = new Date('2021-04-10').getTime();
|
|
15
|
-
const buildStepObject = ({ includingExecution = true, }) => ({
|
|
16
|
-
id: '8d3a0474-4ee3-4a7a-90c7-2a2264b7f3a9',
|
|
17
|
-
type: 'lifi',
|
|
18
|
-
tool: '1inch',
|
|
19
|
-
toolDetails: {
|
|
20
|
-
key: '1inch',
|
|
21
|
-
name: '1inch',
|
|
22
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.png',
|
|
23
|
-
},
|
|
24
|
-
action: {
|
|
25
|
-
fromChainId: 137,
|
|
26
|
-
toChainId: 137,
|
|
27
|
-
fromToken: SOME_TOKEN,
|
|
28
|
-
toToken: SOME_OTHER_TOKEN,
|
|
29
|
-
fromAmount: '1000000',
|
|
30
|
-
slippage: 0.03,
|
|
31
|
-
fromAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0',
|
|
32
|
-
toAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0',
|
|
33
|
-
},
|
|
34
|
-
estimate: {
|
|
35
|
-
fromAmount: '1000000',
|
|
36
|
-
fromAmountUSD: '100',
|
|
37
|
-
toAmount: '260982615655554',
|
|
38
|
-
toAmountUSD: '26098',
|
|
39
|
-
toAmountMin: '253153137185887',
|
|
40
|
-
approvalAddress: '0x11111112542d85b3ef69ae05771c2dccff4faa26',
|
|
41
|
-
executionDuration: 300,
|
|
42
|
-
tool: '1inch',
|
|
43
|
-
},
|
|
44
|
-
includedSteps: [
|
|
45
|
-
{
|
|
46
|
-
id: 'f8474598-a553-4643-bbd1-bf8c77e679b3',
|
|
47
|
-
type: 'swap',
|
|
48
|
-
action: {
|
|
49
|
-
fromChainId: 137,
|
|
50
|
-
fromAmount: '5000000000000000000',
|
|
51
|
-
fromToken: {
|
|
52
|
-
address: '0x0000000000000000000000000000000000000000',
|
|
53
|
-
chainId: 137,
|
|
54
|
-
symbol: 'MATIC',
|
|
55
|
-
decimals: 18,
|
|
56
|
-
name: 'MATIC',
|
|
57
|
-
priceUSD: '1.124763',
|
|
58
|
-
logoURI: 'https://static.debank.com/image/matic_token/logo_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png',
|
|
59
|
-
coinKey: types_1.CoinKey.MATIC,
|
|
60
|
-
},
|
|
61
|
-
toChainId: 137,
|
|
62
|
-
toToken: {
|
|
63
|
-
address: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f',
|
|
64
|
-
chainId: 137,
|
|
65
|
-
symbol: 'USDT',
|
|
66
|
-
decimals: 6,
|
|
67
|
-
name: '(PoS) Tether USD',
|
|
68
|
-
priceUSD: '1.00081',
|
|
69
|
-
logoURI: 'https://static.debank.com/image/coin/logo_url/usdt/23af7472292cb41dc39b3f1146ead0fe.png',
|
|
70
|
-
coinKey: types_1.CoinKey.USDT,
|
|
71
|
-
},
|
|
72
|
-
slippage: 0.005,
|
|
73
|
-
},
|
|
74
|
-
estimate: {
|
|
75
|
-
tool: '1inch',
|
|
76
|
-
fromAmount: '5000000000000000000',
|
|
77
|
-
toAmount: '5617317',
|
|
78
|
-
toAmountMin: '5589230',
|
|
79
|
-
approvalAddress: '0x1111111254eeb25477b68fb85ed929f73a960582',
|
|
80
|
-
executionDuration: 30,
|
|
81
|
-
feeCosts: [],
|
|
82
|
-
gasCosts: [
|
|
83
|
-
{
|
|
84
|
-
type: 'SEND',
|
|
85
|
-
price: '149725515512',
|
|
86
|
-
estimate: '258059',
|
|
87
|
-
limit: '344079',
|
|
88
|
-
amount: '51517405651853448',
|
|
89
|
-
amountUSD: '0.06',
|
|
90
|
-
token: {
|
|
91
|
-
address: '0x0000000000000000000000000000000000000000',
|
|
92
|
-
chainId: 137,
|
|
93
|
-
symbol: 'MATIC',
|
|
94
|
-
decimals: 18,
|
|
95
|
-
name: 'MATIC',
|
|
96
|
-
priceUSD: '1.124763',
|
|
97
|
-
logoURI: 'https://static.debank.com/image/matic_token/logo_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png',
|
|
98
|
-
coinKey: types_1.CoinKey.MATIC,
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
],
|
|
102
|
-
},
|
|
103
|
-
tool: '1inch',
|
|
104
|
-
toolDetails: {
|
|
105
|
-
key: '1inch',
|
|
106
|
-
name: '1inch',
|
|
107
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.png',
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
],
|
|
111
|
-
execution: includingExecution
|
|
112
|
-
? {
|
|
113
|
-
status: 'PENDING',
|
|
114
|
-
process: [
|
|
115
|
-
{
|
|
116
|
-
type: 'TOKEN_ALLOWANCE',
|
|
117
|
-
startedAt: SOME_DATE,
|
|
118
|
-
message: 'Somethings done',
|
|
119
|
-
status: 'DONE',
|
|
120
|
-
doneAt: SOME_DATE + 10,
|
|
121
|
-
txHash: '0x11111112542d85b3ef69ae05771c2dccff4faa26',
|
|
122
|
-
txLink: 'https://example.com',
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
type: 'SWAP',
|
|
126
|
-
startedAt: SOME_DATE + 20,
|
|
127
|
-
message: 'Somethings pending',
|
|
128
|
-
status: 'PENDING',
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
fromAmount: '1000000',
|
|
132
|
-
toAmount: '261490494702370',
|
|
133
|
-
}
|
|
134
|
-
: undefined,
|
|
135
|
-
});
|
|
136
|
-
exports.buildStepObject = buildStepObject;
|
|
137
|
-
const buildRouteObject = ({ step = (0, exports.buildStepObject)({}), }) => ({
|
|
138
|
-
id: '0x433df53dbf6dbd7b946fc4f3b501c3ff32957d77d96c9d5ba1805b01eb6461cc',
|
|
139
|
-
fromChainId: 137,
|
|
140
|
-
fromAmountUSD: '1.00',
|
|
141
|
-
fromAmount: '1000000',
|
|
142
|
-
fromToken: SOME_TOKEN,
|
|
143
|
-
fromAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0',
|
|
144
|
-
toChainId: 137,
|
|
145
|
-
toAmountUSD: '1.00',
|
|
146
|
-
toAmount: '260982615655554',
|
|
147
|
-
toAmountMin: '253153137185887',
|
|
148
|
-
toToken: SOME_OTHER_TOKEN,
|
|
149
|
-
toAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0',
|
|
150
|
-
gasCostUSD: '0.01',
|
|
151
|
-
steps: [step],
|
|
152
|
-
insurance: {
|
|
153
|
-
feeAmountUsd: '0',
|
|
154
|
-
state: 'NOT_INSURABLE',
|
|
155
|
-
},
|
|
156
|
-
});
|
|
157
|
-
exports.buildRouteObject = buildRouteObject;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const lifiHandlers: import("msw").RestHandler<import("msw/lib/glossary-de6278a9").M<import("msw/lib/glossary-de6278a9").h>>[];
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { rest } from 'msw';
|
|
2
|
-
import { mockStepTransactionWithTxRequest, mockChainsResponse, mockStatus, } from './RouteExecutionManager.unit.mock';
|
|
3
|
-
import ConfigService from '../services/ConfigService';
|
|
4
|
-
import { buildStepObject } from '../../test/fixtures';
|
|
5
|
-
const config = ConfigService.getInstance().getConfig();
|
|
6
|
-
export const lifiHandlers = [
|
|
7
|
-
rest.post(`${config.apiUrl}/advanced/stepTransaction`, async (_, response, context) => response(context.status(200), context.json(mockStepTransactionWithTxRequest(buildStepObject({
|
|
8
|
-
includingExecution: true,
|
|
9
|
-
}))))),
|
|
10
|
-
rest.get(`${config.apiUrl}/chains`, async (_, response, context) => response(context.status(200), context.json({
|
|
11
|
-
chains: mockChainsResponse,
|
|
12
|
-
}))),
|
|
13
|
-
rest.get(`${config.apiUrl}/status`, async (_, response, context) => response(context.status(200), context.json(mockStatus))),
|
|
14
|
-
];
|