diff --git a/apps/sample-react-app/package.json b/apps/sample-react-app/package.json index c5692e0b..9e5cb767 100644 --- a/apps/sample-react-app/package.json +++ b/apps/sample-react-app/package.json @@ -44,6 +44,7 @@ "@vechain/hardhat-web3": "^0.1.4", "@vechain/picasso": "^2.1.1", "@vechain/react-wallet-kit": "*", + "@vechain/vanilla-wallet-kit": "*", "@vechain/wallet-connect": "*", "@vechain/wallet-kit": "*", "@vechain/web3-providers-connex": "^1.1.2", diff --git a/apps/sample-react-app/public/images/logo/sync.png b/apps/sample-react-app/public/images/logo/sync.png deleted file mode 100644 index c0248675..00000000 Binary files a/apps/sample-react-app/public/images/logo/sync.png and /dev/null differ diff --git a/apps/sample-react-app/public/images/logo/sync2.png b/apps/sample-react-app/public/images/logo/sync2.png deleted file mode 100644 index a3ec7952..00000000 Binary files a/apps/sample-react-app/public/images/logo/sync2.png and /dev/null differ diff --git a/apps/sample-react-app/public/images/logo/veWorld.png b/apps/sample-react-app/public/images/logo/veWorld.png deleted file mode 100644 index 73e830c8..00000000 Binary files a/apps/sample-react-app/public/images/logo/veWorld.png and /dev/null differ diff --git a/apps/sample-react-app/public/images/logo/vechain.png b/apps/sample-react-app/public/images/logo/vechain.png deleted file mode 100644 index 6f12941e..00000000 Binary files a/apps/sample-react-app/public/images/logo/vechain.png and /dev/null differ diff --git a/apps/sample-react-app/public/images/logo/vechain_white.png b/apps/sample-react-app/public/images/logo/vechain_white.png deleted file mode 100644 index 8978093e..00000000 Binary files a/apps/sample-react-app/public/images/logo/vechain_white.png and /dev/null differ diff --git a/apps/sample-react-app/public/images/logo/veworld_black.png b/apps/sample-react-app/public/images/logo/veworld_black.png deleted file mode 100644 index e03f9f1d..00000000 Binary files a/apps/sample-react-app/public/images/logo/veworld_black.png and /dev/null differ diff --git a/apps/sample-react-app/public/images/logo/wallet-connect-logo.png b/apps/sample-react-app/public/images/logo/wallet-connect-logo.png deleted file mode 100644 index 24a9d885..00000000 Binary files a/apps/sample-react-app/public/images/logo/wallet-connect-logo.png and /dev/null differ diff --git a/apps/sample-react-app/src/Components/SwitchWalletButton.tsx b/apps/sample-react-app/src/Components/SwitchWalletButton.tsx index 5a2c6319..ea0a034f 100644 --- a/apps/sample-react-app/src/Components/SwitchWalletButton.tsx +++ b/apps/sample-react-app/src/Components/SwitchWalletButton.tsx @@ -14,22 +14,20 @@ export const SwitchWalletButton: React.FC = ({ }): React.ReactElement => { const { isOpen, onOpen, onClose } = useDisclosure(); - const { - accountState: { address, source }, - } = useWallet(); + const { account, source } = useWallet(); - if (address && source) + if (account && source) return ( <> diff --git a/apps/sample-react-app/src/Components/layout/NavBar.tsx b/apps/sample-react-app/src/Components/layout/NavBar.tsx index 1790917b..432bf320 100644 --- a/apps/sample-react-app/src/Components/layout/NavBar.tsx +++ b/apps/sample-react-app/src/Components/layout/NavBar.tsx @@ -18,7 +18,6 @@ import type { JSX } from 'react'; import React from 'react'; import { Bars3Icon } from '@heroicons/react/24/solid'; import { useWallet } from '@vechain/react-wallet-kit'; -import { VechainLogo } from '../../Logos'; import { AccountDetailBody } from '../AccountDetailBody'; import { SwitchWalletButton } from '../SwitchWalletButton'; @@ -49,9 +48,7 @@ export const NavBar = (): JSX.Element => { const DesktopNavBar = (): JSX.Element => { return ( <> - - - + ); @@ -62,9 +59,7 @@ const MobileNavBar = (): JSX.Element => { return ( <> - - - + { - const { accountState, disconnect } = useWallet(); + const { account, source, disconnect } = useWallet(); return ( @@ -94,11 +89,11 @@ const MobileNavBarDrawer = ({ Connected Wallet - {accountState.address && accountState.source ? ( + {account && source ? ( ) : ( diff --git a/apps/sample-react-app/src/Logos/Logo.tsx b/apps/sample-react-app/src/Logos/Logo.tsx index 7e15008d..9304e678 100644 --- a/apps/sample-react-app/src/Logos/Logo.tsx +++ b/apps/sample-react-app/src/Logos/Logo.tsx @@ -1,36 +1,17 @@ import type { HTMLChakraProps } from '@chakra-ui/react'; -import { Image, useColorModeValue } from '@chakra-ui/react'; +import { Image } from '@chakra-ui/react'; import React from 'react'; +import { VeWorldLogo as VWLogo } from '@vechain/vanilla-wallet-kit'; type IIMage = HTMLChakraProps<'img'>; -export const VechainLogo: React.FC = ({ - ...props -}): React.ReactElement => { - const lightModeUrl = `${process.env.PUBLIC_URL}/images/logo/vechain.png`; - const darkModeUrl = `${process.env.PUBLIC_URL}/images/logo/vechain_white.png`; - const logoUrl = useColorModeValue(lightModeUrl, darkModeUrl); - return ( - Vechain logo - ); -}; - export const VeWorldLogo: React.FC = ({ ...props }) => { - const lightModeUrl = `${process.env.PUBLIC_URL}/images/logo/veWorld.png`; - const darkModeUrl = `${process.env.PUBLIC_URL}/images/logo/veworld_black.png`; - const logoUrl = useColorModeValue(lightModeUrl, darkModeUrl); return ( VeWorld logo ); diff --git a/apps/sample-react-app/src/Screens/components/Counter.tsx b/apps/sample-react-app/src/Screens/components/Counter.tsx index 97b56f0c..adc696fd 100644 --- a/apps/sample-react-app/src/Screens/components/Counter.tsx +++ b/apps/sample-react-app/src/Screens/components/Counter.tsx @@ -18,7 +18,7 @@ import { useCounter } from '../../Hooks/useCounter'; import { AddressButton } from '../../Components'; export const Counter = (): JSX.Element => { - const { accountState } = useWallet(); + const { account } = useWallet(); const { count, increment, status, address, error } = useCounter(); const toast = useToast(); @@ -40,9 +40,7 @@ export const Counter = (): JSX.Element => { return ( ); - }, [accountState.address, incrementCounter, status]); + }, [account, incrementCounter, status]); const message = useMemo(() => { switch (status) { diff --git a/apps/sample-vue-app/src/App.vue b/apps/sample-vue-app/src/App.vue index e2e69e10..667e9fc4 100644 --- a/apps/sample-vue-app/src/App.vue +++ b/apps/sample-vue-app/src/App.vue @@ -5,37 +5,18 @@ - diff --git a/apps/sample-vue-app/src/connex/ConnexProvider.vue b/apps/sample-vue-app/src/connex/ConnexProvider.vue index bf1d5d6b..08590563 100644 --- a/apps/sample-vue-app/src/connex/ConnexProvider.vue +++ b/apps/sample-vue-app/src/connex/ConnexProvider.vue @@ -1,9 +1,9 @@