Skip to content

Commit

Permalink
begin WC
Browse files Browse the repository at this point in the history
  • Loading branch information
BitHighlander committed Apr 14, 2024
1 parent da1e263 commit 4653228
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ export const Header = () => {
</Link>
</Flex>
<Flex justifyContent='flex-end' flex={1} rowGap={4} columnGap={2}>
<Button onClick={openWalletConnect}>
<Avatar size="xs" src="placeholder" />
Wallet Connect
</Button>
<ChainMenu display={{ base: 'none', md: 'block' }} />
{/*<Button onClick={openWalletConnect}>*/}
{/* <Avatar size="xs" src="placeholder" />*/}
{/* Wallet Connect*/}
{/*</Button>*/}
{/*<ChainMenu display={{ base: 'none', md: 'block' }} />*/}
</Flex>
</HStack>
</HStack>
Expand Down
40 changes: 20 additions & 20 deletions packages/keepkey-desktop-app/src/pages/Browser/Browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@chakra-ui/icons'
import { HStack, IconButton, Input, Stack, useDisclosure, Drawer,
DrawerContent,
DrawerOverlay, Button } from '@chakra-ui/react'
DrawerOverlay, Button, IconButton, Avatar } from '@chakra-ui/react'
import * as Comlink from 'comlink'
import { Main } from 'components/Layout/Main'
import { getConfig } from 'config'
Expand Down Expand Up @@ -110,7 +110,7 @@ export const Browser = () => {
useEffect(() => {
onOpen()
}, []); // Include dependencies if they change over time

useEffect(() => {
const setupListeners = () => {
const webview = getWebview();
Expand Down Expand Up @@ -252,7 +252,7 @@ export const Browser = () => {
onOpen();
}
};

useEffect(() => {
if (!webviewReady) return

Expand All @@ -275,22 +275,6 @@ export const Browser = () => {
flexDirection: 'column',
}}
>
<Stack direction='row' flex={1}>
<webview
id='webview'
partition='browser'
src='about:blank'
style={{ flexGrow: 8 }}
allowpopups='true'
></webview>
<Stack flex={4} display={isOpen ? 'flex' : 'none'}>
<webview
id='second-webview-top'
src='https://wallet-connect-dapp-ochre.vercel.app/'
style={{ flex: 4 }}
></webview>
</Stack>
</Stack>
<Stack direction={{ base: 'column', md: 'column' }} height='full' style={{ margin: '5px' }}>
<form onSubmit={formatAndSaveUrl}>
<HStack>
Expand Down Expand Up @@ -322,9 +306,25 @@ export const Browser = () => {
isDisabled={!canGoForward}
/>
<IconButton aria-label='Open developer tools' icon={<FaBug />} onClick={openDevTools} />
<Button onClick={toggleSecondWebview}><Avatar size="xs" src="https://asset.brandfetch.io/id11-wfgsq/idYIhr7BJC.jpeg" />{isOpen ? 'Wallet Connect' : 'Wallet Connect'}</Button>
</HStack>
</form>
<Button onClick={toggleSecondWebview}>{isOpen ? 'Close Second Webview' : 'Open Second Webview'}</Button>
</Stack>
<Stack direction='row' flex={1}>
<webview
id='webview'
partition='browser'
src='about:blank'
style={{ flexGrow: 8 }}
allowpopups='true'
></webview>
<Stack flex={4} display={isOpen ? 'flex' : 'none'}>
<webview
id='second-webview-top'
src='https://wallet-connect-dapp-ochre.vercel.app/'
style={{ flex: 4 }}
></webview>
</Stack>
</Stack>
</Main>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/keepkey-desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "keepkey-desktop",
"version": "2.2.0",
"version": "3.0.0",
"author": {
"name": "KeepKey",
"email": "[email protected]"
Expand Down

0 comments on commit 4653228

Please sign in to comment.