Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
719aa79
feat: add use token registry hook
victorkl400 Dec 10, 2025
cd91a37
refactor: align token balances
victorkl400 Dec 10, 2025
75f12b5
Merge branch 'main' into feat/token-registry
victorkl400 Dec 15, 2025
882922b
fix: simplify registry hook
victorkl400 Dec 10, 2025
74036d3
fix: simplify registry hook
victorkl400 Dec 10, 2025
793ba7c
refactor: remove constant token icon and compoent usage:
victorkl400 Dec 10, 2025
0498190
fix: remove token logo and component constants
victorkl400 Dec 10, 2025
e0b151a
fix: placeholder for custom token hook
victorkl400 Dec 10, 2025
d1e6ae9
fix: extends type instead of redeclare
victorkl400 Dec 15, 2025
df176cf
fix: type the format utils
victorkl400 Dec 15, 2025
270d819
fix: normalize addresses before using
victorkl400 Dec 15, 2025
617490b
refactor: simplify token balance hook
victorkl400 Dec 15, 2025
dbe1af7
refactor: align to token new return format
victorkl400 Dec 15, 2025
e13bb81
fix: filter out loading or undefined tokens
victorkl400 Dec 15, 2025
449617f
fix: update swap token content to use react properly
victorkl400 Dec 15, 2025
3453e30
fix: update swap token content to exlcude temp token info
victorkl400 Dec 15, 2025
166b9d8
Merge branch 'main' into feat/token-registry
victorkl400 Dec 24, 2025
becd965
fix: build fix
victorkl400 Dec 24, 2025
7733f59
feat: add localstorage for enabled tokens
victorkl400 Dec 26, 2025
594a6e7
chore: remove unused components
victorkl400 Dec 26, 2025
2016682
refactor: addded centralized urls constant file
victorkl400 Dec 26, 2025
773d6d5
refactor: align url to constant file
victorkl400 Dec 26, 2025
655844f
fix: add url constant file
victorkl400 Dec 29, 2025
73d165e
refactor: align url to constant file
victorkl400 Dec 29, 2025
3681546
fix: update url constant file
victorkl400 Dec 29, 2025
221064e
refactor: align url to constant file
victorkl400 Dec 29, 2025
9d299f7
fix: update indexer urls
victorkl400 Dec 29, 2025
976bdd1
chore: remove unused URLs
victorkl400 Dec 29, 2025
e7bf588
fix: replace toke logo by coinmarket cap
victorkl400 Dec 29, 2025
26c4db3
fix: remove unused
victorkl400 Dec 29, 2025
d6c95a3
fix: remove unused
victorkl400 Dec 29, 2025
219ceb8
fix: replace toke logo by coinmarket cap
victorkl400 Dec 29, 2025
7f17437
refactor: align url to constant file
victorkl400 Dec 29, 2025
8fecde3
fix: remove unused new url
victorkl400 Dec 29, 2025
4983d3b
fix: remove encoded from param to avoid misleading values
victorkl400 Dec 30, 2025
05e1e14
fix: remove void and added underscore to param
victorkl400 Dec 31, 2025
53b54ef
Merge branch 'fix/centralize-urls' into feat/token-registry
victorkl400 Dec 31, 2025
7d336f6
fix: remove urls utils + align with constant file
victorkl400 Dec 31, 2025
b317a33
refactor: align urls to constant file
victorkl400 Dec 31, 2025
b54c816
refactor: align urls to use backslash to no replace
victorkl400 Dec 31, 2025
94fe95c
Merge branch 'fix/centralize-urls' into feat/token-registry
victorkl400 Dec 31, 2025
d148d2f
fix: add backslash
victorkl400 Dec 31, 2025
1527f97
feat: wip new UI
victorkl400 Dec 31, 2025
9b035d4
refactor: align UI with v2
victorkl400 Dec 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ export const BetterSwapLogo = ({ boxSize = '24px', ...props }: { boxSize?: strin
</svg>
);
};

11 changes: 9 additions & 2 deletions packages/vechain-kit/src/assets/icons/PrivyLogo/PrivyLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Image, ImageProps } from '@chakra-ui/react';
import React from 'react';
import { PRIVY_MINTLIFY_ASSETS_S3_BASE_URL } from '@/constants';

