Skip to content

Commit 1a34901

Browse files
authored
feat: update destinationMuxedId to BigInteger and remove destinationMuxedIdType. (#710)
1 parent cbb3d5a commit 1a34901

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

src/main/java/org/stellar/sdk/responses/operations/InvokeHostFunctionOperationResponse.java

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import static org.stellar.sdk.Asset.create;
44

55
import com.google.gson.annotations.SerializedName;
6+
import java.math.BigInteger;
67
import java.util.List;
78
import lombok.EqualsAndHashCode;
89
import lombok.Value;
@@ -77,25 +78,11 @@ public static class AssetContractBalanceChange {
7778
@SerializedName("amount")
7879
String amount;
7980

80-
@SerializedName("destination_muxed_id_type")
81-
DestinationMuxedIdType destinationMuxedIdType;
82-
8381
@SerializedName("destination_muxed_id")
84-
String destinationMuxedId;
82+
BigInteger destinationMuxedId;
8583

8684
public Asset getAsset() {
8785
return create(assetType, assetCode, assetIssuer);
8886
}
89-
90-
public enum DestinationMuxedIdType {
91-
@SerializedName("string")
92-
STRING,
93-
94-
@SerializedName("uint64")
95-
UINT64,
96-
97-
@SerializedName("bytes")
98-
BYTES
99-
}
10087
}
10188
}

src/test/java/org/stellar/sdk/responses/OperationResponseTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import static org.junit.Assert.assertTrue;
77

88
import java.io.IOException;
9+
import java.math.BigInteger;
910
import java.nio.charset.StandardCharsets;
1011
import java.nio.file.Files;
1112
import java.nio.file.Paths;
@@ -382,9 +383,8 @@ public void testInvokeHostFunctionOperation() throws IOException {
382383
response.getAssetBalanceChanges().get(0).getTo());
383384
assertEquals("500.0000000", response.getAssetBalanceChanges().get(0).getAmount());
384385
assertEquals(
385-
InvokeHostFunctionOperationResponse.AssetContractBalanceChange.DestinationMuxedIdType
386-
.UINT64,
387-
response.getAssetBalanceChanges().get(0).getDestinationMuxedIdType());
386+
new BigInteger("123456789"),
387+
response.getAssetBalanceChanges().get(0).getDestinationMuxedId());
388388
}
389389

390390
@Test

src/test/resources/responses/operations/invoke_host_function.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"from": "GDAT5HWTGIU4TSSZ4752OUC4SABDLTLZFRPZUJ3D6LKBNEPA7V2CIG54",
5959
"to": "GBMLPRFCZDZJPKUPHUSHCKA737GOZL7ERZLGGMJ6YGHBFJZ6ZKMKCZTM",
6060
"amount": "500.0000000",
61-
"destination_muxed_id_type": "uint64",
6261
"destination_muxed_id": "123456789"
6362
}
6463
]

0 commit comments

Comments
 (0)