Skip to content

Commit 4b3f73e

Browse files
authored
Merge pull request QuickSwap#1630 from QuickSwap/dev2
Dev2
2 parents 169a973 + b896f1d commit 4b3f73e

File tree

17 files changed

+4322
-728
lines changed

17 files changed

+4322
-728
lines changed

package-lock.json

Lines changed: 3926 additions & 345 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"@material-ui/icons": "^4.11.2",
9999
"@material-ui/lab": "^4.0.0-alpha.60",
100100
"@material-ui/styles": "^4.11.5",
101-
"@orbs-network/liquidity-hub-sdk": "^1.0.44",
101+
"@orbs-network/liquidity-hub-sdk": "^1.0.45",
102102
"@orbs-network/swap-ui": "^0.0.14",
103103
"@orbs-network/twap-sdk": "^2.0.33",
104104
"@orderly.network/hooks": "^1.4.3",

public/locales/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,7 @@
10181018
"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.",
10191019
"orbs": "Orbs",
10201020
"approveToken": "Approve {{ symbol }} spending",
1021+
"approveTokenPending": "Approving {{ symbol }} spending",
10211022
"tradeSizeWarning": "Trade size must be at least ${{ usd }}",
10221023
"minExpiryWarning": "Min. expiry is {{ value }} minutes",
10231024
"maxExpiryWarning": "Max. expiry is 30 days",
@@ -1036,5 +1037,6 @@
10361037
"create": "Create",
10371038
"networkFeeHelper": "Network fees are paid for transaction",
10381039
"dragonEggAlert": "Screenshot this and DM <alink>@QuickswapDEX on X (Twitter)</alink> for a chance to win prizes! First come, first serve.",
1039-
"cancelOrder": "Cancel Order"
1040+
"cancelOrder": "Cancel Order",
1041+
"seekingBetterPrice": "Seeking better price"
10401042
}

src/assets/images/bridge/retr.webp

3.58 KB
Loading
2.81 KB
Loading

src/components/ConfirmSwapModal/ConfirmSwapModal.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ interface ConfirmSwapModalProps {
4545
onConfirm: () => void;
4646
swapErrorMessage: string | undefined;
4747
onDismiss: () => void;
48+
swapButtonText?: string;
49+
swapButtonDisabled?: boolean;
4850
}
4951

5052
const ConfirmSwapModal: React.FC<ConfirmSwapModalProps> = ({
@@ -62,6 +64,8 @@ const ConfirmSwapModal: React.FC<ConfirmSwapModalProps> = ({
6264
attemptingTxn,
6365
txHash,
6466
txPending,
67+
swapButtonDisabled,
68+
swapButtonText,
6569
}) => {
6670
const { t } = useTranslation();
6771
const showAcceptChanges = useMemo(
@@ -86,6 +90,8 @@ const ConfirmSwapModal: React.FC<ConfirmSwapModalProps> = ({
8690
onConfirm={onConfirm}
8791
showAcceptChanges={showAcceptChanges}
8892
onAcceptChanges={onAcceptChanges}
93+
swapButtonText={swapButtonText}
94+
swapButtonDisabled={swapButtonDisabled}
8995
/>
9096
) : null;
9197
}, [

src/components/ConfirmSwapModal/SwapModalHeader.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ interface SwapModalHeaderProps {
2323
showAcceptChanges: boolean;
2424
onAcceptChanges: () => void;
2525
onConfirm: () => void;
26+
swapButtonText?: string;
27+
swapButtonDisabled?: boolean;
2628
}
2729

2830
const SwapModalHeader: React.FC<SwapModalHeaderProps> = ({
@@ -34,6 +36,8 @@ const SwapModalHeader: React.FC<SwapModalHeaderProps> = ({
3436
showAcceptChanges,
3537
onAcceptChanges,
3638
onConfirm,
39+
swapButtonDisabled,
40+
swapButtonText,
3741
}) => {
3842
const { t } = useTranslation();
3943
const { chainId } = useActiveWeb3React();
@@ -151,8 +155,12 @@ const SwapModalHeader: React.FC<SwapModalHeaderProps> = ({
151155
) : (
152156
<></>
153157
)}
154-
<Button onClick={onConfirm} className='swapButton'>
155-
{t('confirmSwap')}
158+
<Button
159+
disabled={swapButtonDisabled}
160+
onClick={onConfirm}
161+
className='swapButton'
162+
>
163+
{swapButtonText || t('confirmSwap')}
156164
</Button>
157165
</Box>
158166
</Box>

src/components/HypeLabAds/HypeLabAds.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { BannerEmbed } from '@spindl-xyz/embed-react';
55
import { useActiveWeb3React } from 'hooks';
66

77
const HypeLabAds: React.FC = () => {
8-
const { isActive } = useActiveWeb3React();
8+
const { isActive, account } = useActiveWeb3React();
99
const { breakpoints } = useTheme();
1010
const isMobile = useMediaQuery(breakpoints.down('xs'));
1111

@@ -20,6 +20,7 @@ const HypeLabAds: React.FC = () => {
2020
width: '100%',
2121
height: '90px',
2222
}} // recommended to add desired width/height
23+
address={account}
2324
/>
2425
)}
2526
{!isActive && isMobile && <Banner placement='4177d327af' />}

0 commit comments

Comments
 (0)