Skip to content

Replace string#475

Merged
DenisCarriere merged 2 commits intomainfrom
fix/amount-string
Apr 16, 2026
Merged

Replace string#475
DenisCarriere merged 2 commits intomainfrom
fix/amount-string

Conversation

@DenisCarriere
Copy link
Copy Markdown
Contributor

This pull request updates the handling of the amount field in the SVM balances routes to consistently treat it as a string instead of a number. This change ensures compatibility with large numeric values that may exceed JavaScript's safe integer range.

Schema and type consistency:

  • Updated the amount field in the API response schema from z.number() to z.string() in src/routes/balances/svm_native.ts to reflect the new string type for amounts.

SQL query adjustments:

  • Modified the SQL queries in both src/routes/balances/svm.sql and src/routes/balances/svm_native.sql to cast the amount field to a string using String(b.amount) in the SELECT statements. [1] [2]

@YaroShkvorets YaroShkvorets temporarily deployed to fix/amount-string - token-api PR #475 April 16, 2026 14:04 — with Render Destroyed
@YaroShkvorets YaroShkvorets temporarily deployed to fix/amount-string - token-api PR #475 April 16, 2026 14:04 — with Render Destroyed
@DenisCarriere DenisCarriere merged commit 683d041 into main Apr 16, 2026
2 of 3 checks passed
@DenisCarriere DenisCarriere deleted the fix/amount-string branch April 16, 2026 14:05
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