Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Update:
- feat: add `isValidSignedPayload` to `StrKey` class, this function can be used to validate the ed25519 signed payload. ([#712](https://github.com/stellar/java-stellar-sdk/pull/712))
- feat: add `signExtraSignersPayload` to sign extra signers payloads in `Transaction` class. ([#713](https://github.com/stellar/java-stellar-sdk/pull/713))
- refactor: add balance id validation. ([#722](https://github.com/stellar/java-stellar-sdk/pull/722))

### Breaking changes:
- feat: add `org.stellar.sdk.SignerKey` for enhanced signer key handling. ([#712](https://github.com/stellar/java-stellar-sdk/pull/712))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public abstract static class ClaimClaimableBalanceOperationBuilder<
B extends ClaimClaimableBalanceOperationBuilder<C, B>>
extends OperationBuilder<C, B> {
public B balanceId(@NonNull String balanceId) {
// TODO: add validation in other places
if (balanceId.length() != 8 + 64) {
throw new IllegalArgumentException("invalid balanceId: " + balanceId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public abstract static class ClawbackClaimableBalanceOperationBuilder<
B extends ClawbackClaimableBalanceOperationBuilder<C, B>>
extends OperationBuilder<C, B> {
public B balanceId(@NonNull String balanceId) {
if (balanceId.length() != 8 + 64) {
throw new IllegalArgumentException("invalid balanceId: " + balanceId);
}
this.balanceId = balanceId.toLowerCase();
return self();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ public abstract static class RevokeClaimableBalanceSponsorshipOperationBuilder<
B extends RevokeClaimableBalanceSponsorshipOperationBuilder<C, B>>
extends OperationBuilder<C, B> {
public B balanceId(@NonNull String balanceId) {
if (balanceId.length() != 8 + 64) {
throw new IllegalArgumentException("invalid balanceId: " + balanceId);
}
this.balanceId = balanceId.toLowerCase();
return self();
}
Expand Down
Loading