diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index beb7103d63..5eaae08ce9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,4 +3,4 @@ # These owners will be the default owners for everything in # the repo. Unless a later match takes precedence, # they will be requested for review when someone opens a pull request. -* @AtelyPham @devpavan04 @yurixander +* @AtelyPham @devpavan04 @yurixander \ No newline at end of file diff --git a/.lycheeignore b/.lycheeignore index 1a5ddb5b24..4c2db1cce2 100644 --- a/.lycheeignore +++ b/.lycheeignore @@ -43,3 +43,5 @@ https://www.conventionalcommits.org/en/v1.0.0/ # Files /**/CHANGELOG.md + +https://stats.tangle.tools diff --git a/apps/tangle-dapp/app/bridge/AmountAndTokenInput.tsx b/apps/tangle-dapp/app/bridge/AmountAndTokenInput.tsx index 68dd450cd8..7f3bb75102 100644 --- a/apps/tangle-dapp/app/bridge/AmountAndTokenInput.tsx +++ b/apps/tangle-dapp/app/bridge/AmountAndTokenInput.tsx @@ -32,7 +32,7 @@ const AmountAndTokenInput: FC = () => { tokenIdOptions, setIsAmountInputError, isAmountInputError, - bridgeFee, + feeItems, } = useBridge(); const selectedToken = useSelectedToken(); const { balance, isLoading } = useBalance(); @@ -47,12 +47,12 @@ const AmountAndTokenInput: FC = () => { return (existentialDeposit ?? new Decimal(0)) .add(destChainTransactionFee ?? new Decimal(0)) - .add(bridgeFee ?? new Decimal(0)); + .add(feeItems.sygmaBridge?.amount ?? new Decimal(0)); }, [ selectedToken.existentialDeposit, selectedToken.destChainTransactionFee, sourceTypedChainId, - bridgeFee, + feeItems.sygmaBridge?.amount, ]); return ( diff --git a/apps/tangle-dapp/app/bridge/BridgeConfirmationModal.tsx b/apps/tangle-dapp/app/bridge/BridgeConfirmationModal.tsx index c57db9d40d..acc7a05e3b 100644 --- a/apps/tangle-dapp/app/bridge/BridgeConfirmationModal.tsx +++ b/apps/tangle-dapp/app/bridge/BridgeConfirmationModal.tsx @@ -17,9 +17,8 @@ import { useBridgeTxQueue } from '../../context/BridgeTxQueueContext'; import useActiveAccountAddress from '../../hooks/useActiveAccountAddress'; import FeeDetails from './FeeDetails'; import useAmountInDecimals from './hooks/useAmountInDecimals'; -import useBridgeFee from './hooks/useBridgeFee'; import useBridgeTransfer from './hooks/useBridgeTransfer'; -import useEstimatedGasFee from './hooks/useEstimatedGasFee'; +import useFees from './hooks/useFees'; import useSelectedToken from './hooks/useSelectedToken'; interface BridgeConfirmationModalProps { @@ -40,18 +39,15 @@ const BridgeConfirmationModal: FC = ({ destinationAddress, setAmount, setDestinationAddress, - bridgeFee, - isBridgeFeeLoading, - isEstimatedGasFeeLoading, isTransferring, setIsTransferring, + feeItems, } = useBridge(); const selectedToken = useSelectedToken(); const { sourceAmountInDecimals, destinationAmountInDecimals } = useAmountInDecimals(); - useBridgeFee(); - useEstimatedGasFee(); + useFees(); const cleanUpWhenSubmit = useCallback(() => { handleClose(); @@ -122,9 +118,10 @@ const BridgeConfirmationModal: FC = ({ handleClose(); // TODO: handle clear form }} isDisabled={ - isBridgeFeeLoading || - isEstimatedGasFeeLoading || - bridgeFee === null || + feeItems.sygmaBridge?.isLoading || + feeItems.hyperlaneInterchain?.isLoading || + feeItems.gas?.isLoading || + feeItems.gas?.amount === null || !sourceAmountInDecimals || !destinationAmountInDecimals || !destinationAddress diff --git a/apps/tangle-dapp/app/bridge/BridgeContainer.tsx b/apps/tangle-dapp/app/bridge/BridgeContainer.tsx index 3b051ff5af..78919bdbbf 100644 --- a/apps/tangle-dapp/app/bridge/BridgeContainer.tsx +++ b/apps/tangle-dapp/app/bridge/BridgeContainer.tsx @@ -1,8 +1,6 @@ 'use client'; import Button from '@webb-tools/webb-ui-components/components/buttons/Button'; -import InfoIconWithTooltip from '@webb-tools/webb-ui-components/components/IconWithTooltip/InfoIconWithTooltip'; -import { Typography } from '@webb-tools/webb-ui-components/typography/Typography'; import { FC, useMemo, useState } from 'react'; import { twMerge } from 'tailwind-merge'; @@ -40,7 +38,7 @@ const BridgeContainer: FC = ({ className }) => { buttonLoadingText, isLoading, isDisabled, - errorMessage, + // errorMessage, } = useActionButton({ handleOpenConfirmModal: () => setIsConfirmModalOpen(true), }); @@ -72,8 +70,8 @@ const BridgeContainer: FC = ({ className }) => { className, )} > -
-
+
+
@@ -96,8 +94,9 @@ const BridgeContainer: FC = ({ className }) => { {!hideFeeDetails && }
+
- {errorMessage && ( + {/* {errorMessage && (
= ({ className }) => { /> )}
- )} + )} */}