aurora-rs / stellar-base-rs

Low level Stellar types for Rust.
https://docs.rs/stellar-base
Apache License 2.0
8 stars 6 forks source link

Fix remove trustline #11

Closed bjorn closed 11 months ago

bjorn commented 11 months ago

Reopening #8 with some additional changes.

codecov[bot] commented 11 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (9070dd0) 65.68% compared to head (032b9bf) 65.68%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #11 +/- ## ======================================= Coverage 65.68% 65.68% ======================================= Files 44 44 Lines 3785 3785 ======================================= Hits 2486 2486 Misses 1299 1299 ``` | [Files](https://app.codecov.io/gh/aurora-rs/stellar-base-rs/pull/11?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aurora-rs) | Coverage Δ | | |---|---|---| | [src/operations/change\_trust.rs](https://app.codecov.io/gh/aurora-rs/stellar-base-rs/pull/11?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aurora-rs#diff-c3JjL29wZXJhdGlvbnMvY2hhbmdlX3RydXN0LnJz) | `61.05% <50.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bjorn commented 11 months ago

Maybe I should choose a different changelog message, because I realized the library already allowed removing a trustline, by not specifying any limit:

https://github.com/aurora-rs/stellar-base-rs/blob/9070dd02978231e552c490de879a6a7ce775d080/src/operations/change_trust.rs#L65-L68

It just didn't allow explicitly passing 0, but not setting any limit would make it default to 0 (unlike the Stellar Laboratory, which then defaults to maximum int64).