-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ANCHOR-353] SEP-6: Verify SEP-12 status before deposit/withdraw proc…
…eeds (#1136) ### Description This adds a check to verify that a customer is SEP-12 accepted as part of the deposit/withdraw request validation. This also removes the `VERIFICATION_REQUIRED` status as it is not a valid SEP-12 customer info status. ### Context This was caught by a `stellar-anchor-tests` test case. ### Testing - `./gradlew test` - `stellar-anchor-tests` ### Known limitations N/A
- Loading branch information
Showing
16 changed files
with
244 additions
and
21 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
12 changes: 12 additions & 0 deletions
12
...schema/src/main/java/org/stellar/anchor/api/exception/SepCustomerInfoNeededException.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,12 @@ | ||
package org.stellar.anchor.api.exception; | ||
|
||
import java.util.List; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
/** Thrown when a customer's info is needed to complete a request. */ | ||
@RequiredArgsConstructor | ||
@Getter | ||
public class SepCustomerInfoNeededException extends AnchorException { | ||
private final List<String> fields; | ||
} |
12 changes: 12 additions & 0 deletions
12
api-schema/src/main/java/org/stellar/anchor/api/sep/CustomerInfoNeededResponse.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,12 @@ | ||
package org.stellar.anchor.api.sep; | ||
|
||
import java.util.List; | ||
import lombok.Data; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@RequiredArgsConstructor | ||
@Data | ||
public class CustomerInfoNeededResponse { | ||
private final String type = "non_interactive_customer_info_needed"; | ||
private final List<String> fields; | ||
} |
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.