Skip to content

fix: update AZTEC decimals from 8 to 4#3943

Merged
johnnyluo merged 1 commit intomainfrom
aztec-decimals-4
Mar 3, 2026
Merged

fix: update AZTEC decimals from 8 to 4#3943
johnnyluo merged 1 commit intomainfrom
aztec-decimals-4

Conversation

@johnnyluo
Copy link
Contributor

@johnnyluo johnnyluo commented Mar 3, 2026

Summary

  • Updates AZTEC (MayaChain) token decimals from 8 to 4 in TokensStore.swift

Test plan

  • Verify AZTEC balance displays correctly with 4 decimal places
  • Verify AZTEC send/swap amounts calculate correctly

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated AZTEC token decimal precision on the Maya Chain network from 8 to 4 decimals. This adjustment ensures proper token representation and value calculations within the app.

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

coderabbitai bot commented Mar 3, 2026

Walkthrough

In TokensStore.swift, the AZTEC token's decimal precision in the Maya Chain token list was adjusted from 8 to 4.

Changes

Cohort / File(s) Summary
Token Metadata Update
VultisigApp/VultisigApp/Stores/TokensStore.swift
AZTEC token decimals adjusted from 8 to 4 in the TokenSelectionAssets array for Maya Chain.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating AZTEC token decimals from 8 to 4 in the TokensStore.swift file, which matches the raw summary and PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch aztec-decimals-4

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
VultisigApp/VultisigApp/Stores/TokensStore.swift (1)

1213-1221: ⚠️ Potential issue | 🔴 Critical

Revert AZTEC decimals to 8 per MayaChain specification.

AZTEC must use 8 decimals (1e8) on MayaChain according to official specification, not 4. The change introduces a critical bug affecting all balance calculations and transactions by 10,000x.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@VultisigApp/VultisigApp/Stores/TokensStore.swift` around lines 1213 - 1221,
The CoinMeta entry for AZTEC under chain: .mayaChain currently sets decimals: 4
but must be 8; update the AZTEC CoinMeta (ticker: "AZTEC", chain: .mayaChain) to
use decimals: 8 so balance math and token amounts use 1e8 precision consistently
across the TokenStore and any consumers that rely on CoinMeta.decimals.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@VultisigApp/VultisigApp/Stores/TokensStore.swift`:
- Around line 1213-1221: The CoinMeta entry for AZTEC under chain: .mayaChain
currently sets decimals: 4 but must be 8; update the AZTEC CoinMeta (ticker:
"AZTEC", chain: .mayaChain) to use decimals: 8 so balance math and token amounts
use 1e8 precision consistently across the TokenStore and any consumers that rely
on CoinMeta.decimals.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8e9a051 and 3cc0c0b.

📒 Files selected for processing (1)
  • VultisigApp/VultisigApp/Stores/TokensStore.swift

@johnnyluo johnnyluo merged commit d6ed045 into main Mar 3, 2026
2 checks passed
@johnnyluo johnnyluo deleted the aztec-decimals-4 branch March 3, 2026 21:07
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