Skip to content

Commit

Permalink
Merge pull request #4645 from CrocSwap/fix-candle-clicking-bug
Browse files Browse the repository at this point in the history
fix candle clicking bug
  • Loading branch information
benwolski authored Jan 15, 2025
2 parents e34e4f4 + 1628efe commit 25b8edc
Show file tree
Hide file tree
Showing 5 changed files with 327 additions and 306 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ambient-ts-app",
"version": "3.1.12",
"version": "3.1.13",
"private": true,
"type": "module",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/ambient-utils/constants/networks/scrollMainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export const scrollMainnet: NetworkIF = {
topPools: [
new TopPool(scrollETH, scrollUSDC, chainSpecFromSDK.poolIndex),
new TopPool(scrollUSDT, scrollUSDC, chainSpecFromSDK.poolIndex),
new TopPool(scrollETH, scrollUSDT, chainSpecFromSDK.poolIndex),
new TopPool(scrollSCR, scrollETH, chainSpecFromSDK.poolIndex),
new TopPool(scrollETH, scrollUSDT, chainSpecFromSDK.poolIndex),
new TopPool(scrollETH, scrollWBTC, chainSpecFromSDK.poolIndex),
],
getGasPriceInGwei: async (provider?: Provider) => {
Expand Down
6 changes: 3 additions & 3 deletions src/ambient-utils/constants/networks/swellMainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider } from 'ethers';
import { NetworkIF } from '../../types/NetworkIF';
import {
swellETH,
swellEZETH,
swellRSETH,
swellRSWETH,
swellSWELL,
swellUSDE,
Expand Down Expand Up @@ -60,9 +60,9 @@ export const swellMainnet: NetworkIF = {
topPools: [
new TopPool(swellETH, swellUSDE, chainSpecFromSDK.poolIndex),
new TopPool(swellWEETH, swellRSWETH, chainSpecFromSDK.poolIndex),
new TopPool(swellEZETH, swellETH, chainSpecFromSDK.poolIndex),
new TopPool(swellRSWETH, swellETH, chainSpecFromSDK.poolIndex),
new TopPool(swellRSETH, swellWEETH, chainSpecFromSDK.poolIndex),
new TopPool(swellETH, swellSWELL, chainSpecFromSDK.poolIndex),
new TopPool(swellRSWETH, swellETH, chainSpecFromSDK.poolIndex),
],
getGasPriceInGwei: async (provider?: Provider) => {
if (!provider) return 0;
Expand Down
21 changes: 21 additions & 0 deletions src/components/Global/TabComponent/TabComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,27 @@ export default function TabComponent(props: TabPropsIF) {
if (tradeTableState === 'Collapsed') toggleTradeTable();
}

useEffect(() => {
const currentTabData = data.find(
(item) => item.label === selectedTab.label,
);
if (currentTabData) {
setSelectedTab(currentTabData);
if (
[
'transactions',
'limits',
'liquidity',
'wallet balances',
'exchange balances',
'dex balances',
].includes(currentTabData.label.toLowerCase())
) {
setActiveTradeTab(currentTabData.label.toLowerCase());
}
}
}, [data]);

function handleOutside2() {
if (!outsideControl) {
return;
Expand Down
Loading

0 comments on commit 25b8edc

Please sign in to comment.