type Props = {
isDark?: boolean;
Expand All @@ -10,8 +11,14 @@ export const PrivyLogo: React.FC<Props> = ({ isDark = false, ...props }) => {
<Image
src={
isDark
? 'https://mintlify.s3.us-west-1.amazonaws.com/privy-c2af3412/logo/privy-logo-dark.png'
: 'https://mintlify.s3.us-west-1.amazonaws.com/privy-c2af3412/logo/privy-logo-light.png'
? new URL(
'/privy-c2af3412/logo/privy-logo-dark.png',
PRIVY_MINTLIFY_ASSETS_S3_BASE_URL,
).toString()
: new URL(
'/privy-c2af3412/logo/privy-logo-light.png',
PRIVY_MINTLIFY_ASSETS_S3_BASE_URL,
).toString()
}
alt="Privy Logo"
{...props}
Expand Down
24 changes: 0 additions & 24 deletions packages/vechain-kit/src/assets/icons/VechainLogo/VETLogo.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions packages/vechain-kit/src/assets/icons/VechainLogo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@ export * from './VeBetterIcon';
export * from './VeBetterIconLight';
export * from './VeBetterIconDark';

export * from './VETLogo';
export * from './VTHOLogo';

export * from './VeWorldLogoLight';
export * from './VeWorldLogoDark';
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ import {
VStack,
HStack,
Icon,
IconButton,
Box,
Button,
useToken,
} from '@chakra-ui/react';
import { useRefreshBalances, useWallet, useTotalBalance } from '@/hooks';
import { useState } from 'react';
import { useWallet, useTotalBalance } from '@/hooks';
import { useTranslation } from 'react-i18next';
import { LuRefreshCw } from 'react-icons/lu';
import { AssetIcons } from '@/components/WalletButton/AssetIcons';
import { LuChevronRight } from 'react-icons/lu';

Expand All @@ -26,113 +22,66 @@ export const BalanceSection = ({
}) => {
const { t } = useTranslation();
const { account } = useWallet();
const { formattedBalance, isLoading } = useTotalBalance({
const { formattedBalance } = useTotalBalance({
address: account?.address ?? '',
});

const { refresh } = useRefreshBalances();
const [isRefreshing, setIsRefreshing] = useState(false);
const textSecondary = useToken('colors', 'vechain-kit-text-secondary');

const handleRefresh = async () => {
setIsRefreshing(true);
await refresh();
setTimeout(() => {
setIsRefreshing(false);
}, 1500);
};

return (
<VStack w="full" justifyContent={'start'} spacing={1} mt={mt} mb={mb}>
<HStack
<VStack
w={'full'}
justifyContent={'flex-start'}
alignItems={'center'}
alignItems={'flex-start'}
spacing={2}
role="group"
p={2}
>
<Heading
size={'xs'}
fontWeight={'800'}
color={textSecondary}
textTransform={'uppercase'}
letterSpacing={1.2}
ml={'5px'}
>
{t('Assets')}
{t('Balance')}
</Heading>

<Box
display="flex"
alignItems="center"
justifyContent="center"
w="32px"
h="32px"
>
<IconButton
aria-label="Refresh balances"
variant="ghost"
size="sm"
opacity={0.5}
_hover={{ opacity: 0.8 }}
onClick={handleRefresh}
icon={<Icon as={LuRefreshCw} boxSize={4} />}
isLoading={isLoading || isRefreshing}
sx={{
'& > span.chakra-button__spinner': {
width: '16px',
height: '16px',
position: 'absolute',
},
}}
/>
</Box>
</HStack>
<Heading size={'2xl'} fontWeight={'700'}>
{formattedBalance}
</Heading>
</VStack>

<Button
onClick={onAssetsClick}
h="fit-content"
variant="vechainKitSecondary"
p={2}
>
<VStack
spacing={2}
w="full"
justifyContent="flex-start"
alignItems="flex-start"
mt={4}
mb={4}
<HStack
w={'full'}
justifyContent={'flex-start'}
data-testid="all-assets-button"
>
<Heading size={'2xl'} fontWeight={'700'}>
{formattedBalance}
</Heading>

<HStack
w={'full'}
justifyContent={'flex-start'}
data-testid="all-assets-button"
mt={2}
>
<AssetIcons
style={{
width: '100%',
justifyContent: 'space-between',
}}
maxIcons={10}
iconSize={26}
iconsGap={3}
address={account?.address ?? ''}
showNoAssetsWarning={true}
rightIcon={
<Icon
as={LuChevronRight}
boxSize={5}
opacity={0.5}
marginLeft={2}
/>
}
/>
</HStack>
</VStack>
<AssetIcons
style={{
width: '100%',
justifyContent: 'space-between',
}}
maxIcons={10}
iconSize={26}
iconsGap={3}
address={account?.address ?? ''}
showNoAssetsWarning={true}
rightIcon={
<Icon
as={LuChevronRight}
boxSize={5}
opacity={0.5}
marginLeft={2}
/>
}
/>
</HStack>
</Button>
</VStack>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import { LuExternalLink, LuUserCog, LuShieldCheck } from 'react-icons/lu';
import { useTranslation } from 'react-i18next';
import { useCrossAppConnectionCache } from '@/hooks';
import { VEBETTERDAO_GOVERNANCE_BASE_URL } from '@/constants';

export const CrossAppConnectionSecurityCard = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -112,7 +113,7 @@ export const CrossAppConnectionSecurityCard = () => {
onClick={() => {
window.open(
connectionCache?.ecosystemApp.website ??
'https://governance.vebetterdao.org/',
VEBETTERDAO_GOVERNANCE_BASE_URL,
'_blank',
);
}}
Expand Down
Loading
Loading