Skip to content

feat: add AlgoVoi wallet support#278

Closed
chopmob-cloud wants to merge 1 commit intoDorkFi:betafrom
chopmob-cloud:feat/add-algovoi-wallet
Closed

feat: add AlgoVoi wallet support#278
chopmob-cloud wants to merge 1 commit intoDorkFi:betafrom
chopmob-cloud:feat/add-algovoi-wallet

Conversation

@chopmob-cloud
Copy link
Copy Markdown

@chopmob-cloud chopmob-cloud commented Mar 25, 2026

Summary

  • Adds AlgoVoi to the wallet selection modal for all AVM networks (Algorand + Voi)
  • Registers 'algovoi' in WalletManager (NetworkContext) alongside existing AVM wallets
  • Marks AlgoVoi as a universal wallet — supports both Algorand Mainnet and Voi Mainnet
  • Connection handler detects the extension directly via window.algorand.isAlgoVoi as a fallback, so it works today without waiting for the npm package

How it works

AlgoVoi is a browser extension wallet that injects an ARC-27 compliant window.algorand provider. The connect flow:

  1. If WalletId.ALGOVOI is registered in use-wallet (after TxnLab/use-wallet#434 lands) → uses the standard use-wallet path
  2. Until then → falls back to calling window.algorand.enable() directly via ARC-27

This means the button works immediately for users who have AlgoVoi installed, and the integration upgrades automatically once the use-wallet package ships the named provider.

Files changed

  • src/contexts/NetworkContext.tsx — register 'algovoi' in getWalletsForNetwork(), add to universal wallet list in isNetworkSupportedByWallet()
  • src/components/WalletModal.tsx — add AlgoVoi entry to baseWallets, availability check via window.algorand.isAlgoVoi, dedicated connection handler

Links

Test plan

  • Install AlgoVoi Chrome extension
  • Open DorkFi on Voi Mainnet → Connect Wallet → AlgoVoi appears in the list
  • Click Connect → AlgoVoi popup opens → approve → wallet connects
  • Switch to Algorand Mainnet → AlgoVoi still available
  • Without AlgoVoi installed → button does not appear

- Register 'algovoi' in WalletManager (NetworkContext) alongside existing AVM wallets
- Add AlgoVoi to the wallet selection modal (WalletModal) for all AVM networks
- Mark AlgoVoi as a universal wallet (supports both Algorand and Voi Mainnet)
- Connection handler uses window.algorand directly as fallback until
  TxnLab/use-wallet#434 lands; upgrades automatically to use-wallet path once available
- Availability check detects the extension via window.algorand.isAlgoVoi so the
  button appears even before the npm package ships WalletId.ALGOVOI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@temptemp3
Copy link
Copy Markdown
Contributor

Boom. Ty Chris. I'll have a look at this sooner than later.

@temptemp3 temptemp3 changed the base branch from next to beta March 25, 2026 17:01
@temptemp3
Copy link
Copy Markdown
Contributor

The AlgoVoi extension url might be broken. Can you check it. Ty @chopmob-cloud

@chopmob-cloud
Copy link
Copy Markdown
Author

Hi @temptemp3 — the link in the PR description was wrong, sorry about that! The correct URL is https://github.com/chopmob-cloud/AlgoVoi — I'll update the PR description now.

@temptemp3
Copy link
Copy Markdown
Contributor

@chopmob-cloud could you make sure that the update is working as expected. I haven't been able to connect. Ty

@chopmob-cloud
Copy link
Copy Markdown
Author

Hi @temptemp3 — confirmed the extension and MCP server are both healthy (sessions active as of ~23:00 UTC today).

The connection issue is in the PR's fallback path. When WalletId.ALGOVOI isn't registered in the installed use-wallet package (because TxnLab/use-wallet#434 hasn't landed yet), wallets.find(w => w.id === 'algovoi') returns undefined, so the code takes the direct ARC-27 path:

const accounts = await algoVoiProvider.enable({ genesisHash: undefined });
if (!accounts?.accounts?.length) throw new Error('No accounts returned');
// ← toast shown here, but DorkFi wallet state is never updated
toast({ title: 'AlgoVoi Connected', ... });

The popup opens, the user approves, enable() resolves with accounts — but no setActiveWallet() / setActiveAccount() call follows, so DorkFi's UI stays disconnected even though the ARC-27 handshake succeeded.

Fix needed in the PR: after the enable() call, persist the connected accounts into DorkFi's wallet state (however Kibisis/other ARC-27 wallets do it). Once TxnLab/use-wallet#434 merges and the npm package ships, the registeredWallet.connect() path will handle state automatically.

Also worth noting: 'algovoi' as any in NetworkContext may cause use-wallet to log a warning about an unknown wallet ID — harmless, but worth checking the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants