Skip to content

Fix currency formatting locale and clean up money transfer command - #20

Merged
twisti-dev merged 2 commits into
version/26.1from
fix/currency-format
Jun 6, 2026
Merged

twisti-dev merged 2 commits into
version/26.1from
fix/currency-format

Conversation

@twisti-dev

Copy link
Copy Markdown
Contributor

This pull request includes several small changes focused on improving currency formatting, updating the project version, and cleaning up user messaging in the payment command.

Currency formatting:

  • The default locale for formatting currency strings in CurrencyScale.formatString was changed from the system default to Locale.GERMAN, ensuring consistent formatting regardless of server settings.

Project configuration:

  • The project version in gradle.properties was bumped from 4.0.4 to 4.0.5.

User messaging:

  • The informational message "Überweisung wird ausgeführt..." sent to the sender before processing a payment was removed from PayCommand.kt, reducing unnecessary output.

- update default locale in formatString method from Locale.getDefault to Locale.GERMAN
- ensures consistent currency formatting across the application
@twisti-dev twisti-dev self-assigned this Jun 6, 2026
Copilot AI review requested due to automatic review settings June 6, 2026 21:11
@twisti-dev
twisti-dev merged commit 61da326 into version/26.1 Jun 6, 2026
2 checks passed
@twisti-dev
twisti-dev deleted the fix/currency-format branch June 6, 2026 21:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the end-user experience and consistency of money display/transfer flows by adjusting default currency formatting behavior, bumping the project version, and reducing chat noise in the Paper /pay command.

Changes:

  • Switches CurrencyScale.formatString default formatting locale to Locale.GERMAN.
  • Bumps project version from 4.0.4 to 4.0.5.
  • Removes the pre-transfer “Überweisung wird ausgeführt...” informational message from the Paper pay command.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
surf-transaction-paper/src/main/kotlin/dev/slne/surf/transaction/paper/commands/pay/PayCommand.kt Removes a pre-transfer sender info message (and triggers an unused-import cleanup need).
surf-transaction-api/src/main/kotlin/dev/slne/surf/transaction/api/currency/CurrencyScale.kt Changes default locale used for numeric formatting in the public API helper.
gradle.properties Increments the project version to 4.0.5.

info("Überweisung wird ausgeführt...")
}

val currency = Currency.default()
Comment on lines 59 to 62
fun formatString(
amount: BigDecimal,
locale: Locale = Locale.getDefault(Locale.Category.FORMAT)
locale: Locale = Locale.GERMAN
): String = NumberFormat.getNumberInstance(locale).format(format(amount))
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