Skip to content

Commit 4baa302

Browse files
authored
Merge pull request #256 from QuickSwap/dev
Merge dev to master
2 parents 744a60e + 8a410ab commit 4baa302

File tree

15 files changed

+293
-1949
lines changed

15 files changed

+293
-1949
lines changed

.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ REACT_APP_TX_GRAPH_API_URL="https://api.thegraph.com/subgraphs/name/sameepsi/qui
1212
REACT_APP_PRDT_URL="https://prdt-quickswap-main.pages.dev/"
1313
REACT_APP_SCAN_BASE_URL="https://polygonscan.com"
1414
REACT_APP_TOKEN_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-token-list@latest/build/quickswap-default.tokenlist.json"
15-
REACT_APP_STAKING_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list@latest/build/quickswap-default.lpfarms.json"
16-
REACT_APP_DUAL_STAKING_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list@latest/build/quickswap-default.dualfarms.json"
17-
REACT_APP_SYRUP_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list@latest/build/quickswap-default.syrups.json"
15+
REACT_APP_STAKING_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list-address@latest/build/quickswap-default.lpfarms.json"
16+
REACT_APP_DUAL_STAKING_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list-address@latest/build/quickswap-default.dualfarms.json"
17+
REACT_APP_SYRUP_LIST_DEFAULT_URL="https://unpkg.com/quickswap-default-staking-list-address@latest/build/quickswap-default.syrups.json"
1818
REACT_APP_LEGACY_APP_URL="https://legacy.quickswap.exchange"

src/components/FarmCard/FarmCardDetails.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,13 @@ const FarmCardDetails: React.FC<{
277277
${(isLPFarm ? lpRewards : dualRewards).toLocaleString()} /
278278
{t('day')}
279279
</small>
280+
<br />
280281
{isLPFarm ? (
281282
<small>{lpPoolRate}</small>
282283
) : (
283284
<>
284285
<small>{dualPoolRateA}</small>
286+
<br />
285287
<small>{dualPoolRateB}</small>
286288
</>
287289
)}
@@ -299,7 +301,7 @@ const FarmCardDetails: React.FC<{
299301
</>
300302
)}
301303
{!stakingInfo.ended && (
302-
<Box className='buttonWrapper' mt={isMobile ? 2 : 0}>
304+
<Box className='buttonWrapper'>
303305
<Box className='flex justify-between'>
304306
<small>{t('inwallet')}:</small>
305307
<Box className='flex flex-col items-end'>

src/components/RewardSlider/RewardSlider.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,21 @@ const RewardSlider: React.FC = () => {
2525
const dualrewardItems = useDualStakingInfo(defaultChainId, null, 0, 1);
2626
const [bulkPairs, setBulkPairs] = useState<any>(null);
2727

28-
const stakingPairLists = useMemo(() => {
28+
const stakingPairListStr = useMemo(() => {
2929
return lprewardItems
3030
.map((item) => item.pair)
31-
.concat(dualrewardItems.map((item) => item.pair));
31+
.concat(dualrewardItems.map((item) => item.pair))
32+
.join(',');
3233
}, [dualrewardItems, lprewardItems]);
3334

35+
const stakingPairLists = stakingPairListStr.split(',');
36+
3437
useEffect(() => {
35-
getBulkPairData(stakingPairLists).then((data) => setBulkPairs(data));
36-
}, [stakingPairLists]);
38+
const stakingPairLists = stakingPairListStr.split(',');
39+
if (stakingPairListStr) {
40+
getBulkPairData(stakingPairLists).then((data) => setBulkPairs(data));
41+
}
42+
}, [stakingPairListStr]);
3743

3844
const stakingAPYs = useMemo(() => {
3945
if (bulkPairs && stakingPairLists.length > 0) {

src/components/SyrupCard/SyrupCardDetails.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,16 @@ const SyrupCardDetails: React.FC<{ syrup: SyrupInfo; dQUICKAPY: string }> = ({
155155
{syrup && (
156156
<>
157157
<Divider />
158-
<Box padding={3}>
158+
<Box padding={isMobile ? 2 : 3}>
159159
{isMobile && (
160-
<Box mb={3}>
161-
<Box className='flex justify-between' mb={2}>
160+
<Box mb={2}>
161+
<Box className='flex justify-between' mb={1.5}>
162162
<small className='text-secondary'>
163163
{syrup.stakingToken.symbol} {t('deposits')}:
164164
</small>
165165
<small>{depositAmount}</small>
166166
</Box>
167-
<Box className='flex justify-between' mb={2}>
167+
<Box className='flex justify-between' mb={1.5}>
168168
<small className='text-secondary'>{t('dailyRewards')}:</small>
169169
<small>
170170
{syrup.rate >= 1000000
@@ -174,10 +174,10 @@ const SyrupCardDetails: React.FC<{ syrup: SyrupInfo; dQUICKAPY: string }> = ({
174174
<span className='text-secondary'> / {t('day')}</span>
175175
</small>
176176
</Box>
177-
<Box mb={2}>
177+
<Box mb={1.5}>
178178
<SyrupTimerLabel exactEnd={exactEnd} isEnded={syrup?.ended} />
179179
</Box>
180-
<Box className='flex justify-between' mb={3}>
180+
<Box className='flex justify-between' mb={2}>
181181
<Box className='flex items-center'>
182182
<small className='text-secondary'>{t('apr')}:</small>
183183
<Box ml={0.5} height={16}>
@@ -191,7 +191,7 @@ const SyrupCardDetails: React.FC<{ syrup: SyrupInfo; dQUICKAPY: string }> = ({
191191
<Divider />
192192
</Box>
193193
)}
194-
<Box className='flex items-center justify-between' mb={1}>
194+
<Box className='flex items-center justify-between' mb={1.5}>
195195
<small className='text-secondary'>{t('inwallet')}</small>
196196
<small>
197197
{userLiquidityUnstaked
@@ -209,7 +209,7 @@ const SyrupCardDetails: React.FC<{ syrup: SyrupInfo; dQUICKAPY: string }> = ({
209209
</small>
210210
</small>
211211
</Box>
212-
<Box className='flex items-center justify-between' mb={1}>
212+
<Box className='flex items-center justify-between' mb={1.5}>
213213
<small className='text-secondary'>{t('staked')}</small>
214214
<small>
215215
{formatTokenAmount(syrup.stakedAmount)}{' '}

src/components/SyrupCard/SyrupTimerLabel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const SyrupTimerLabel: React.FC<{ exactEnd: number; isEnded: boolean }> = ({
4141
{!isEnded && Number.isFinite(timeRemaining) && (
4242
<Box
4343
className={
44-
isMobile ? 'flex flex-wrap items-center justify-center' : ''
44+
isMobile ? 'flex flex-wrap items-center justify-between' : ''
4545
}
4646
>
4747
<p className={`text-secondary ${isMobile ? 'small' : 'caption'}`}>

src/components/styles/FarmCard.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
align-items: center;
127127
}
128128
.farmCardMobileRow {
129-
margin-top: 16px;
129+
margin-bottom: 16px;
130130
width: 100%;
131131
display: flex;
132132
justify-content: space-between;

src/components/styles/SyrupCard.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
& .dailyRateWrapper {
1010
margin-bottom: 0;
1111
margin-top: 16px;
12+
@include media("screen", "<phone") {
13+
margin-top: 6px;
14+
}
1215
}
1316
}
1417
.syrupCardContent {

0 commit comments

Comments
 (0)