Skip to content

fix: round incoming payment amount before converting to bigint - #2253

Merged
Tymmmy merged 1 commit into
interledger:mainfrom
prakashNalla:fix/request-money-decimal-2252
Oct 6, 2026
Merged

Tymmmy merged 1 commit into
interledger:mainfrom
prakashNalla:fix/request-money-decimal-2252

Conversation

@prakashNalla

Copy link
Copy Markdown
Contributor

Context

Changes

  • Round the amount with .toFixed() before BigInt, same as the quote service does. 1.13 * 100 is 112.99999999999999 in JS, so BigInt threw and Request Money returned a 500.
  • Add a test for a decimal amount (1.13 -> 113).

Before / after with 1.13:

before after

@github-actions github-actions Bot added package: wallet/backend Wallet backend implementations type: test Improvements or additions to tests type: source Source changes labels Oct 6, 2026
@Tymmmy
Tymmmy merged commit dc98a71 into interledger:main Oct 6, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted package: wallet/backend Wallet backend implementations type: source Source changes type: test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Request Money fails with Internal Server Error for amounts like 1.13

2 participants