Skip to content

Commit

Permalink
v3.2.4
Browse files Browse the repository at this point in the history
v3.2.4
  • Loading branch information
platschi authored Sep 29, 2022
2 parents 3a152a1 + 2b40290 commit 7e409f3
Show file tree
Hide file tree
Showing 27 changed files with 314 additions and 421 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit_build_verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Upload lint results
# run if lint failed and only on main/dev branch and pull requests
if: always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.event_name == 'pull_request')
uses: github/codeql-action/upload-sarif@904260d7d935dff982205cbdb42025ce30b7a34f # pin@codeql-bundle-20220322
uses: github/codeql-action/upload-sarif@86f3159a697a097a813ad9bfa0002412d97690a4 # pin@codeql-bundle-20220322
with:
sarif_file: lint-results.sarif
continue-on-error: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@904260d7d935dff982205cbdb42025ce30b7a34f # pin@codeql-bundle-20220322
uses: github/codeql-action/init@86f3159a697a097a813ad9bfa0002412d97690a4 # pin@codeql-bundle-20220322
with:
queries: security-and-quality
languages: javascript

- name: Autobuild
uses: github/codeql-action/autobuild@904260d7d935dff982205cbdb42025ce30b7a34f # pin@codeql-bundle-20220322
uses: github/codeql-action/autobuild@86f3159a697a097a813ad9bfa0002412d97690a4 # pin@codeql-bundle-20220322

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@904260d7d935dff982205cbdb42025ce30b7a34f # pin@codeql-bundle-20220322
uses: github/codeql-action/analyze@86f3159a697a097a813ad9bfa0002412d97690a4 # pin@codeql-bundle-20220322
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
![Kwenta CI](https://github.com/kwenta/kwenta/workflows/Kwenta%20CI/badge.svg?branch=main) [![Discord](https://img.shields.io/discord/413890591840272394.svg?color=768AD4&label=discord&logo=https%3A%2F%2Fdiscordapp.com%2Fassets%2F8c9701b98ad4372b58f13fd9f65f966e.svg)](https://discordapp.com/channels/413890591840272394/)
[![Twitter Follow](https://img.shields.io/twitter/follow/kwenta_io.svg?label=kwenta_io&style=social)](https://twitter.com/kwenta_io)
[![GitPOAP Badge](https://public-api.gitpoap.io/v1/repo/Kwenta/kwenta/badge)](https://www.gitpoap.io/gh/Kwenta/kwenta)

# Kwenta

Expand Down
6 changes: 5 additions & 1 deletion components/Tooltip/StyledTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ interface ToolTipProps {
right?: string;
style?: React.CSSProperties;
position?: string;
visible?: boolean;
}

const StyledTooltip = (props: ToolTipProps) => {
const [activeMouse, setActiveMouse] = useState(false);
const [position, setPosition] = useState({});
const myRef = useRef<HTMLDivElement>(null);

const isVisible = props.visible === undefined ? true : props.visible;

const setFixedPosition = () => {
const isFirefox = /firefox/i.test(navigator.userAgent);
if (myRef.current !== null) {
Expand All @@ -45,10 +48,11 @@ const StyledTooltip = (props: ToolTipProps) => {
const closeToolTip = () => {
setActiveMouse(false);
};

return (
<ToolTipWrapper ref={myRef} onMouseEnter={openToolTip} onMouseLeave={closeToolTip}>
{props.children}
{activeMouse && (
{activeMouse && isVisible && (
<Tooltip {...position} {...props} style={props.style}>
<p>{props.content}</p>
</Tooltip>
Expand Down
6 changes: 6 additions & 0 deletions containers/Connector/Connector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { chain, useAccount, useNetwork, useProvider, useSigner } from 'wagmi';
const useConnector = () => {
const { chain: activeChain } = useNetwork();
const { address, isConnected: isWalletConnected } = useAccount();
const unsupportedNetwork = useMemo(
() => (isWalletConnected ? activeChain?.unsupported ?? false : false),
[activeChain, isWalletConnected]
);
const network = useMemo(
() => (activeChain?.unsupported ? chain.optimism : activeChain ?? chain.optimism),
[activeChain]
Expand Down Expand Up @@ -44,6 +48,8 @@ const useConnector = () => {
}, [l2Synthetixjs]);

return {
activeChain,
unsupportedNetwork,
isWalletConnected,
walletAddress,
provider,
Expand Down
4 changes: 2 additions & 2 deletions containers/Connector/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export const initRainbowkit = () => {
}`,
};
},
stallTimeout: 1000,
stallTimeout: 5000,
priority: 0,
}),
publicProvider({ stallTimeout: 1000, priority: 5 }),
publicProvider({ stallTimeout: 5000, priority: 5 }),
]
);

Expand Down
8 changes: 5 additions & 3 deletions hooks/useIsL2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import Connector from 'containers/Connector';
import { notNill } from 'queries/synths/utils';

const useIsL2 = () => {
const { network } = Connector.useContainer();
const { activeChain } = Connector.useContainer();
const isL2 = useMemo(
() =>
notNill(network) ? [chain.optimism.id, chain.optimismGoerli.id].includes(network.id) : true,
[network]
notNill(activeChain)
? [chain.optimism.id, chain.optimismGoerli.id].includes(activeChain.id)
: false,
[activeChain]
);
return isL2;
};
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,6 @@ module.exports = withPlugins([
},
];
},
productionBrowserSourceMaps: true,
},
]);
Loading

1 comment on commit 7e409f3

@vercel
Copy link

@vercel vercel bot commented on 7e409f3 Sep 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kwenta – ./

kwenta-git-main-kwenta.vercel.app
kwenta.io
kwenta-kwenta.vercel.app

Please sign in to comment.