diff --git a/polaris/polaris/sep6/deposit.py b/polaris/polaris/sep6/deposit.py index ec791515..6d6841d1 100644 --- a/polaris/polaris/sep6/deposit.py +++ b/polaris/polaris/sep6/deposit.py @@ -136,7 +136,7 @@ def parse_request_args(request: Request) -> Dict: except (ValueError, MemoInvalidException): return {"error": render_error_response(_("invalid 'memo' for 'memo_type'"))} - return { + args = { "asset": asset, "memo_type": memo_type, "memo": memo, @@ -144,3 +144,10 @@ def parse_request_args(request: Request) -> Dict: "type": request.GET.get("type"), **extract_sep9_fields(request.GET), } + + # add remaining extra params, it's on the anchor to validate them + for param, value in request.GET.items(): + if param not in args: + args[param] = value + + return args diff --git a/polaris/polaris/sep6/withdraw.py b/polaris/polaris/sep6/withdraw.py index 97c1c866..968daf02 100644 --- a/polaris/polaris/sep6/withdraw.py +++ b/polaris/polaris/sep6/withdraw.py @@ -113,7 +113,7 @@ def parse_request_args(request: Request) -> Dict: if not request.GET.get("dest"): return {"error": render_error_response(_("'dest' is required"))} - return { + args = { "asset": asset, "memo_type": memo_type, "memo": memo, @@ -124,6 +124,13 @@ def parse_request_args(request: Request) -> Dict: **extract_sep9_fields(request.GET), } + # add remaining extra params, it's on the anchor to validate them + for param, value in request.GET.items(): + if param not in args: + args[param] = value + + return args + def validate_response( args: Dict, integration_response: Dict, transaction: Transaction