@rash2x/bridge-widget 0.6.64 → 0.6.66
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/evaa-bridge.cjs +1 -1
- package/dist/evaa-bridge.mjs +1 -1
- package/dist/{index-BEeiBKNi.js → index-Bf7M_Hjm.js} +80 -32
- package/dist/index-Bf7M_Hjm.js.map +1 -0
- package/dist/{index-BuYPjNSX.cjs → index-DJrg5YQY.cjs} +2 -2
- package/dist/{index-BuYPjNSX.cjs.map → index-DJrg5YQY.cjs.map} +1 -1
- package/dist/{index-7Pgd_WWn.js → index-PB3n7I7m.js} +2 -2
- package/dist/{index-7Pgd_WWn.js.map → index-PB3n7I7m.js.map} +1 -1
- package/dist/{index-DYJQfOaf.cjs → index-XPQb2NSf.cjs} +80 -32
- package/dist/index-XPQb2NSf.cjs.map +1 -0
- package/dist/index.d.ts +8 -2
- package/package.json +1 -1
- package/dist/index-BEeiBKNi.js.map +0 -1
- package/dist/index-DYJQfOaf.cjs.map +0 -1
|
@@ -35,7 +35,7 @@ const reactWindow = require("react-window");
|
|
|
35
35
|
const common$1 = { "connecting": "Connecting…", "initializing": "Initializing...", "loading": "Loading...", "paste": "paste", "close": "Close", "zeroPlaceholder": "0", "nativeToken": "Native Token" };
|
|
36
36
|
const wallets$1 = { "addTonWallet": "Add TON wallet", "addEvmWallet": "Add EVM wallet", "connectTonWallet": "Connect TON wallet", "connectEvmWallet": "Connect EVM wallet", "initializingMetamask": "Initializing MetaMask SDK...", "initializingTronlink": "Initializing TronLink...", "failedToConnectTon": "Failed to connect to TON wallet", "failedToDisconnect": "Failed to disconnect", "metamaskConnectionError": "MetaMask connection error", "failedToConnectMetamask": "Failed to connect to MetaMask", "failedToDisconnectMetamask": "Failed to disconnect from MetaMask", "selectWallet": "Select Wallet", "tonWallets": "TON", "evmWallets": "EVM", "tronWallets": "TRON", "tonconnect": "TonConnect", "metaMask": "WalletConnect", "walletConnect": "WalletConnect", "tronLink": "TronLink", "addTronWallet": "Add Tron wallet", "comingSoon": "Coming Soon", "connected": "CONNECTED", "connectedStatus": "Connected", "disconnect": "Disconnect", "chooseWallet": "Connect wallet", "oneWalletPerEnv": "You can only connect one wallet per environment.", "connect": "Connect", "connectTronWallet": "Connect Tron wallet", "connectWallet": "Connect wallet" };
|
|
37
37
|
const bridge$1 = { "max": "Max", "sourceNetwork": "Source network", "destinationNetwork": "Destination network", "selectToken": "Select token", "selectNetwork": "Select network", "selectSourceNetwork": "Select source network", "selectDestinationNetwork": "Select destination network", "searchToken": "Search token", "myTokens": "My tokens", "allTokens": "All tokens", "search": "Search", "select": "Select", "willChangeSourceChain": "Will change source network", "willChangeSourceNetworkAndToken": "Will change source token", "noBalancesFound": "No balances found.", "noResults": "No results", "tokenNotFound": "We couldn't find a token with that name or symbol. Please try again.", "chainNotFound": "We couldn't find a chain with that name. Please try again.", "sendToAnotherAddress": "Send to another address", "youWillReceive": "You will receive", "anotherAddressPlaceholder": "Address", "addressDoesntMatch": "Address doesn't match the {{network}} network", "checkBeforeTransfer": "Check correctness before transfer" };
|
|
38
|
-
const transaction$1 = { "enterAmount": "Enter amount", "transfer": "Transfer", "getQuote": "Get quote", "failed": "Transaction Failed", "confirm": "Confirm transaction", "signTransaction": "Sign in transaction in wallet", "quoting": "Quoting...", "inProgress": "Transaction in progress...", "checkingBalance": "Checking balance...", "insufficientBalance": "Insufficient balance", "amountTooSmall": "Min {{min}}", "amountTooLarge": "Max {{max}}", "success": "Success", "successTitle": "Success", "done": "Done", "hashCopied": "Hash copied to clipboard", "bridged": "Bridged", "transferTitle": "Transfer", "hash": "Hash", "layerzeroScan": "TxHash", "finalFee": "Final Fee", "route": "Route", "estTime": "Est. Time", "slippage": "Slippage", "minimumReceived": "Minimum received", "totalFee": "Total Fee", "noRouteFound": "No route found", "notEnoughGas": "Not enough gas", "pasteAddressToTransfer": "Paste address to transfer", "noRouteFoundForSettings": "No route found for current settings.", "tryAdjustSettings": "Try disabling Gas on Destination, or adjust amount/networks.", "quoteError": "Quote error", "steps": { "sent": "Sent", "processing": "Processing", "processingNote": "Up to 2 minutes", "completed": "Completed" } };
|
|
38
|
+
const transaction$1 = { "enterAmount": "Enter amount", "transfer": "Transfer", "getQuote": "Get quote", "failed": "Transaction Failed", "confirm": "Confirm transaction", "signTransaction": "Sign in transaction in wallet", "quoting": "Quoting...", "inProgress": "Transaction in progress...", "checkingBalance": "Checking balance...", "insufficientBalance": "Insufficient balance", "amountTooSmall": "Min {{min}}", "amountTooLarge": "Max {{max}}", "success": "Success", "successTitle": "Success", "done": "Done", "hashCopied": "Hash copied to clipboard", "bridged": "Bridged", "transferTitle": "Transfer", "hash": "Hash", "layerzeroScan": "TxHash", "finalFee": "Final Fee", "route": "Route", "estTime": "Est. Time", "slippage": "Slippage", "minimumReceived": "Minimum received", "totalFee": "Total Fee", "noRouteFound": "No route found", "notEnoughGas": "Not enough gas", "pasteAddressToTransfer": "Paste address to transfer", "noRouteFoundForSettings": "No route found for current settings.", "tryAdjustSettings": "Try disabling Gas on Destination, or adjust amount/networks.", "quoteError": "Quote error", "steps": { "sent": "Sent", "approving": "Approving Token", "approvingNote": "Step {{current}} of {{total}}: Confirm approval in wallet", "bridging": "Bridging", "processing": "Processing", "processingNote": "Up to 2 minutes", "completed": "Completed" } };
|
|
39
39
|
const telegram$1 = { "openWebVersion": "Open EVAA Web to Bridge", "restrictionMessage": "You can bridge between the chosen networks on EVAA web version" };
|
|
40
40
|
const app$1 = { "stargateWidgetName": "Stargate Bridge Widget", "liveWidget": "Live Widget", "getStarted": "Get Started" };
|
|
41
41
|
const settings$1 = { "title": "Settings", "gasOnDestination": "Gas on destination", "gasOnDestinationDescription": "The default amount allows you to perform a couple of transactions (e.g. Approve and Swap).", "slippageTolerance": "Slippage tolerance", "slippageToleranceDescription": "Your transaction will revert if the amount you're receiving is outside of this tolerance", "routePriority": "Route Priority", "routePriorityDescription": "Choose how your transfer is routed. Recommended picks the best overall path for cost. Fastest prioritizes speed above all else.", "highSlippageWarning": "High slippage warning", "gasPresets": { "auto": "Auto", "none": "None", "medium": "Medium", "max": "Max" }, "routePresets": { "fastest": "Fastest", "cheapest": "Cheapest", "recommended": "Recommended" } };
|
|
@@ -53,7 +53,7 @@ const en$3 = {
|
|
|
53
53
|
const common = { "connecting": "Подключение…", "initializing": "Инициализация...", "loading": "Загрузка...", "paste": "вставить", "close": "Закрыть", "zeroPlaceholder": "0", "nativeToken": "Нативный токен" };
|
|
54
54
|
const wallets = { "addTonWallet": "Добавить TON кошелёк", "addEvmWallet": "Добавить EVM кошелёк", "connectTonWallet": "Подключить TON кошелёк", "connectEvmWallet": "Подключить EVM кошелёк", "initializingMetamask": "Инициализация MetaMask SDK...", "initializingTronlink": "Инициализация TronLink...", "failedToConnectTon": "Не удалось подключиться к TON кошельку", "failedToDisconnect": "Не удалось отключиться", "metamaskConnectionError": "Ошибка подключения MetaMask", "failedToConnectMetamask": "Не удалось подключиться к MetaMask", "failedToDisconnectMetamask": "Не удалось отключиться от MetaMask", "selectWallet": "Выберите кошелёк", "tonWallets": "TON", "evmWallets": "EVM", "tronWallets": "TRON", "tonconnect": "TonConnect", "metaMask": "WalletConnect", "walletConnect": "WalletConnect", "tronLink": "TronLink", "addTronWallet": "Добавить Tron кошелёк", "comingSoon": "Скоро", "connected": "ПОДКЛЮЧЕНО", "connectedStatus": "Подключён", "disconnect": "Отключить", "chooseWallet": "Подключите кошелек", "oneWalletPerEnv": "Можно подключить только один кошелёк на окружение.", "connect": "Подключить", "connectTronWallet": "Подключить Tron кошелёк", "connectWallet": "Подключить кошелёк" };
|
|
55
55
|
const bridge = { "max": "Макс", "sourceNetwork": "Исходная сеть", "destinationNetwork": "Целевая сеть", "selectToken": "Выбрать токен", "selectNetwork": "Выбрать сеть", "selectSourceNetwork": "Выбрать исходную сеть", "selectDestinationNetwork": "Выбрать целевую сеть", "searchToken": "Поиск токена", "myTokens": "Мои токены", "allTokens": "Все токены", "search": "Поиск", "select": "Выбрать", "willChangeSourceChain": "Сменит исходную сеть", "willChangeSourceNetworkAndToken": "Сменит исходный токен", "noBalancesFound": "Балансы не найдены.", "noResults": "Нет результатов", "tokenNotFound": "Мы не смогли найти токен с таким названием или символом. Пожалуйста, попробуйте снова.", "chainNotFound": "Мы не смогли найти сеть с таким названием. Пожалуйста, попробуйте снова.", "sendToAnotherAddress": "Отправить на другой адрес", "youWillReceive": "Вы получите", "anotherAddressPlaceholder": "Адрес", "addressDoesntMatch": "Адрес не соответствует сети {{network}}", "checkBeforeTransfer": "Проверьте корректность перед переводом" };
|
|
56
|
-
const transaction = { "enterAmount": "Введите сумму", "transfer": "Перевести", "getQuote": "Получить котировку", "quoting": "Расчет котировки...", "failed": "Ошибка транзакции", "confirm": "Подтвердите транзакцию", "signTransaction": "Подпишите транзакцию в кошельке", "inProgress": "Транзакция выполняется...", "checkingBalance": "Проверка баланса...", "insufficientBalance": "Недостаточно средств", "amountTooSmall": "Минимум {{min}}", "amountTooLarge": "Максимум {{max}}", "success": "Успех", "successTitle": "Успех", "done": "Готово", "hashCopied": "Хэш скопирован в буфер обмена", "bridged": "Переведено", "transferTitle": "Перевод", "hash": "Хэш", "layerzeroScan": "TxHash", "finalFee": "Итоговая комиссия", "route": "Маршрут", "estTime": "Время", "slippage": "Проскальзывание", "minimumReceived": "Минимум к получению", "totalFee": "Общая комиссия", "noRouteFound": "Маршрут не найден", "notEnoughGas": "Недостаточно газа", "pasteAddressToTransfer": "Укажите адрес получателя", "noRouteFoundForSettings": "Маршрут не найден для текущих настроек.", "tryAdjustSettings": "Попробуйте отключить Gas on Destination или измените сумму/сети.", "quoteError": "Ошибка котировки", "steps": { "sent": "Отправлено", "processing": "Обработка", "processingNote": "До 2 минут", "completed": "Завершено" } };
|
|
56
|
+
const transaction = { "enterAmount": "Введите сумму", "transfer": "Перевести", "getQuote": "Получить котировку", "quoting": "Расчет котировки...", "failed": "Ошибка транзакции", "confirm": "Подтвердите транзакцию", "signTransaction": "Подпишите транзакцию в кошельке", "inProgress": "Транзакция выполняется...", "checkingBalance": "Проверка баланса...", "insufficientBalance": "Недостаточно средств", "amountTooSmall": "Минимум {{min}}", "amountTooLarge": "Максимум {{max}}", "success": "Успех", "successTitle": "Успех", "done": "Готово", "hashCopied": "Хэш скопирован в буфер обмена", "bridged": "Переведено", "transferTitle": "Перевод", "hash": "Хэш", "layerzeroScan": "TxHash", "finalFee": "Итоговая комиссия", "route": "Маршрут", "estTime": "Время", "slippage": "Проскальзывание", "minimumReceived": "Минимум к получению", "totalFee": "Общая комиссия", "noRouteFound": "Маршрут не найден", "notEnoughGas": "Недостаточно газа", "pasteAddressToTransfer": "Укажите адрес получателя", "noRouteFoundForSettings": "Маршрут не найден для текущих настроек.", "tryAdjustSettings": "Попробуйте отключить Gas on Destination или измените сумму/сети.", "quoteError": "Ошибка котировки", "steps": { "sent": "Отправлено", "approving": "Одобрение токена", "approvingNote": "Шаг {{current}} из {{total}}: Подтвердите одобрение в кошельке", "bridging": "Перевод через мост", "processing": "Обработка", "processingNote": "До 2 минут", "completed": "Завершено" } };
|
|
57
57
|
const telegram = { "openWebVersion": "Открыть EVAA веб для трансфера", "restrictionMessage": "Трансфер между выбранными сетями доступен только в веб-версии EVAA" };
|
|
58
58
|
const app = { "stargateWidgetName": "Виджет Stargate Bridge", "liveWidget": "Живой виджет", "getStarted": "Начало работы" };
|
|
59
59
|
const settings = { "title": "Настройки", "gasOnDestination": "Газ на назначении", "gasOnDestinationDescription": "Значение по умолчанию позволяет выполнить пару транзакций (например, Approve и Swap).", "slippageTolerance": "Толерантность к проскальзыванию", "slippageToleranceDescription": "Ваша транзакция будет отклонена, если получаемая сумма выйдет за пределы этой допустимой погрешности.", "routePriority": "Приоритет маршрута", "routePriorityDescription": "Выберите, как будет выполняться ваш трансфер. Recommended — выбирает оптимальный маршрут с учётом общей стоимости. Fastest — отдаёт приоритет максимальной скорости.", "highSlippageWarning": "Высокое проскальзывание", "gasPresets": { "auto": "Авто", "none": "Нет", "medium": "Средний", "max": "Макс" }, "routePresets": { "fastest": "Быстрейший", "cheapest": "Дешевейший", "recommended": "Рекомендуемый" } };
|
|
@@ -3269,6 +3269,16 @@ const useTransactionStore = zustand.create((set2, get2) => ({
|
|
|
3269
3269
|
};
|
|
3270
3270
|
set2({ current: next });
|
|
3271
3271
|
},
|
|
3272
|
+
updateCurrentStep: (type, index, total) => {
|
|
3273
|
+
const cur = get2().current;
|
|
3274
|
+
if (!cur) return;
|
|
3275
|
+
const next = {
|
|
3276
|
+
...cur,
|
|
3277
|
+
currentStep: { type, index, total },
|
|
3278
|
+
updatedAt: Date.now()
|
|
3279
|
+
};
|
|
3280
|
+
set2({ current: next });
|
|
3281
|
+
},
|
|
3272
3282
|
reset: () => {
|
|
3273
3283
|
set2({ current: void 0 });
|
|
3274
3284
|
}
|
|
@@ -3532,10 +3542,25 @@ function useBridgeTransaction() {
|
|
|
3532
3542
|
srcChainKey: quote.srcChainKey,
|
|
3533
3543
|
dstChainKey: quote.dstChainKey
|
|
3534
3544
|
};
|
|
3535
|
-
const txResult = await strategy.executeSteps(
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3545
|
+
const txResult = await strategy.executeSteps(
|
|
3546
|
+
steps,
|
|
3547
|
+
context,
|
|
3548
|
+
(hash, stepType, stepIndex, totalSteps) => {
|
|
3549
|
+
txStore.updateCurrentStep(
|
|
3550
|
+
stepType,
|
|
3551
|
+
stepIndex,
|
|
3552
|
+
totalSteps
|
|
3553
|
+
);
|
|
3554
|
+
if (stepIndex === 0) {
|
|
3555
|
+
txStore.setSrcHash(hash);
|
|
3556
|
+
}
|
|
3557
|
+
if (stepType === "approve" && stepIndex < totalSteps - 1) {
|
|
3558
|
+
txStore.updateStatus("approving");
|
|
3559
|
+
} else {
|
|
3560
|
+
txStore.updateStatus("processing");
|
|
3561
|
+
}
|
|
3562
|
+
}
|
|
3563
|
+
);
|
|
3539
3564
|
if (txResult?.hash) {
|
|
3540
3565
|
const trackWithLayerZero = async () => {
|
|
3541
3566
|
let hashForLayerZero = txResult.hash;
|
|
@@ -4228,10 +4253,30 @@ const CircleLinedIcon = (props) => {
|
|
|
4228
4253
|
);
|
|
4229
4254
|
};
|
|
4230
4255
|
const ProgressStep = ({
|
|
4231
|
-
icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-16 h-16 animate-spin" })
|
|
4256
|
+
icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-16 h-16 animate-spin" }),
|
|
4257
|
+
isApproving = false
|
|
4232
4258
|
}) => {
|
|
4233
4259
|
const { t: t2 } = useBridgeTranslation();
|
|
4234
|
-
const
|
|
4260
|
+
const { current } = useTransactionStore();
|
|
4261
|
+
const currentStep = current?.currentStep;
|
|
4262
|
+
const steps = isApproving && currentStep ? [
|
|
4263
|
+
{
|
|
4264
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-5 h-5 text-primary animate-spin", strokeWidth: 3 }),
|
|
4265
|
+
title: t2("transaction.steps.approving"),
|
|
4266
|
+
description: t2("transaction.steps.approvingNote", {
|
|
4267
|
+
current: currentStep.index + 1,
|
|
4268
|
+
total: currentStep.total
|
|
4269
|
+
})
|
|
4270
|
+
},
|
|
4271
|
+
{
|
|
4272
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(CircleLinedIcon, { className: "w-5 h-5" }),
|
|
4273
|
+
title: t2("transaction.steps.bridging")
|
|
4274
|
+
},
|
|
4275
|
+
{
|
|
4276
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(CircleLinedIcon, { className: "w-5 h-5" }),
|
|
4277
|
+
title: t2("transaction.steps.completed")
|
|
4278
|
+
}
|
|
4279
|
+
] : [
|
|
4235
4280
|
{
|
|
4236
4281
|
icon: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: "w-5 h-5 " }),
|
|
4237
4282
|
title: t2("transaction.steps.sent")
|
|
@@ -4571,6 +4616,9 @@ const StatusStepsDialog = ({
|
|
|
4571
4616
|
if (status === "executing") {
|
|
4572
4617
|
step = /* @__PURE__ */ jsxRuntime.jsx(ConfirmStep, { icon: icons?.confirm });
|
|
4573
4618
|
}
|
|
4619
|
+
if (status === "approving") {
|
|
4620
|
+
step = /* @__PURE__ */ jsxRuntime.jsx(ProgressStep, { icon: icons?.progress, isApproving: true });
|
|
4621
|
+
}
|
|
4574
4622
|
if (status === "processing") {
|
|
4575
4623
|
step = /* @__PURE__ */ jsxRuntime.jsx(ProgressStep, { icon: icons?.progress });
|
|
4576
4624
|
}
|
|
@@ -5175,35 +5223,34 @@ class EvmChainStrategy {
|
|
|
5175
5223
|
}
|
|
5176
5224
|
return Number(viem.formatUnits(totalFeeWei, 18));
|
|
5177
5225
|
}
|
|
5178
|
-
async executeSteps(steps, _context,
|
|
5226
|
+
async executeSteps(steps, _context, onStepComplete) {
|
|
5179
5227
|
if (!this.isConnected() || !this.walletClient) {
|
|
5180
5228
|
throw new WalletNotConnectedError("evm");
|
|
5181
5229
|
}
|
|
5182
5230
|
this.validateSteps(steps);
|
|
5183
5231
|
try {
|
|
5184
5232
|
let firstTxHash;
|
|
5185
|
-
|
|
5233
|
+
const totalSteps = steps.length;
|
|
5234
|
+
for (let i3 = 0; i3 < steps.length; i3++) {
|
|
5235
|
+
const step = steps[i3];
|
|
5186
5236
|
console.log(
|
|
5187
|
-
`Executing ${step.type} transaction on ${step.chainKey}...`
|
|
5237
|
+
`Executing ${step.type} transaction on ${step.chainKey} (${i3 + 1}/${totalSteps})...`
|
|
5188
5238
|
);
|
|
5239
|
+
let hash;
|
|
5189
5240
|
if (step.type === "approve") {
|
|
5190
|
-
|
|
5191
|
-
if (!firstTxHash) {
|
|
5192
|
-
firstTxHash = hash;
|
|
5193
|
-
onFirstHash?.(hash);
|
|
5194
|
-
}
|
|
5241
|
+
hash = await this.approveTransaction(step);
|
|
5195
5242
|
} else if (step.type === "bridge") {
|
|
5196
|
-
|
|
5197
|
-
if (!firstTxHash) {
|
|
5198
|
-
firstTxHash = hash;
|
|
5199
|
-
onFirstHash?.(hash);
|
|
5200
|
-
}
|
|
5243
|
+
hash = await this.executeTransaction(step);
|
|
5201
5244
|
} else {
|
|
5202
5245
|
throw new InvalidStepsError(
|
|
5203
5246
|
"evm",
|
|
5204
5247
|
`Unsupported step type: ${step.type}`
|
|
5205
5248
|
);
|
|
5206
5249
|
}
|
|
5250
|
+
if (!firstTxHash) {
|
|
5251
|
+
firstTxHash = hash;
|
|
5252
|
+
}
|
|
5253
|
+
onStepComplete?.(hash, step.type, i3, totalSteps);
|
|
5207
5254
|
}
|
|
5208
5255
|
return {
|
|
5209
5256
|
hash: firstTxHash,
|
|
@@ -5467,7 +5514,7 @@ class TonChainStrategy {
|
|
|
5467
5514
|
}
|
|
5468
5515
|
}
|
|
5469
5516
|
}
|
|
5470
|
-
async executeSteps(steps, _context,
|
|
5517
|
+
async executeSteps(steps, _context, onStepComplete) {
|
|
5471
5518
|
if (!this.isConnected() || !this.config.tonConnectUI) {
|
|
5472
5519
|
throw new WalletNotConnectedError("ton");
|
|
5473
5520
|
}
|
|
@@ -5496,7 +5543,7 @@ class TonChainStrategy {
|
|
|
5496
5543
|
const inMessage = core.loadMessage(core.Cell.fromBase64(bocBase64).beginParse());
|
|
5497
5544
|
const messageHash = this.getNormalizedExtMessageHash(inMessage);
|
|
5498
5545
|
const hexHash = messageHash.toString("hex");
|
|
5499
|
-
|
|
5546
|
+
onStepComplete?.(hexHash, "bridge", 0, steps.length);
|
|
5500
5547
|
return {
|
|
5501
5548
|
chainKey: "ton",
|
|
5502
5549
|
hash: hexHash
|
|
@@ -5504,7 +5551,7 @@ class TonChainStrategy {
|
|
|
5504
5551
|
};
|
|
5505
5552
|
} catch (error) {
|
|
5506
5553
|
console.error("Error parsing BOC to hex hash:", error);
|
|
5507
|
-
|
|
5554
|
+
onStepComplete?.(bocBase64, "bridge", 0, steps.length);
|
|
5508
5555
|
return {
|
|
5509
5556
|
chainKey: "ton",
|
|
5510
5557
|
hash: bocBase64
|
|
@@ -5916,7 +5963,7 @@ class TronChainStrategy {
|
|
|
5916
5963
|
}
|
|
5917
5964
|
return fee / 1e6;
|
|
5918
5965
|
}
|
|
5919
|
-
async executeSteps(steps, _context,
|
|
5966
|
+
async executeSteps(steps, _context, onStepComplete) {
|
|
5920
5967
|
const tronWeb = this.getClient();
|
|
5921
5968
|
if (!tronWeb) {
|
|
5922
5969
|
throw new ProviderNotAvailableError("tron");
|
|
@@ -5929,7 +5976,10 @@ class TronChainStrategy {
|
|
|
5929
5976
|
const fromB58 = connector.address;
|
|
5930
5977
|
this.ensureDefaultAddress(tronWeb, fromB58);
|
|
5931
5978
|
let lastTxId;
|
|
5932
|
-
let
|
|
5979
|
+
let stepIndex = 0;
|
|
5980
|
+
const totalSteps = steps.filter(
|
|
5981
|
+
(s2) => String(s2.chainKey).toLowerCase() === "tron"
|
|
5982
|
+
).length;
|
|
5933
5983
|
for (const step of steps) {
|
|
5934
5984
|
if (String(step.chainKey).toLowerCase() !== "tron") continue;
|
|
5935
5985
|
const tx = step.transaction;
|
|
@@ -5999,10 +6049,8 @@ class TronChainStrategy {
|
|
|
5999
6049
|
connector
|
|
6000
6050
|
);
|
|
6001
6051
|
lastTxId = txid;
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
isFirstHash = false;
|
|
6005
|
-
}
|
|
6052
|
+
onStepComplete?.(txid, step.type, stepIndex, totalSteps);
|
|
6053
|
+
stepIndex++;
|
|
6006
6054
|
}
|
|
6007
6055
|
if (!lastTxId) {
|
|
6008
6056
|
throw new TransactionFailedError(
|
|
@@ -25830,7 +25878,7 @@ class WalletConnectModal {
|
|
|
25830
25878
|
}
|
|
25831
25879
|
async initUi() {
|
|
25832
25880
|
if (typeof window !== "undefined") {
|
|
25833
|
-
await Promise.resolve().then(() => require("./index-
|
|
25881
|
+
await Promise.resolve().then(() => require("./index-DJrg5YQY.cjs"));
|
|
25834
25882
|
const modal = document.createElement("wcm-modal");
|
|
25835
25883
|
document.body.insertAdjacentElement("beforeend", modal);
|
|
25836
25884
|
OptionsCtrl.setIsUiLoaded(true);
|
|
@@ -26597,4 +26645,4 @@ exports.useSettingsStore = useSettingsStore;
|
|
|
26597
26645
|
exports.useSwapModel = useSwapModel;
|
|
26598
26646
|
exports.useTokensStore = useTokensStore;
|
|
26599
26647
|
exports.useTransactionStore = useTransactionStore;
|
|
26600
|
-
//# sourceMappingURL=index-
|
|
26648
|
+
//# sourceMappingURL=index-XPQb2NSf.cjs.map
|