Skip to content

Commit

Permalink
Use lowercase type names in AnchorEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
philipliu committed Aug 10, 2023
1 parent 4a5f8d4 commit d01efea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.stellar.anchor.api.event;

import com.google.gson.annotations.SerializedName;
import lombok.*;
import org.stellar.anchor.api.platform.GetQuoteResponse;
import org.stellar.anchor.api.platform.GetTransactionResponse;
Expand All @@ -24,9 +25,13 @@ public class AnchorEvent {
GetQuoteResponse quote;

public enum Type {
@SerializedName("transaction_created")
TRANSACTION_CREATED("transaction_created"),
@SerializedName("transaction_status_changed")
TRANSACTION_STATUS_CHANGED("transaction_status_changed"),
@SerializedName("transaction_error")
TRANSACTION_ERROR("transaction_error"),
@SerializedName("quote_created")
QUOTE_CREATED("quote_created");

public final String type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ class Sep24End2EndTest(config: TestConfig, val jwt: String) {
"""
[
{
"type": "TRANSACTION_CREATED",
"type": "transaction_created",
"sep": "24",
"transaction": {
"sep": "24",
Expand All @@ -387,7 +387,7 @@ class Sep24End2EndTest(config: TestConfig, val jwt: String) {
}
},
{
"type": "TRANSACTION_STATUS_CHANGED",
"type": "transaction_status_changed",
"sep": "24",
"transaction": {
"sep": "24",
Expand All @@ -407,7 +407,7 @@ class Sep24End2EndTest(config: TestConfig, val jwt: String) {
}
},
{
"type": "TRANSACTION_STATUS_CHANGED",
"type": "transaction_status_changed",
"sep": "24",
"transaction": {
"sep": "24",
Expand All @@ -427,7 +427,7 @@ class Sep24End2EndTest(config: TestConfig, val jwt: String) {
}
},
{
"type": "TRANSACTION_STATUS_CHANGED",
"type": "transaction_status_changed",
"sep": "24",
"transaction": {
"sep": "24",
Expand Down Expand Up @@ -467,7 +467,7 @@ class Sep24End2EndTest(config: TestConfig, val jwt: String) {
"""
[
{
"type": "TRANSACTION_CREATED",
"type": "transaction_created",
"sep": "24",
"transaction": {
"sep": "24",
Expand All @@ -481,7 +481,7 @@ class Sep24End2EndTest(config: TestConfig, val jwt: String) {
}
},
{
"type": "TRANSACTION_STATUS_CHANGED",
"type": "transaction_status_changed",
"sep": "24",
"transaction": {
"sep": "24",
Expand All @@ -502,7 +502,7 @@ class Sep24End2EndTest(config: TestConfig, val jwt: String) {
}
},
{
"type": "TRANSACTION_STATUS_CHANGED",
"type": "transaction_status_changed",
"id": "f0b75f9e-1b53-442a-91dd-d6c002a51bfc",
"sep": "24",
"transaction": {
Expand Down Expand Up @@ -544,7 +544,7 @@ class Sep24End2EndTest(config: TestConfig, val jwt: String) {
}
},
{
"type": "TRANSACTION_STATUS_CHANGED",
"type": "transaction_status_changed",
"id": "b44d90ec-2d9a-4768-a952-085026f5b3da",
"sep": "24",
"transaction": {
Expand Down Expand Up @@ -586,7 +586,7 @@ class Sep24End2EndTest(config: TestConfig, val jwt: String) {
}
},
{
"type": "TRANSACTION_STATUS_CHANGED",
"type": "transaction_status_changed",
"id": "0556b75c-b054-49a0-b778-654050a6cba4",
"sep": "24",
"transaction": {
Expand Down

0 comments on commit d01efea

Please sign in to comment.