Skip to content

Commit

Permalink
fix: resolved merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
shayan-deriv committed May 27, 2024
2 parents 3ef9443 + 4bdad22 commit bbd1110
Show file tree
Hide file tree
Showing 7 changed files with 2,435 additions and 2,369 deletions.
4,775 changes: 2,417 additions & 2,358 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 @@ -15,7 +15,7 @@
},
"dependencies": {
"@babel/preset-env": "^7.24.5",
"@deriv-com/api-hooks": "^0.1.19",
"@deriv-com/api-hooks": "^0.1.24",
"@deriv-com/translations": "^1.2.4",
"@deriv-com/ui": "^1.27.3",
"@deriv-com/utils": "latest",
Expand Down
5 changes: 3 additions & 2 deletions src/components/AdvertsTableRow/AdvertsTableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ const AdvertsTableRow = memo((props: TAdvertsTableRowRenderer) => {
}, [local_currency]);

useEffect(() => {
if (exchangeRateData?.exchange_rates?.rates) {
exchangeRateRef.current = exchangeRateData?.exchange_rates?.rates?.[local_currency];
const rate = exchangeRateData?.exchange_rates?.rates?.[local_currency];
if (typeof rate === 'number') {
exchangeRateRef.current = rate;
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [exchangeRateData]);
Expand Down
6 changes: 4 additions & 2 deletions src/components/BuySellForm/BuySellForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ const BuySellForm = ({ advertId, isModalOpen, onRequestClose }: TBuySellFormProp
}, [local_currency]);

useEffect(() => {
if (exchangeRatesData?.exchange_rates?.rates) {
exchangeRateRef.current = exchangeRatesData?.exchange_rates.rates?.[local_currency];
const rate = exchangeRatesData?.exchange_rates?.rates?.[local_currency];
if (typeof rate === 'number') {
exchangeRateRef.current = rate;
}

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [exchangeRatesData]);

Expand Down
5 changes: 3 additions & 2 deletions src/components/FloatingRate/FloatingRate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ const FloatingRate = ({
}, [localCurrency]);

useEffect(() => {
if (exchangeRateData?.exchange_rates?.rates) {
exchangeRateRef.current = exchangeRateData?.exchange_rates?.rates?.[localCurrency];
const rate = exchangeRateData?.exchange_rates?.rates?.[localCurrency];
if (typeof rate === 'number') {
exchangeRateRef.current = rate;
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [exchangeRateData]);
Expand Down
6 changes: 4 additions & 2 deletions src/pages/my-ads/components/AdSummary/AdSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ const AdSummary = ({
}, [currency, localCurrency]);

useEffect(() => {
if (exchangeRatesData?.exchange_rates?.rates) {
exchangeRateRef.current = exchangeRatesData.exchange_rates?.rates?.[localCurrency];
const rate = exchangeRatesData?.exchange_rates?.rates?.[localCurrency];
if (typeof rate === 'number') {
exchangeRateRef.current = rate;
}

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [exchangeRatesData]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ const MyAdsTableRow = ({ currentRateType, showModal, ...rest }: TMyAdsTableProps
}, [localCurrency]);

useEffect(() => {
if (exchangeRatesData?.exchange_rates?.rates) {
exchangeRateRef.current = exchangeRatesData.exchange_rates?.rates?.[localCurrency ?? ''];
const rate = exchangeRatesData?.exchange_rates?.rates?.[localCurrency ?? ''];
if (typeof rate === 'number') {
exchangeRateRef.current = rate;
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [exchangeRatesData]);
Expand Down

0 comments on commit bbd1110

Please sign in to comment.