Skip to content

Commit

Permalink
refactor: add an independent Claimant for use in the response packa…
Browse files Browse the repository at this point in the history
…ge. (#631)
  • Loading branch information
overcat authored Aug 9, 2024
1 parent 36490a7 commit 4582aac
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
9 changes: 2 additions & 7 deletions src/main/java/org/stellar/sdk/Claimant.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
package org.stellar.sdk;

import com.google.gson.annotations.SerializedName;
import lombok.NonNull;
import lombok.Value;

/** Represents an entity who is eligible to claim the claimable balance. */
@Value
public class Claimant {
/** The destination account id. */
@SerializedName("destination")
@NonNull
String destination;
@NonNull String destination;

/** The predicate for this claimable balance. */
@SerializedName("predicate")
@NonNull
Predicate predicate;
@NonNull Predicate predicate;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import lombok.EqualsAndHashCode;
import lombok.Value;
import org.stellar.sdk.Asset;
import org.stellar.sdk.Claimant;

/**
* Represents a claimable balance response.
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/org/stellar/sdk/responses/Claimant.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.stellar.sdk.responses;

import com.google.gson.annotations.SerializedName;
import lombok.Value;
import org.stellar.sdk.Predicate;

/** Represents an entity who is eligible to claim the claimable balance. */
@Value
public class Claimant {
/** The destination account id. */
@SerializedName("destination")
String destination;

/** The predicate for this claimable balance. */
@SerializedName("predicate")
Predicate predicate;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import lombok.EqualsAndHashCode;
import lombok.Value;
import org.stellar.sdk.Asset;
import org.stellar.sdk.Claimant;
import org.stellar.sdk.responses.Claimant;

/**
* Represents CreateClaimableBalance operation response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import java.util.List;
import org.junit.Test;
import org.stellar.sdk.AssetTypeNative;
import org.stellar.sdk.Claimant;
import org.stellar.sdk.Predicate;
import org.stellar.sdk.responses.gson.GsonSingleton;
import org.stellar.sdk.xdr.TimePoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.stellar.sdk.AssetTypeCreditAlphaNum12;
import org.stellar.sdk.AssetTypeCreditAlphaNum4;
import org.stellar.sdk.AssetTypeNative;
import org.stellar.sdk.Claimant;
import org.stellar.sdk.Predicate;
import org.stellar.sdk.TrustLineAsset;
import org.stellar.sdk.responses.gson.GsonSingleton;
Expand Down

0 comments on commit 4582aac

Please sign in to comment.