diff --git a/accounts/api/views.py b/accounts/api/views.py index f51223f..54160be 100644 --- a/accounts/api/views.py +++ b/accounts/api/views.py @@ -959,13 +959,15 @@ class VersionCheck(APIView): model = AppVersion def get(self, request, *args, **kwargs): - - device_type = request.GET.get('type') + + device_type = request.GET.get("type") if not device_type: - return ApiResponse.error(message=constants.FAILURE, errors="device type is required") + return ApiResponse.error( + message=constants.FAILURE, errors="device type is required" + ) # Query the database to retrieve the upgrade flags based on the app version version = self.model.objects.filter(app_type=device_type).last() version_data = AppVersionSerializer(version) - return ApiResponse.success(message=constants.SUCCESS, data=version_data.data) \ No newline at end of file + return ApiResponse.success(message=constants.SUCCESS, data=version_data.data) diff --git a/manage_wallets/api/views.py b/manage_wallets/api/views.py index 85deee9..f477a22 100644 --- a/manage_wallets/api/views.py +++ b/manage_wallets/api/views.py @@ -140,7 +140,13 @@ class TransactionView(APIView): permission_classes = [IsAuthenticated] def get(self, request): - queryset = models.Transaction.objects.filter(principal_id=request.user.id) + queryset = models.Transaction.objects.filter( + principal_id=request.user.id, + transaction_status__in=[ + models.TransactionStatus.SUCCESS, + models.TransactionStatus.FAIL, + ], + ) serializer = serializers.TransactionSerializer(queryset, many=True) response = {