@skip-go/client 1.5.2 → 1.5.3-alpha.1
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/api/getAssets.cjs +5 -5
- package/dist/cjs/api/getAssetsBetweenChains.cjs +4 -4
- package/dist/cjs/api/getBridges.cjs +4 -4
- package/dist/cjs/api/getChains.cjs +4 -4
- package/dist/cjs/api/getVenues.cjs +4 -4
- package/dist/cjs/api/postAssetsFromSource.cjs +5 -5
- package/dist/cjs/api/postBalances.cjs +4 -4
- package/dist/cjs/api/postIbcOriginAssets.cjs +4 -4
- package/dist/cjs/api/postMessages.cjs +4 -4
- package/dist/cjs/api/postMessagesDirect.cjs +4 -4
- package/dist/cjs/api/postRecommendAssets.cjs +4 -4
- package/dist/cjs/api/postRoute.cjs +4 -4
- package/dist/cjs/api/postSubmitTransaction.cjs +4 -4
- package/dist/cjs/api/postTrackTransaction.cjs +4 -4
- package/dist/cjs/api/postTransactionStatus.cjs +4 -4
- package/dist/cjs/{chunk-EI4ZWAEU.cjs → chunk-262HFM6V.cjs} +2 -2
- package/dist/cjs/{chunk-XPQRSO4J.cjs → chunk-3NHW3XWK.cjs} +2 -2
- package/dist/cjs/{chunk-XEBVLUYW.cjs → chunk-4MV4GLIA.cjs} +2 -2
- package/dist/cjs/{chunk-MHVCR4QO.cjs → chunk-4NGHNHAS.cjs} +6 -6
- package/dist/cjs/{chunk-3IWLZ562.cjs → chunk-7SZZBUBD.cjs} +3 -3
- package/dist/cjs/{chunk-LARLMUFZ.cjs → chunk-APJDSXWR.cjs} +10 -10
- package/dist/cjs/{chunk-R3TSJPKH.cjs → chunk-AW6IQ7JH.cjs} +2 -2
- package/dist/cjs/{chunk-7D433NQ5.cjs → chunk-BCX2D6TE.cjs} +91 -18
- package/dist/cjs/{chunk-JUKPQLLQ.cjs → chunk-FF5UWES6.cjs} +4 -4
- package/dist/cjs/{chunk-MMGVGXA5.cjs → chunk-HFEMNOJS.cjs} +7 -1
- package/dist/cjs/{chunk-HEYFLFKD.cjs → chunk-I2FDWZZJ.cjs} +810 -109
- package/dist/cjs/{chunk-MFJ6S6TL.cjs → chunk-JWWJIJUE.cjs} +2 -2
- package/dist/cjs/{chunk-5RP766TT.cjs → chunk-KWH6S7PB.cjs} +6 -6
- package/dist/cjs/{chunk-GO4BJ6G2.cjs → chunk-NWD4MAMT.cjs} +14 -8
- package/dist/cjs/{chunk-66VIHDGM.cjs → chunk-PDTIT3JO.cjs} +13 -13
- package/dist/cjs/{chunk-2MAYN27U.cjs → chunk-PLO5CVGN.cjs} +2 -2
- package/dist/cjs/{chunk-5HZLL5KD.cjs → chunk-QAHHTQ7V.cjs} +4 -4
- package/dist/cjs/{chunk-AJYZ5GAD.cjs → chunk-RBM66GW6.cjs} +2 -2
- package/dist/cjs/{chunk-ULD54VE4.cjs → chunk-RC73RNNQ.cjs} +4 -4
- package/dist/cjs/{chunk-N2RG3CRN.cjs → chunk-S3BKLN4L.cjs} +2 -2
- package/dist/cjs/{chunk-KPV3PGBG.cjs → chunk-T5EGKQAT.cjs} +2 -2
- package/dist/cjs/chunk-UMBMSRZZ.cjs +185 -0
- package/dist/cjs/{chunk-4R6OCWRR.cjs → chunk-WKYP2NMS.cjs} +8 -6
- package/dist/cjs/{chunk-VMWCRZVT.cjs → chunk-XCFPRLX3.cjs} +8 -8
- package/dist/cjs/{chunk-XDKONUY6.cjs → chunk-ZBJZTBIW.cjs} +2 -2
- package/dist/cjs/index.cjs +189 -251
- package/dist/cjs/public-functions/executeMultipleRoutes.cjs +27 -17
- package/dist/cjs/public-functions/executeRoute.cjs +27 -17
- package/dist/cjs/public-functions/getEvmGasAmountForMessage.cjs +1 -1
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +6 -7
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +8 -9
- package/dist/cjs/public-functions/getRouteWithGasOnReceive.cjs +39 -0
- package/dist/cjs/public-functions/getSigningStargateClient.cjs +6 -6
- package/dist/cjs/public-functions/setApiOptions.cjs +4 -4
- package/dist/cjs/public-functions/setClientOptions.cjs +5 -5
- package/dist/cjs/public-functions/subscribeToRouteStatus.cjs +9 -9
- package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +8 -8
- package/dist/cjs/public-functions/waitForTransaction.cjs +6 -6
- package/dist/esm/api/getAssets.d.ts +1 -1
- package/dist/esm/api/getAssets.js +3 -3
- package/dist/esm/api/getAssetsBetweenChains.d.ts +21 -21
- package/dist/esm/api/getAssetsBetweenChains.js +3 -3
- package/dist/esm/api/getBridges.d.ts +1 -1
- package/dist/esm/api/getBridges.js +3 -3
- package/dist/esm/api/getChains.d.ts +1 -1
- package/dist/esm/api/getChains.js +3 -3
- package/dist/esm/api/getVenues.js +3 -3
- package/dist/esm/api/postAssetsFromSource.d.ts +1 -1
- package/dist/esm/api/postAssetsFromSource.js +4 -4
- package/dist/esm/api/postBalances.d.ts +2 -2
- package/dist/esm/api/postBalances.js +3 -3
- package/dist/esm/api/postIbcOriginAssets.d.ts +10 -10
- package/dist/esm/api/postIbcOriginAssets.js +3 -3
- package/dist/esm/api/postMessages.d.ts +12 -12
- package/dist/esm/api/postMessages.js +3 -3
- package/dist/esm/api/postMessagesDirect.d.ts +163 -161
- package/dist/esm/api/postMessagesDirect.js +3 -3
- package/dist/esm/api/postRecommendAssets.d.ts +11 -11
- package/dist/esm/api/postRecommendAssets.js +3 -3
- package/dist/esm/api/postRoute.d.ts +161 -159
- package/dist/esm/api/postRoute.js +3 -3
- package/dist/esm/api/postSubmitTransaction.d.ts +2 -2
- package/dist/esm/api/postSubmitTransaction.js +3 -3
- package/dist/esm/api/postTrackTransaction.d.ts +2 -2
- package/dist/esm/api/postTrackTransaction.js +3 -3
- package/dist/esm/api/postTransactionStatus.d.ts +36 -36
- package/dist/esm/api/postTransactionStatus.js +3 -3
- package/dist/esm/{callbacks-DCqqd0D9.d.ts → callbacks-C-KUJnDv.d.ts} +34 -4
- package/dist/esm/{chunk-GU3UHER5.js → chunk-2PWROHHX.js} +3 -3
- package/dist/esm/{chunk-MFHZBJGQ.js → chunk-3WFXBPS2.js} +1 -1
- package/dist/esm/{chunk-B36HVX2L.js → chunk-44IX6KPJ.js} +1 -1
- package/dist/esm/{chunk-WSAZDCXR.js → chunk-5IXH2QPF.js} +86 -16
- package/dist/esm/{chunk-Z2HSHJLW.js → chunk-6M7N6EAO.js} +3 -3
- package/dist/esm/{chunk-6HKZYODA.js → chunk-AUNRER4I.js} +1 -1
- package/dist/esm/{chunk-H2HTF2UF.js → chunk-FNTPI2AV.js} +1 -1
- package/dist/esm/{chunk-W5AA7QOQ.js → chunk-HDW6XFWX.js} +1 -1
- package/dist/esm/{chunk-RXZJUE4K.js → chunk-HELQO7PA.js} +2 -2
- package/dist/esm/{chunk-45B6E7AT.js → chunk-IHSSWY3M.js} +1 -1
- package/dist/esm/{chunk-JQOJIEZA.js → chunk-IKWC55JU.js} +739 -60
- package/dist/esm/{chunk-VQ5SIQWU.js → chunk-JYYCFKB4.js} +8 -7
- package/dist/esm/chunk-KNXMSLOB.js +1 -1
- package/dist/esm/{chunk-HPA2XUA3.js → chunk-KXQ2ASHQ.js} +1 -1
- package/dist/esm/{chunk-263RYJUL.js → chunk-MYGJGC62.js} +1 -1
- package/dist/esm/chunk-O4J7DHZA.js +180 -0
- package/dist/esm/{chunk-BNMWBXN3.js → chunk-QRKO56DH.js} +9 -4
- package/dist/esm/{chunk-VG3G5QHN.js → chunk-RFJYCJK4.js} +1 -1
- package/dist/esm/{chunk-A4MFVNZO.js → chunk-SFWTQBQT.js} +3 -3
- package/dist/esm/{chunk-7WXPBTSR.js → chunk-TNIGHYH2.js} +3 -3
- package/dist/esm/{chunk-EJZGYHGH.js → chunk-UBVBVJPY.js} +1 -1
- package/dist/esm/chunk-UIDIKXMB.js +1 -1
- package/dist/esm/{chunk-DQXGZGNJ.js → chunk-V7VKYD4J.js} +2 -2
- package/dist/esm/{chunk-X3PQKUOS.js → chunk-VGCTTJO7.js} +7 -1
- package/dist/esm/{chunk-TLVHKYQ3.js → chunk-VWOMKMH2.js} +1 -1
- package/dist/esm/{chunk-AGHQ7SIE.js → chunk-YGQ4NKTM.js} +1 -1
- package/dist/esm/{chunk-A35RPDUV.js → chunk-YLVUKXLR.js} +1 -1
- package/dist/esm/{client-types-BSZasIDd.d.ts → client-types-CGMuZ3zo.d.ts} +2 -2
- package/dist/esm/{generateApi-CwM4Ca30.d.ts → generateApi-D_-Gso-x.d.ts} +1 -1
- package/dist/esm/index.d.ts +166 -143
- package/dist/esm/index.js +26 -175
- package/dist/esm/public-functions/executeMultipleRoutes.d.ts +30 -10
- package/dist/esm/public-functions/executeMultipleRoutes.js +26 -16
- package/dist/esm/public-functions/executeRoute.d.ts +4 -4
- package/dist/esm/public-functions/executeRoute.js +26 -16
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.d.ts +1 -1
- package/dist/esm/public-functions/getEvmGasAmountForMessage.d.ts +3 -3
- package/dist/esm/public-functions/getEvmGasAmountForMessage.js +1 -1
- package/dist/esm/public-functions/getFeeInfoForChain.d.ts +1 -1
- package/dist/esm/public-functions/getFeeInfoForChain.js +5 -6
- package/dist/esm/public-functions/getRecommendedGasPrice.js +7 -8
- package/dist/esm/public-functions/getRouteWithGasOnReceive.d.ts +20 -0
- package/dist/esm/public-functions/getRouteWithGasOnReceive.js +30 -0
- package/dist/esm/public-functions/getSigningStargateClient.js +5 -5
- package/dist/esm/public-functions/setApiOptions.d.ts +1 -1
- package/dist/esm/public-functions/setApiOptions.js +3 -3
- package/dist/esm/public-functions/setClientOptions.d.ts +4 -4
- package/dist/esm/public-functions/setClientOptions.js +4 -4
- package/dist/esm/public-functions/subscribeToRouteStatus.d.ts +4 -4
- package/dist/esm/public-functions/subscribeToRouteStatus.js +5 -5
- package/dist/esm/public-functions/validateCosmosGasBalance.d.ts +4 -4
- package/dist/esm/public-functions/validateCosmosGasBalance.js +7 -7
- package/dist/esm/public-functions/waitForTransaction.d.ts +38 -38
- package/dist/esm/public-functions/waitForTransaction.js +5 -5
- package/dist/esm/setClientOptions-C8g92xTm.d.ts +76 -0
- package/dist/esm/{swaggerTypes-Bh6hu5Q-.d.ts → swaggerTypes-B_jKfpvz.d.ts} +154 -132
- package/package.json +1 -1
- package/dist/cjs/chunk-D57TNRV3.cjs +0 -214
- package/dist/cjs/chunk-KSJ5QYMR.cjs +0 -185
- package/dist/cjs/chunk-KZOSEIWH.cjs +0 -10
- package/dist/cjs/chunk-Q33F7U2Y.cjs +0 -55
- package/dist/esm/chunk-4YTLUDRU.js +0 -212
- package/dist/esm/chunk-CP55HI6R.js +0 -53
- package/dist/esm/chunk-RHGDUD76.js +0 -180
- package/dist/esm/chunk-SWYON2RG.js +0 -7
- package/dist/esm/setClientOptions-CrXIODm0.d.ts +0 -19
- package/dist/cjs/{chunk-IDDRJJO5.cjs → chunk-DLT6Q6RB.cjs} +1 -1
- package/dist/esm/{chunk-OQDBWVET.js → chunk-QL423UEF.js} +1 -1
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkHEYFLFKD_cjs = require('./chunk-HEYFLFKD.cjs');
|
|
4
|
-
var chunk7D433NQ5_cjs = require('./chunk-7D433NQ5.cjs');
|
|
5
|
-
var chunkXPQRSO4J_cjs = require('./chunk-XPQRSO4J.cjs');
|
|
6
|
-
var chunk2MAYN27U_cjs = require('./chunk-2MAYN27U.cjs');
|
|
7
|
-
var chunkMMGVGXA5_cjs = require('./chunk-MMGVGXA5.cjs');
|
|
8
|
-
require('uuid');
|
|
9
|
-
|
|
10
|
-
var executeMultipleRoutes = async (options) => {
|
|
11
|
-
const {
|
|
12
|
-
route,
|
|
13
|
-
userAddresses,
|
|
14
|
-
appendCosmosMsgs,
|
|
15
|
-
postRouteHandler,
|
|
16
|
-
slippageTolerancePercent,
|
|
17
|
-
...restOptions
|
|
18
|
-
} = options;
|
|
19
|
-
const addressList = {};
|
|
20
|
-
for (const [routeKey, routeValue] of Object.entries(route)) {
|
|
21
|
-
const _userAddresses = userAddresses[routeKey];
|
|
22
|
-
if (_userAddresses === void 0) {
|
|
23
|
-
throw new Error(
|
|
24
|
-
`executeMultipleRoutes error: no user addresses found for route: ${routeKey}`
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
const routeAddressList = await chunkHEYFLFKD_cjs.createValidAddressList({
|
|
28
|
-
userAddresses: _userAddresses,
|
|
29
|
-
route: routeValue
|
|
30
|
-
});
|
|
31
|
-
addressList[routeKey] = routeAddressList;
|
|
32
|
-
}
|
|
33
|
-
const msgsResponses = await Promise.all(
|
|
34
|
-
Object.entries(route).map(async ([routeKey, routeValue]) => {
|
|
35
|
-
const routeAddressList = addressList[routeKey];
|
|
36
|
-
if (routeAddressList === void 0) {
|
|
37
|
-
throw new Error(
|
|
38
|
-
`executeMultipleRoutes error: address list not found for route ${routeKey}`
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
return await chunkXPQRSO4J_cjs.messages({
|
|
42
|
-
timeoutSeconds: options.timeoutSeconds,
|
|
43
|
-
amountIn: routeValue?.amountIn,
|
|
44
|
-
amountOut: routeValue.estimatedAmountOut || "0",
|
|
45
|
-
sourceAssetChainId: routeValue?.sourceAssetChainId,
|
|
46
|
-
sourceAssetDenom: routeValue?.sourceAssetDenom,
|
|
47
|
-
destAssetChainId: routeValue?.destAssetChainId,
|
|
48
|
-
destAssetDenom: routeValue?.destAssetDenom,
|
|
49
|
-
operations: routeValue?.operations,
|
|
50
|
-
addressList: routeAddressList,
|
|
51
|
-
slippageTolerancePercent: slippageTolerancePercent?.[routeKey] || "1",
|
|
52
|
-
chainIdsToAffiliates: chunkMMGVGXA5_cjs.ApiState.chainIdsToAffiliates,
|
|
53
|
-
postRouteHandler: postRouteHandler?.[routeKey],
|
|
54
|
-
feePayerAddress: options.svmFeePayer?.address
|
|
55
|
-
});
|
|
56
|
-
})
|
|
57
|
-
);
|
|
58
|
-
let msgsRecord = {};
|
|
59
|
-
msgsResponses.forEach((msg, index2) => {
|
|
60
|
-
const routeKey = Object.keys(route)[index2];
|
|
61
|
-
if (!routeKey) {
|
|
62
|
-
throw new Error(
|
|
63
|
-
`executeMultipleRoutes error: route key not found for index ${index2}`
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
const addedCosmosMsgs = appendCosmosMsgs?.[routeKey];
|
|
67
|
-
if (addedCosmosMsgs) {
|
|
68
|
-
Object.entries(addedCosmosMsgs).forEach(([chainId, msgs]) => {
|
|
69
|
-
const txIndex = msg?.txs?.findIndex(
|
|
70
|
-
(tx2) => "cosmosTx" in tx2 && tx2.cosmosTx.chainId === chainId
|
|
71
|
-
);
|
|
72
|
-
if (txIndex === void 0 || txIndex === -1) return;
|
|
73
|
-
const tx = msg?.txs?.[txIndex];
|
|
74
|
-
if (tx && "cosmosTx" in tx) {
|
|
75
|
-
tx.cosmosTx.msgs?.unshift(...msgs);
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
msgsRecord[routeKey] = msg;
|
|
80
|
-
});
|
|
81
|
-
let transferIndexToRouteKey = void 0;
|
|
82
|
-
const cosmosTxIndex0Map = /* @__PURE__ */ new Map();
|
|
83
|
-
let transferIndex = 0;
|
|
84
|
-
for (const [routeKey, msgs] of Object.entries(msgsRecord)) {
|
|
85
|
-
const firstTx = msgs?.txs?.[0];
|
|
86
|
-
if (firstTx && "cosmosTx" in firstTx) {
|
|
87
|
-
const { chainId, msgs: firstTxMsgs } = firstTx.cosmosTx;
|
|
88
|
-
if (!transferIndexToRouteKey) {
|
|
89
|
-
transferIndexToRouteKey = {};
|
|
90
|
-
}
|
|
91
|
-
transferIndexToRouteKey[transferIndex] = routeKey;
|
|
92
|
-
transferIndex++;
|
|
93
|
-
if (!cosmosTxIndex0Map.has(chainId)) {
|
|
94
|
-
cosmosTxIndex0Map.set(chainId, {
|
|
95
|
-
routeKey,
|
|
96
|
-
firstCosmosTx: firstTx.cosmosTx
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
const existing = cosmosTxIndex0Map.get(chainId);
|
|
100
|
-
if (existing && firstTxMsgs) {
|
|
101
|
-
const modifyTarget = msgsRecord[existing.routeKey]?.txs?.[0];
|
|
102
|
-
if (modifyTarget && "cosmosTx" in modifyTarget) {
|
|
103
|
-
modifyTarget.cosmosTx.msgs?.push(...firstTxMsgs);
|
|
104
|
-
msgsRecord[routeKey]?.txs?.shift();
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
Object.entries(msgsRecord).forEach(([routeKey, msgs]) => {
|
|
111
|
-
if (msgs?.txs?.length === 0) {
|
|
112
|
-
delete msgsRecord[routeKey];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
let mainRouteId = void 0;
|
|
116
|
-
let msgsRecordIndexToRouteId = {};
|
|
117
|
-
let index = 0;
|
|
118
|
-
const transactionDetailsList = {};
|
|
119
|
-
const executeTransactionList = {};
|
|
120
|
-
const mergedMainAndSecondaryRoutes = Object.entries(msgsRecord).length !== Object.entries(route).length;
|
|
121
|
-
for (const [routeKey, msgsResponse] of Object.entries(msgsRecord)) {
|
|
122
|
-
const { id: routeId } = chunk7D433NQ5_cjs.updateRouteDetails({
|
|
123
|
-
status: "unconfirmed",
|
|
124
|
-
options: {
|
|
125
|
-
route: route[routeKey],
|
|
126
|
-
...restOptions
|
|
127
|
-
},
|
|
128
|
-
mainRouteId,
|
|
129
|
-
transferIndexToRouteKey
|
|
130
|
-
});
|
|
131
|
-
msgsRecordIndexToRouteId[index] = routeId;
|
|
132
|
-
if (routeKey === "mainRoute") {
|
|
133
|
-
mainRouteId = routeId;
|
|
134
|
-
}
|
|
135
|
-
const { transactionDetails, executeTransaction: _executeTransaction } = await chunkHEYFLFKD_cjs.executeTransactions({
|
|
136
|
-
...restOptions,
|
|
137
|
-
routeId,
|
|
138
|
-
txs: msgsResponse?.txs,
|
|
139
|
-
route: route[routeKey],
|
|
140
|
-
userAddresses: userAddresses[routeKey],
|
|
141
|
-
isMultiRoutes: true
|
|
142
|
-
});
|
|
143
|
-
const executeTransaction = async (index2) => {
|
|
144
|
-
const txResult = await _executeTransaction(index2);
|
|
145
|
-
if (routeKey !== "mainRoute" || mergedMainAndSecondaryRoutes) {
|
|
146
|
-
const relatedRoutes = Object.entries(route).filter(([key]) => key !== "mainRoute").map(([key, route2]) => ({ route: route2, routeKey: key, status: "pending" }));
|
|
147
|
-
chunk7D433NQ5_cjs.updateRouteDetails({
|
|
148
|
-
options: {
|
|
149
|
-
route: route[routeKey],
|
|
150
|
-
...restOptions
|
|
151
|
-
},
|
|
152
|
-
routeId: mainRouteId,
|
|
153
|
-
transferIndexToRouteKey,
|
|
154
|
-
relatedRoutes
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
return txResult;
|
|
158
|
-
};
|
|
159
|
-
if (transactionDetails[0]?.chainType === "evm" /* Evm */) {
|
|
160
|
-
for (const [index2, transactionDetail] of transactionDetails.entries()) {
|
|
161
|
-
const txResult = await executeTransaction(index2);
|
|
162
|
-
if (txResult.txHash) {
|
|
163
|
-
const trackResponse = await chunk2MAYN27U_cjs.trackTransaction({
|
|
164
|
-
chainId: transactionDetail.chainId,
|
|
165
|
-
txHash: txResult.txHash,
|
|
166
|
-
...options.trackTxPollingOptions
|
|
167
|
-
});
|
|
168
|
-
await options?.onTransactionTracked?.({
|
|
169
|
-
txHash: txResult.txHash,
|
|
170
|
-
chainId: transactionDetail.chainId,
|
|
171
|
-
explorerLink: trackResponse.explorerLink
|
|
172
|
-
});
|
|
173
|
-
transactionDetail.txHash = txResult.txHash;
|
|
174
|
-
transactionDetail.explorerLink = trackResponse.explorerLink;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
} else {
|
|
178
|
-
executeTransactionList[index] = executeTransaction;
|
|
179
|
-
}
|
|
180
|
-
transactionDetailsList[index] = transactionDetails;
|
|
181
|
-
index++;
|
|
182
|
-
}
|
|
183
|
-
await Promise.all(
|
|
184
|
-
Object.entries(msgsRecord).map(([routeKey, msgsResponse], index2) => {
|
|
185
|
-
return chunk7D433NQ5_cjs.executeAndSubscribeToRouteStatus({
|
|
186
|
-
transactionDetails: transactionDetailsList[index2],
|
|
187
|
-
executeTransaction: executeTransactionList[index2],
|
|
188
|
-
routeId: msgsRecordIndexToRouteId[index2],
|
|
189
|
-
options: {
|
|
190
|
-
route: route[routeKey],
|
|
191
|
-
userAddresses: userAddresses[routeKey],
|
|
192
|
-
...restOptions,
|
|
193
|
-
onRouteStatusUpdated: (routeStatus) => {
|
|
194
|
-
const relatedRoutes = Object.entries(route).filter(([key]) => key !== "mainRoute").map(([key, route2]) => ({ route: route2, routeKey: key, status: routeStatus.status }));
|
|
195
|
-
if (routeKey !== "mainRoute") {
|
|
196
|
-
chunk7D433NQ5_cjs.updateRouteDetails({
|
|
197
|
-
options: {
|
|
198
|
-
route: route[routeKey],
|
|
199
|
-
...restOptions
|
|
200
|
-
},
|
|
201
|
-
routeId: mainRouteId,
|
|
202
|
-
transferIndexToRouteKey,
|
|
203
|
-
relatedRoutes
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
options.onRouteStatusUpdated?.(routeStatus);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
})
|
|
211
|
-
);
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
exports.executeMultipleRoutes = executeMultipleRoutes;
|