Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion public/configs/default-chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
],
"prefix": "b",
"decimals": 8,
"apis": [{ "type": "biowallet-v1", "endpoint": "https://walletapi.biw-meta.com/wallet/biwmeta", "config": { "genesisBlock": "./genesis/biwmeta.json" } }],
"apis": [{ "type": "biowallet-v1", "endpoint": "https://walletapi.bfmeta.info/wallet/biwmeta", "config": { "genesisBlock": "./genesis/biwmeta.json" } }],
"explorer": {
"url": "https://tracker.biw-meta.info",
"queryTx": "https://tracker.biw-meta.info/#/info/event-details/:signature",
Expand Down
2 changes: 1 addition & 1 deletion scripts/collect-real-transaction-fixtures.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async function main() {
writeJson('bfmeta-transactions-query.json', bfmetaQuery)

// BIW (BIWMeta) - collect provided real signatures
const biwmetaBase = 'https://walletapi.biw-meta.com/wallet/biwmeta'
const biwmetaBase = 'https://walletapi.bfmeta.info/wallet/biwmeta'
const biwmetaLastblock = await fetchJson(`${biwmetaBase}/lastblock`)
writeJson('biwmeta-lastblock.json', biwmetaLastblock)

Expand Down
32 changes: 28 additions & 4 deletions src/components/token/token-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,18 +199,42 @@ export function TokenItem({

// Get menu items if provided
const items = menuItems?.(token, context).filter((item) => item.show !== false) ?? [];

// When there are menu items (which render as buttons), Item cannot be a button
// to avoid button nesting hydration errors
const hasMenuItems = items.length > 0;
const shouldRenderAsButton = isClickable && !hasMenuItems;

return (
<Item
{...(testId && { 'data-testid': testId })}
variant="default"
size="default"
render={isClickable ? <button type="button" /> : undefined}
onClick={onClick}
aria-label={isClickable ? t('common:a11y.tokenDetails', { token: token.symbol }) : undefined}
render={shouldRenderAsButton ? <button type="button" /> : undefined}
onClick={shouldRenderAsButton ? onClick : undefined}
aria-label={shouldRenderAsButton ? t('common:a11y.tokenDetails', { token: token.symbol }) : undefined}
className={cn(isClickable && 'hover:bg-muted/50 active:bg-muted cursor-pointer', className)}
>
{itemContent}
{/* When we have menu items, wrap content in a clickable div */}
{hasMenuItems && isClickable ? (
<div
role="button"
tabIndex={0}
onClick={onClick}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
onClick?.();
}
}}
aria-label={t('common:a11y.tokenDetails', { token: token.symbol })}
className="flex flex-1 items-center gap-2.5 outline-none"
>
{itemContent}
</div>
) : (
itemContent
)}

{/* More button with dropdown menu - min 44x44 touch target */}
{items.length > 0 && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function readFixture<T>(name: string): T {
describe('BiowalletProvider (BIWMeta real fixtures)', () => {
const entry: ParsedApiEntry = {
type: 'biowallet-v1',
endpoint: 'https://walletapi.biw-meta.com/wallet/biwmeta',
endpoint: 'https://walletapi.bfmeta.info/wallet/biwmeta',
};

const lastblock = readFixture<any>('biwmeta-lastblock.json');
Expand Down