Skip to content

Conversation

@letonchanh
Copy link
Member

No description provided.

@vercel
Copy link

vercel bot commented Dec 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
vana-console Ready Ready Preview Jan 8, 2026 1:40am
vana-rbac-auditor Ready Ready Preview Jan 8, 2026 1:40am
vana-vibes-demo Ready Ready Preview Jan 8, 2026 1:40am

@letonchanh letonchanh requested a review from bnunamak December 16, 2025 05:26
@github-actions
Copy link

  • packages/vana-sdk/src/controllers/staking.ts:553-595 & 685-723 – stake/unstake only check that a wallet client exists and then fall back to userAddress if no account is configured. If a wallet client is present but lacks an account (common when a viem wallet is constructed without one), writeContract will throw “No account provided” or attempt to sign with an address the client can't use. Use assertWallet() (or otherwise require a connected account) and avoid the userAddress fallback for signing to prevent confusing runtime failures.
  • packages/vana-sdk/src/controllers/staking.ts:495 – Scaling uses BigInt(1e18) derived from a JS number literal above the safe integer range; at that magnitude increments aren’t representable, so the conversion depends on a rounded value. Using a BigInt literal (10n ** 18n) would avoid precision risk in currentValue/reward math.
  • packages/vana-sdk/src/controllers/staking.ts:553-595 – stake doesn’t accept TransactionOptions/spreadTransactionOptions like unstake does, so callers can’t override gas/nonce/fees when estimation is off. Consider adding an optional options argument for parity and to reduce failed transactions.

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