Skip to content

fix: negative bigint formatting and session remaining_secs clock - #144

Open
kutluhaneth46 wants to merge 5 commits into
tempoxyz:mainfrom
kutluhaneth46:cursor/fix-format-negative-and-session-now-87-88-88c1
Open

kutluhaneth46 wants to merge 5 commits into
tempoxyz:mainfrom
kutluhaneth46:cursor/fix-format-negative-and-session-now-87-88-88c1

Conversation

@kutluhaneth46

Copy link
Copy Markdown

Summary

Two small correctness fixes in wallet-cli shared utilities and session listing.

Changes

  • Format negative bigint token/credit balances without embedding the minus sign inside padded fractional digits (#88)
  • Cache nowSeconds() when computing session remaining_secs so a clock tick cannot produce a negative countdown (#87)
  • Unit coverage for negative formatting
  • Patch changelog entry

Closes #88
Closes #87

Pad absolute fractional digits first, then apply the sign, so values like
-5n with 6 decimals become -0.000005 instead of 0.0000-5. Part of tempoxyz#88.
Lock the sign-outside-fractional-digits behavior for zero, fractional,
and whole negative bigint inputs. Closes tempoxyz#88.
Avoid a clock tick between the grace comparison and subtraction that
could yield a negative remaining_secs. Fixes tempoxyz#87.
Document the race the previous fix removes so it is not reintroduced.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant