Skip to content

Commit

Permalink
include None check in validate_creds method
Browse files Browse the repository at this point in the history
  • Loading branch information
ckeshava committed Dec 21, 2024
1 parent 1e09926 commit cd7f860
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xrpl/models/transactions/deposit_preauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ def _get_errors(self: Self) -> Dict[str, str]:
def _validate_credentials_length(
credentials: List[Credential], field_name: str
) -> None:

if credentials is None:
return

if len(credentials) == 0:
errors["DepositPreauth"] = f"{field_name} list cannot be empty. "
elif len(credentials) > MAX_CREDENTIAL_ARRAY_LENGTH:
Expand Down

0 comments on commit cd7f860

Please sign in to comment.