Synthetixio / kwenta

DEPRECATED. Please use: https://github.com/Kwenta/kwenta
MIT License
11 stars 20 forks source link

feat: added support for L2 kwenta logo #285

Closed jcmonte closed 3 years ago

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/synthetixio/kwenta/GktYgbJCsFbpWBQvioUMhbCYhzPW
✅ Preview: https://kwenta-git-feat-l2-logo-synthetixio.vercel.app

evgenyboxer commented 3 years ago

@JChiaramonte7 lgtm!

btw you could make isL2 a computed selector (much like truncatedWalletAddressState is)

file: store/wallet/index.ts

export const isL2State = selector<boolean>({
    key: getWalletKey('isL2'),
    get: ({ get }) => {
        return network?.useOvm ?? false;
    },
});

then inside the components: const isL2 = useRecoilValue(isL2State)

further reading on selectors - https://recoiljs.org/docs/basic-tutorial/selectors/