Skip to content

Conversation

@lijamie98
Copy link
Contributor

@lijamie98 lijamie98 commented May 23, 2025

In Anchor Platform, we have to convert int128 to BigInteger. It would be nice for the SDK to support these functions as well for convenience.

I did not find any helper functions. Let me know if these functions already exist.

@codecov
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.18%. Comparing base (a1edad0) to head (4696f40).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #692   +/-   ##
=========================================
  Coverage     80.18%   80.18%           
  Complexity     1227     1227           
=========================================
  Files           213      213           
  Lines          4820     4820           
  Branches        412      412           
=========================================
  Hits           3865     3865           
  Misses          703      703           
  Partials        252      252           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@overcat
Copy link
Member

overcat commented May 23, 2025

Hi @lijamie98, you can take a look at a series of classes under the scval package, such as ScvUint128. Does this meet your needs?

@lijamie98
Copy link
Contributor Author

Hi @lijamie98, you can take a look at a series of classes under the scval package, such as ScvUint128. Does this meet your needs?

Yes that works. Can we make the class public?

@lijamie98
Copy link
Contributor Author

oh, I can use Scv.fromInt128()

@lijamie98 lijamie98 closed this May 24, 2025
lijamie98 added a commit to stellar/anchor-platform that referenced this pull request May 27, 2025
…1749)

### Description

- [CHORE] Use `Scv.fromInt128` to replace our `BigInteger` conversion
- refer to:
lightsail-network/java-stellar-sdk#692 (comment)
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