-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ANCHOR-686] Add
user_action_required_by
(#1368)
### Description - Add new field `user_action_required_by` to SEP-6/24/31 transactions and related DB entries. - Added configuration option for SEP-6 and SEP-24 to set initial value on transaction creation. - Added support for related RPC requests to update this field. - Added ability to query platform transactions sorted by `user_action_required_by` field ### Context Implements stellar/stellar-protocol#1484 ### Testing - `./gradlew test` - New test cases covering all new features ### Documentation https://stellarorg.atlassian.net/browse/ANCHOR-688 https://stellarorg.atlassian.net/browse/ANCHOR-704 ### Known limitations N/A
- Loading branch information
Showing
59 changed files
with
388 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
.../src/main/java/org/stellar/anchor/api/rpc/method/NotifyOffchainFundsAvailableRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
package org.stellar.anchor.api.rpc.method; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import java.time.Instant; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.SuperBuilder; | ||
import org.stellar.anchor.api.rpc.method.features.SupportsUserActionRequiredBy; | ||
|
||
@Data | ||
@SuperBuilder | ||
@AllArgsConstructor | ||
@EqualsAndHashCode(callSuper = false) | ||
public class NotifyOffchainFundsAvailableRequest extends RpcMethodParamsRequest { | ||
public class NotifyOffchainFundsAvailableRequest extends RpcMethodParamsRequest | ||
implements SupportsUserActionRequiredBy { | ||
|
||
@SerializedName("external_transaction_id") | ||
private String externalTransactionId; | ||
|
||
@SerializedName("user_action_required_by") | ||
Instant userActionRequiredBy; | ||
} |
8 changes: 7 additions & 1 deletion
8
...ma/src/main/java/org/stellar/anchor/api/rpc/method/NotifyOffchainFundsPendingRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
package org.stellar.anchor.api.rpc.method; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import java.time.Instant; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.SuperBuilder; | ||
import org.stellar.anchor.api.rpc.method.features.SupportsUserActionRequiredBy; | ||
|
||
@Data | ||
@SuperBuilder | ||
@AllArgsConstructor | ||
@EqualsAndHashCode(callSuper = false) | ||
public class NotifyOffchainFundsPendingRequest extends RpcMethodParamsRequest { | ||
public class NotifyOffchainFundsPendingRequest extends RpcMethodParamsRequest | ||
implements SupportsUserActionRequiredBy { | ||
|
||
@SerializedName("external_transaction_id") | ||
private String externalTransactionId; | ||
|
||
@SerializedName("user_action_required_by") | ||
Instant userActionRequiredBy; | ||
} |
8 changes: 7 additions & 1 deletion
8
...ema/src/main/java/org/stellar/anchor/api/rpc/method/RequestCustomerInfoUpdateRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
package org.stellar.anchor.api.rpc.method; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import java.time.Instant; | ||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.SuperBuilder; | ||
import org.stellar.anchor.api.rpc.method.features.SupportsUserActionRequiredBy; | ||
|
||
@Data | ||
@SuperBuilder | ||
@AllArgsConstructor | ||
@EqualsAndHashCode(callSuper = false) | ||
public class RequestCustomerInfoUpdateRequest extends RpcMethodParamsRequest { | ||
public class RequestCustomerInfoUpdateRequest extends RpcMethodParamsRequest | ||
implements SupportsUserActionRequiredBy { | ||
|
||
@SerializedName("required_customer_info_message") | ||
private String requiredCustomerInfoMessage; | ||
|
||
@SerializedName("required_customer_info_updates") | ||
private List<String> requiredCustomerInfoUpdates; | ||
|
||
@SerializedName("user_action_required_by") | ||
Instant userActionRequiredBy; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
api-schema/src/main/java/org/stellar/anchor/api/rpc/method/RequestTrustRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
package org.stellar.anchor.api.rpc.method; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import java.time.Instant; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.SuperBuilder; | ||
import org.stellar.anchor.api.rpc.method.features.SupportsUserActionRequiredBy; | ||
|
||
@Data | ||
@SuperBuilder | ||
@AllArgsConstructor | ||
@EqualsAndHashCode(callSuper = false) | ||
public class RequestTrustRequest extends RpcMethodParamsRequest {} | ||
public class RequestTrustRequest extends RpcMethodParamsRequest | ||
implements SupportsUserActionRequiredBy { | ||
@SerializedName("user_action_required_by") | ||
Instant userActionRequiredBy; | ||
} |
9 changes: 9 additions & 0 deletions
9
...rc/main/java/org/stellar/anchor/api/rpc/method/features/SupportsUserActionRequiredBy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.stellar.anchor.api.rpc.method.features; | ||
|
||
import java.time.Instant; | ||
|
||
public interface SupportsUserActionRequiredBy { | ||
Instant getUserActionRequiredBy(); | ||
|
||
void setUserActionRequiredBy(Instant userActionRequiredBy); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.