Skip to content

Commit

Permalink
Merge pull request #1630 from QuickSwap/dev2
Browse files Browse the repository at this point in the history
Dev2
  • Loading branch information
sameepsi authored Dec 3, 2024
2 parents 169a973 + b896f1d commit 4b3f73e
Show file tree
Hide file tree
Showing 17 changed files with 4,322 additions and 728 deletions.
4,271 changes: 3,926 additions & 345 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.60",
"@material-ui/styles": "^4.11.5",
"@orbs-network/liquidity-hub-sdk": "^1.0.44",
"@orbs-network/liquidity-hub-sdk": "^1.0.45",
"@orbs-network/swap-ui": "^0.0.14",
"@orbs-network/twap-sdk": "^2.0.33",
"@orderly.network/hooks": "^1.4.3",
Expand Down
4 changes: 3 additions & 1 deletion public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@
"minimumReceivedTooltip": "This is the minimum number of tokens that may be received. NOTE: This minimum only refers to executed trades. Some trades may not be executed if the limit price is higher than the available market prices and your order may only be partially filled.",
"orbs": "Orbs",
"approveToken": "Approve {{ symbol }} spending",
"approveTokenPending": "Approving {{ symbol }} spending",
"tradeSizeWarning": "Trade size must be at least ${{ usd }}",
"minExpiryWarning": "Min. expiry is {{ value }} minutes",
"maxExpiryWarning": "Max. expiry is 30 days",
Expand All @@ -1036,5 +1037,6 @@
"create": "Create",
"networkFeeHelper": "Network fees are paid for transaction",
"dragonEggAlert": "Screenshot this and DM <alink>@QuickswapDEX on X (Twitter)</alink> for a chance to win prizes! First come, first serve.",
"cancelOrder": "Cancel Order"
"cancelOrder": "Cancel Order",
"seekingBetterPrice": "Seeking better price"
}
Binary file added src/assets/images/bridge/retr.webp
Binary file not shown.
Binary file added src/assets/images/bridge/rubic.webp
Binary file not shown.
6 changes: 6 additions & 0 deletions src/components/ConfirmSwapModal/ConfirmSwapModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ interface ConfirmSwapModalProps {
onConfirm: () => void;
swapErrorMessage: string | undefined;
onDismiss: () => void;
swapButtonText?: string;
swapButtonDisabled?: boolean;
}

const ConfirmSwapModal: React.FC<ConfirmSwapModalProps> = ({
Expand All @@ -62,6 +64,8 @@ const ConfirmSwapModal: React.FC<ConfirmSwapModalProps> = ({
attemptingTxn,
txHash,
txPending,
swapButtonDisabled,
swapButtonText,
}) => {
const { t } = useTranslation();
const showAcceptChanges = useMemo(
Expand All @@ -86,6 +90,8 @@ const ConfirmSwapModal: React.FC<ConfirmSwapModalProps> = ({
onConfirm={onConfirm}
showAcceptChanges={showAcceptChanges}
onAcceptChanges={onAcceptChanges}
swapButtonText={swapButtonText}
swapButtonDisabled={swapButtonDisabled}
/>
) : null;
}, [
Expand Down
12 changes: 10 additions & 2 deletions src/components/ConfirmSwapModal/SwapModalHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ interface SwapModalHeaderProps {
showAcceptChanges: boolean;
onAcceptChanges: () => void;
onConfirm: () => void;
swapButtonText?: string;
swapButtonDisabled?: boolean;
}

const SwapModalHeader: React.FC<SwapModalHeaderProps> = ({
Expand All @@ -34,6 +36,8 @@ const SwapModalHeader: React.FC<SwapModalHeaderProps> = ({
showAcceptChanges,
onAcceptChanges,
onConfirm,
swapButtonDisabled,
swapButtonText,
}) => {
const { t } = useTranslation();
const { chainId } = useActiveWeb3React();
Expand Down Expand Up @@ -151,8 +155,12 @@ const SwapModalHeader: React.FC<SwapModalHeaderProps> = ({
) : (
<></>
)}
<Button onClick={onConfirm} className='swapButton'>
{t('confirmSwap')}
<Button
disabled={swapButtonDisabled}
onClick={onConfirm}
className='swapButton'
>
{swapButtonText || t('confirmSwap')}
</Button>
</Box>
</Box>
Expand Down
3 changes: 2 additions & 1 deletion src/components/HypeLabAds/HypeLabAds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BannerEmbed } from '@spindl-xyz/embed-react';
import { useActiveWeb3React } from 'hooks';

const HypeLabAds: React.FC = () => {
const { isActive } = useActiveWeb3React();
const { isActive, account } = useActiveWeb3React();
const { breakpoints } = useTheme();
const isMobile = useMediaQuery(breakpoints.down('xs'));

Expand All @@ -20,6 +20,7 @@ const HypeLabAds: React.FC = () => {
width: '100%',
height: '90px',
}} // recommended to add desired width/height
address={account}
/>
)}
{!isActive && isMobile && <Banner placement='4177d327af' />}
Expand Down
Loading

0 comments on commit 4b3f73e

Please sign in to comment.