Translation keys
|
-> | name | type | default value | description |
-> | ----------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
-> | `depositSlippageWarning` | string | Excludes entry fee. | |
-> | `withdrawSlippageWarning` | string | Slippage only applies to single asset withdrawals and withdrawals from vaults with debt positions in Aave. | |
-> | `minSlippageWarning` | string | Flexible min slippage value that is likely enough to process the transaction. | |
-> | `highSlippageWarning` | string | We recommend using another asset to trade with lower slippage. | |
-> | `recommendedMinSlippage` | string | Recommended Min Slippage | |
-> | `projectedDailyEarningsTooltip` | string | Projected daily earnings are based on the current APY and may differ from actual earnings. | |
-> | `dailyEarnings` | string | Daily Earnings | |
-> | `projectedYearlyEarningsTooltip` | string | Projected yearly earnings are based on the current APY and may differ from actual earnings. | |
-> | `yearlyEarnings` | string | Yearly Earnings | |
-> | `fullReceiveDetails` | string | See full details influencing what you will receive. | |
-> | `tradeDetails` | string | Trade details | |
-> | `maxSlippage` | string | Max slippage | |
-> | `minReceiveAmount` | string | You will receive no less than this amount. | |
-> | `minReceived` | string | Minimum Received | |
-> | `estimatedMultiAssetFractions` | string | Estimated multi asset fractions | |
-> | `infinite` | string | Infinite | |
-> | `tokenAllowance` | string | Token Allowance | |
-> | `entryFee` | string | Entry Fee | |
-> | `entryFeeExplanation` | string | When you deposit, the token takes a small entry fee. This fee helps cover the costs when we rebalance the underlying funds, and it's shared among all token holders. | |
-> | `minDepositUsd` | string | Minimum deposit in USD. | |
-> | `minDeposit` | string | Minimum Deposit | |
-> | `tokensLockTime` | string | Purchased tokens will have a {lockTime} lock. | |
-> | `slippageTolerance` | string | Slippage tolerance | |
-> | `bypassEntryFee` | string | Bypass Entry Fee | |
-> | `tokenAmountToApprove` | string | Amount of tokens to be approved. | |
-> | `auto` | string | Auto | |
-> | `lengthenLockup` | string | Lengthen lockup to remove entry fee | |
-> | `deposit` | string | Buy | |
-> | `withdraw` | string | Sell | |
-> | `max` | string | Max | |
-> | `allAssets` | string | All Assets | |
-> | `all` | string | All | |
-> | `sell` | string | Sell | |
-> | `receiveEstimated` | string | Receive (estimated) | |
-> | `confirmInWallet` | string | Please confirm in wallet | |
-> | `pending` | string | Pending... | |
-> | `approve` | string | Approve | |
-> | `connectWallet` | string | Connect Wallet | |
-> | `minimumPurchase` | string | Minimum purchase is {value} | |
-> | `poolIsInactive` | string | {poolSymbol} token is no longer active. Please withdraw from them. | |
-> | `poolDepositsAreMaintenance` | string | {poolSymbol} token is under maintenance. Deposits are temporarily blocked. | |
-> | `poolWithdrawalsAreMaintenance` | string | {poolSymbol} token is under maintenance. Withdrawals are temporarily blocked. | |
-> | `poolIsPrivate` | string | This vault is currently private | |
-> | `confirmMaxSlippage` | string | Confirm {slippagePercentage}% max slippage | |
-> | `withdrawalLiquidityDisabled` | string | Intended withdraw value is greater than available liquidity ({value}) | |
-> | `withdrawCooldown` | string | You can sell your {tokenSymbol} tokens in {cooldownEndTime} | |
-> | `termsOfUse` | string | Terms Of Use | |
-> | `termOfUseDepositListTitle` | string | Please know the following before depositing | |
-> | `termOfUseDepositAssetSlippage` | string | When exiting, investors receive single asset or the underlying vault assets. Withdraw slippage can be customized in withdraw settings | |
-> | `termOfUseDepositBugs` | string | There may be interface bugs on the platform | |
-> | `termOfUseDepositDowntime` | string | There may be interface downtime (planned and unplanned) | |
-> | `termOfUseDepositAuditRisk` | string | Smart contracts are audited but a risk is still present | |
-> | `termOfUseDepositAccept` | string | Accept & Deposit | |
-> | `back` | string | Back | |
-> | `done` | string | Done | |
-> | `highSlippage` | string | High Slippage Alert | |
-> | `responsibleHighSlippage` | string | By proceeding with this trade, you acknowledge and accept the possibility of experiencing high slippage, resulting in a potential difference between the expected and executed price. | |
-> | `highSlippageListTitle` | string | Please consider the following before confirming | |
-> | `highSlippageQuoteDiff` | string | Be aware that the final amount of assets you receive may be different from the initially quoted value. | |
-> | `highSlippageRisk` | string | Ensure that you understand the risks associated with high slippage and are comfortable proceeding with the trade. | |
-> | `confirm` | string | Confirm | |
-> | `selectToken` | string | Select Token | |
-> | `sendingOrderToWallet` | string | Sending order to your wallet | |
-> | `settingUpTx` | string | Setting up transaction | |
-> | `miningTx` | string | Processing | |
-> | `approveSpending` | string | Approve {symbol} spending | |
-> | `pay` | string | Pay | |
-> | `multiAssetFractions` | string | multi asset fractions | |
-> | `swappableAssets` | string | swappable assets | |
-> | `explorer` | string | Explorer | |
-> | `as` | string | As | |
-> | `switchNetwork` | string | Switch Network | |
-> | `depositAction` | string | Buy | |
-> | `withdrawAction` | string | Sell | |
-> | `swapAction` | string | Swap | |
-> | `unrollAction` | string | Unroll | |
-> | `unrollAndClaimAction` | string | Claim | |
-> | `claimAction` | string | Claim Without Swap | |
-> | `claimLabel` | string | Claim Assets | |
-> | `createLimitSellOrder` | string | Stop order set | |
-> | `swapAndClaimTo` | string | Swap and claim assets to | |
-> | `initWithdrawDescription` | string | Unroll | |
-> | `initWithdrawTooltip` | string | Unroll prepares assets for single asset withdrawal | |
-> | `completeWithdrawDescription` | string | Claim | |
-> | `completeWithdrawTooltip` | string | This final step swaps all assets to a single asset and sends it to your wallet | |
-> | `unrollAndClaimDescription` | string | Claim | |
-> | `total` | string | Total: | |
-> | `showAll` | string | Show All | |
-> | `hide` | string | Hide | |
-> | `refreshSwapQuoteTooltip` | string | Refresh swap quote | |
-> | `proceedWithNextStep` | string | Please proceed with the next step. | |
-> | `aggregatorsLabel` | string | Swap source | |
-> | `aggregatorsTooltip` | string | Choose which aggregators to use for your trades. | |
-> | `batchTransactionsLabel` | string | Batch transactions | |
-> | `batchTransactionsSwitchLabel` | string | Batch | |
-> | `batchTransactionsTooltip` | string | Group approve and trade calls into a single batch transaction. Disable if you prefer separate prompts. | |
-> | `openLimitOrderAfterBuySwitchLabel` | string | Add Stop Order | |
-> | `orderingLabel` | string | Ordering | |
-> | `paidLabel` | string | Paid | |
-> | `priceLabel` | string | Price | |
-> | `transactionLabel` | string | Transaction | |
-> | `stopOrder` | string | Stop Order | |
-> | `send` | string | Send | |
-> | `cooldown` | string | Cooldown | |
+> | name | type | default value | description |
+> | ----------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
+> | `depositSlippageWarning` | string | Excludes entry fee. | |
+> | `withdrawSlippageWarning` | string | Slippage only applies to single asset withdrawals and withdrawals from vaults with debt positions in Aave. | |
+> | `minSlippageWarning` | string | Flexible min slippage value that is likely enough to process the transaction. | |
+> | `highSlippageWarning` | string | We recommend using another asset to trade with lower slippage. | |
+> | `recommendedMinSlippage` | string | Recommended Min Slippage | |
+> | `projectedDailyEarningsTooltip` | string | Projected daily earnings are based on the current APY and may differ from actual earnings. | |
+> | `dailyEarnings` | string | Daily Earnings | |
+> | `projectedYearlyEarningsTooltip` | string | Projected yearly earnings are based on the current APY and may differ from actual earnings. | |
+> | `yearlyEarnings` | string | Yearly Earnings | |
+> | `fullReceiveDetails` | string | See full details influencing what you will receive. | |
+> | `tradeDetails` | string | Trade details | |
+> | `maxSlippage` | string | Max slippage | |
+> | `minReceiveAmount` | string | You will receive no less than this amount. | |
+> | `minReceived` | string | Minimum Received | |
+> | `estimatedMultiAssetFractions` | string | Estimated multi asset fractions | |
+> | `infinite` | string | Infinite | |
+> | `tokenAllowance` | string | Token Allowance | |
+> | `entryFee` | string | Entry Fee | |
+> | `entryFeeExplanation` | string | When you deposit, the token takes a small entry fee. This fee helps cover the costs when we rebalance the underlying funds, and it's shared among all token holders. | |
+> | `minDepositUsd` | string | Minimum deposit in USD. | |
+> | `minDeposit` | string | Minimum Deposit | |
+> | `tokensLockTime` | string | Purchased tokens will have a {lockTime} lock. | |
+> | `slippageTolerance` | string | Slippage tolerance | |
+> | `bypassEntryFee` | string | Bypass Entry Fee | |
+> | `tokenAmountToApprove` | string | Amount of tokens to be approved. | |
+> | `auto` | string | Auto | |
+> | `lengthenLockup` | string | Lengthen lockup to remove entry fee | |
+> | `deposit` | string | Buy | |
+> | `withdraw` | string | Sell | |
+> | `max` | string | Max | |
+> | `allAssets` | string | All Assets | |
+> | `all` | string | All | |
+> | `sell` | string | Sell | |
+> | `receiveEstimated` | string | Receive (estimated) | |
+> | `confirmInWallet` | string | Please confirm in wallet | |
+> | `pending` | string | Pending... | |
+> | `approve` | string | Approve | |
+> | `connectWallet` | string | Connect Wallet | |
+> | `minimumPurchase` | string | Minimum purchase is {value} | |
+> | `poolIsInactive` | string | {poolSymbol} token is no longer active. Please withdraw from them. | |
+> | `poolDepositsAreMaintenance` | string | {poolSymbol} token is under maintenance. Deposits are temporarily blocked. | |
+> | `poolWithdrawalsAreMaintenance` | string | {poolSymbol} token is under maintenance. Withdrawals are temporarily blocked. | |
+> | `poolIsPrivate` | string | This vault is currently private | |
+> | `confirmMaxSlippage` | string | Confirm {slippagePercentage}% max slippage | |
+> | `withdrawalLiquidityDisabled` | string | Intended withdraw value is greater than available liquidity ({value}) | |
+> | `withdrawCooldown` | string | You can sell your {tokenSymbol} tokens in {cooldownEndTime} | |
+> | `termsOfUse` | string | Terms Of Use | |
+> | `termOfUseDepositListTitle` | string | Please know the following before depositing | |
+> | `termOfUseDepositAssetSlippage` | string | When exiting, investors receive single asset or the underlying vault assets. Withdraw slippage can be customized in withdraw settings | |
+> | `termOfUseDepositBugs` | string | There may be interface bugs on the platform | |
+> | `termOfUseDepositDowntime` | string | There may be interface downtime (planned and unplanned) | |
+> | `termOfUseDepositAuditRisk` | string | Smart contracts are audited but a risk is still present | |
+> | `termOfUseDepositAccept` | string | Accept & Deposit | |
+> | `back` | string | Back | |
+> | `done` | string | Done | |
+> | `termOfUseWithdrawAcceptLabel` | string | I understand and accept the withdraw terms | |
+> | `termOfUseWithdrawPoint1` | string | Withdrawal requests are intended to settle in USDC. In rare cases where market conditions or high slippage prevent a USDC swap, the order may be settled in the underlying tokens of the respective vault. | |
+> | `termOfUseWithdrawPoint2` | string | Revoking token approval after placing an order will prevent the order from being executed. | |
+> | `highSlippage` | string | High Slippage Alert | |
+> | `responsibleHighSlippage` | string | By proceeding with this trade, you acknowledge and accept the possibility of experiencing high slippage, resulting in a potential difference between the expected and executed price. | |
+> | `highSlippageListTitle` | string | Please consider the following before confirming | |
+> | `highSlippageQuoteDiff` | string | Be aware that the final amount of assets you receive may be different from the initially quoted value. | |
+> | `highSlippageRisk` | string | Ensure that you understand the risks associated with high slippage and are comfortable proceeding with the trade. | |
+> | `confirm` | string | Confirm | |
+> | `selectToken` | string | Select Token | |
+> | `sendingOrderToWallet` | string | Sending order to your wallet | |
+> | `settingUpTx` | string | Setting up transaction | |
+> | `miningTx` | string | Processing | |
+> | `approveSpending` | string | Approve {symbol} spending | |
+> | `pay` | string | Pay | |
+> | `multiAssetFractions` | string | multi asset fractions | |
+> | `swappableAssets` | string | swappable assets | |
+> | `explorer` | string | Explorer | |
+> | `as` | string | As | |
+> | `switchNetwork` | string | Switch Network | |
+> | `depositAction` | string | Buy | |
+> | `withdrawAction` | string | Sell | |
+> | `swapAction` | string | Swap | |
+> | `unrollAction` | string | Unroll | |
+> | `unrollAndClaimAction` | string | Claim | |
+> | `claimAction` | string | Claim Without Swap | |
+> | `claimLabel` | string | Claim Assets | |
+> | `createLimitSellOrder` | string | Stop order set | |
+> | `swapAndClaimTo` | string | Swap and claim assets to | |
+> | `initWithdrawDescription` | string | Unroll | |
+> | `initWithdrawTooltip` | string | Unroll prepares assets for single asset withdrawal | |
+> | `completeWithdrawDescription` | string | Claim | |
+> | `completeWithdrawTooltip` | string | This final step swaps all assets to a single asset and sends it to your wallet | |
+> | `unrollAndClaimDescription` | string | Claim | |
+> | `limitOrderWithdrawDescription` | string | You are about to create a withdrawal request. Your vault tokens will be withdrawn within a few minutes. | |
+> | `total` | string | Total: | |
+> | `showAll` | string | Show All | |
+> | `hide` | string | Hide | |
+> | `refreshSwapQuoteTooltip` | string | Refresh swap quote | |
+> | `proceedWithNextStep` | string | Please proceed with the next step. | |
+> | `aggregatorsLabel` | string | Swap source | |
+> | `aggregatorsTooltip` | string | Choose which aggregators to use for your trades. | |
+> | `batchTransactionsLabel` | string | Batch transactions | |
+> | `batchTransactionsSwitchLabel` | string | Batch | |
+> | `batchTransactionsTooltip` | string | Group approve and trade calls into a single batch transaction. Disable if you prefer separate prompts. | |
+> | `openLimitOrderAfterBuySwitchLabel` | string | Add Stop Order | |
+> | `orderingLabel` | string | Ordering | |
+> | `paidLabel` | string | Paid | |
+> | `priceLabel` | string | Price | |
+> | `transactionLabel` | string | Transaction | |
+> | `stopOrder` | string | Stop Order | |
+> | `send` | string | Send | |
+> | `cooldown` | string | Cooldown | |
+> | `delete` | string | Delete | |
+> | `withdrawalRequest` | string | Withdrawal request | |
+> | `deleteWithdrawalRequest` | string | Delete withdrawal request | |
+> | `insufficientBalance` | string | Insufficient Balance | |
+> | `expectToReceiveUsdcSoon` | string | Expect to receive your USDC over the next few minutes | |
###### Source: `packages/trading-widget/src/trading-widget/providers/translation-provider/translation-provider.tsx`
diff --git a/package.json b/package.json
index 3eb9548b..30cc4eb6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@dhedge/trading-widget",
- "version": "4.4.1",
+ "version": "4.5.0",
"license": "MIT",
"type": "module",
"main": "dist/index.cjs",
diff --git a/src/core-kit/abi/limit-order.ts b/src/core-kit/abi/limit-order.ts
index 0e6a3a2c..156fd1e1 100644
--- a/src/core-kit/abi/limit-order.ts
+++ b/src/core-kit/abi/limit-order.ts
@@ -115,6 +115,25 @@ export const LimitOrderAbi = [
name: 'LimitOrderModified',
type: 'event',
},
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: 'address',
+ name: 'user',
+ type: 'address',
+ },
+ {
+ indexed: false,
+ internalType: 'uint256',
+ name: 'destTokenAmountReceived',
+ type: 'uint256',
+ },
+ ],
+ name: 'SettlementOrderExecuted',
+ type: 'event',
+ },
{
inputs: [],
name: 'SLIPPAGE_DENOMINATOR',
diff --git a/src/core-kit/const/logger.ts b/src/core-kit/const/logger.ts
index 6e0fa33e..2b9ceb73 100644
--- a/src/core-kit/const/logger.ts
+++ b/src/core-kit/const/logger.ts
@@ -15,6 +15,8 @@ export const TRADING_PANEL_LOG_EVENT = {
BATCH_TRANSACTIONS_CHANGE: 'batch_transactions_change',
CREATE_LIMIT_SELL_ORDER: 'create_limit_sell_order',
OPEN_LIMIT_SELL_VIEW: 'open_limit_sell_view',
+ LIMIT_ORDER_WITHDRAW: 'limit_order_withdraw',
+ LIMIT_ORDER_WITHDRAW_DELETE: 'limit_order_withdraw_delete',
}
export const LOG_EVENT_BY_TRANSACTION_ACTION_MAP: Record<
@@ -38,6 +40,10 @@ export const LOG_EVENT_BY_TRANSACTION_ACTION_MAP: Record<
claim: [TRADING_PANEL_LOG_EVENT.CLAIM],
swap: [TRADING_PANEL_LOG_EVENT.SWAP],
create_limit_sell_order: [TRADING_PANEL_LOG_EVENT.CREATE_LIMIT_SELL_ORDER],
+ limit_order_withdraw: [TRADING_PANEL_LOG_EVENT.LIMIT_ORDER_WITHDRAW],
+ delete_limit_order_withdraw: [
+ TRADING_PANEL_LOG_EVENT.LIMIT_ORDER_WITHDRAW_DELETE,
+ ],
}
/**
diff --git a/src/core-kit/hooks/trading/limit-order-withdraw/use-is-limit-order-withdraw.ts b/src/core-kit/hooks/trading/limit-order-withdraw/use-is-limit-order-withdraw.ts
new file mode 100644
index 00000000..f1ff8bde
--- /dev/null
+++ b/src/core-kit/hooks/trading/limit-order-withdraw/use-is-limit-order-withdraw.ts
@@ -0,0 +1,15 @@
+import { useTradingPanelPoolConfig } from 'core-kit/hooks/state'
+import { useLeveragedWithdrawalChecks } from 'trading-widget/hooks/use-leveraged-withdrawal-checks'
+
+export const useIsLimitOrderWithdraw = () => {
+ const { pricingAsset, onDemandWithdrawalEnabled } =
+ useTradingPanelPoolConfig()
+ const { requiresLeveragedCollateralLiquidity } =
+ useLeveragedWithdrawalChecks()
+
+ return (
+ requiresLeveragedCollateralLiquidity &&
+ !!pricingAsset &&
+ !!onDemandWithdrawalEnabled
+ )
+}
diff --git a/src/core-kit/hooks/trading/limit-order-withdraw/use-is-limit-withdraw-order-approved.ts b/src/core-kit/hooks/trading/limit-order-withdraw/use-is-limit-withdraw-order-approved.ts
new file mode 100644
index 00000000..f09160bd
--- /dev/null
+++ b/src/core-kit/hooks/trading/limit-order-withdraw/use-is-limit-withdraw-order-approved.ts
@@ -0,0 +1,21 @@
+import { AddressZero } from 'core-kit/const'
+import { useTradingPanelPoolConfig } from 'core-kit/hooks/state'
+import { useLimitOrderWithdrawAmount } from 'core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-amount'
+import { useAccount, useTokenAllowance } from 'core-kit/hooks/web3'
+import { getContractAddressById } from 'core-kit/utils'
+
+export const useIsLimitWithdrawOrderApproved = () => {
+ const { account = AddressZero } = useAccount()
+ const { address: vaultAddress, chainId } = useTradingPanelPoolConfig()
+ const limitOrderAddress = getContractAddressById('limitOrder', chainId)
+ const vaultAmount = useLimitOrderWithdrawAmount()
+
+ const { data: allowance } = useTokenAllowance({
+ tokenAddress: vaultAddress,
+ ownerAddress: account,
+ spenderAddress: limitOrderAddress,
+ chainId,
+ })
+
+ return allowance ? vaultAmount.lte(allowance.toString()) : false
+}
diff --git a/src/core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-amount.ts b/src/core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-amount.ts
new file mode 100644
index 00000000..3a480d30
--- /dev/null
+++ b/src/core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-amount.ts
@@ -0,0 +1,9 @@
+import BigNumber from 'bignumber.js'
+
+import { useSendTokenInput } from 'core-kit/hooks/state'
+
+export const useLimitOrderWithdrawAmount = () => {
+ const [sendToken] = useSendTokenInput()
+
+ return new BigNumber(sendToken.value || '0').shiftedBy(sendToken.decimals)
+}
diff --git a/src/core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-delete-transaction.ts b/src/core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-delete-transaction.ts
new file mode 100644
index 00000000..bdadaef8
--- /dev/null
+++ b/src/core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-delete-transaction.ts
@@ -0,0 +1,33 @@
+import { useCallback } from 'react'
+
+import {
+ useTradingPanelPoolConfig,
+ useTradingPanelTransactions,
+} from 'core-kit/hooks/state'
+import { useTradingSettleHandler } from 'core-kit/hooks/trading'
+import { useContractFunction } from 'core-kit/hooks/web3'
+
+const action = 'delete_limit_order_withdraw'
+
+export const useLimitOrderWithdrawDeleteTransaction = () => {
+ const { address: vaultAddress, symbol, chainId } = useTradingPanelPoolConfig()
+ const updatePendingTransactions = useTradingPanelTransactions()[1]
+ const onSettled = useTradingSettleHandler(action)
+
+ const { send } = useContractFunction({
+ onSettled,
+ contractId: 'limitOrder',
+ functionName: 'deleteLimitOrder',
+ })
+
+ return useCallback(async () => {
+ updatePendingTransactions({
+ type: 'add',
+ action,
+ symbol,
+ chainId,
+ })
+
+ return send(vaultAddress)
+ }, [chainId, send, symbol, updatePendingTransactions, vaultAddress])
+}
diff --git a/src/core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-transaction.ts b/src/core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-transaction.ts
new file mode 100644
index 00000000..ec996efa
--- /dev/null
+++ b/src/core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-transaction.ts
@@ -0,0 +1,82 @@
+import { useCallback } from 'react'
+
+import { AddressZero, MaxUint256 } from 'core-kit/const'
+import {
+ useTradingPanelPoolConfig,
+ useTradingPanelTransactions,
+} from 'core-kit/hooks/state'
+import { useTradingSettleHandler } from 'core-kit/hooks/trading'
+import { useLimitOrderWithdrawAmount } from 'core-kit/hooks/trading/limit-order-withdraw/use-limit-order-withdraw-amount'
+import { useAccount, useContractFunction } from 'core-kit/hooks/web3'
+import type { UseWriteContractParameters } from 'core-kit/types/web3.types'
+import { useUserLimitOrder } from 'limit-orders/hooks/use-user-limit-order'
+
+const action = 'limit_order_withdraw'
+
+export const useLimitOrderWithdrawTransaction = (txCallback: () => void) => {
+ const { account = AddressZero } = useAccount()
+ const {
+ address: vaultAddress,
+ chainId,
+ pricingAsset,
+ symbol,
+ } = useTradingPanelPoolConfig()
+ const updatePendingTransactions = useTradingPanelTransactions()[1]
+ const onTransactionSettle = useTradingSettleHandler(action)
+
+ const onSettled = useCallback<
+ Required