Skip to content

Commit 667a8f8

Browse files
committed
fix: add proof to raw serializer and 0x prefix bytes
1 parent 6fc295e commit 667a8f8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

fdc/serializers/v1/data.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from rest_framework import serializers
22

3+
from processing.utils import prefix_0x
4+
35
from ...models import AttestationResult
46

57

@@ -12,6 +14,11 @@ class Meta:
1214

1315

1416
class AttestationResultRawV1Serializer(serializers.ModelSerializer):
17+
response_hex = serializers.SerializerMethodField()
18+
19+
def get_response_hex(self, obj) -> str:
20+
return prefix_0x(obj.response_hex)
21+
1522
class Meta:
1623
model = AttestationResult
17-
fields = ("response_hex", "attestation_type")
24+
fields = ("response_hex", "attestation_type", "proof")

0 commit comments

Comments
 (0)