|
10 | 10 | from ... import LOG |
11 | 11 | # noinspection PyPep8Naming |
12 | 12 | from . import model as G |
13 | | -from ...damlast.daml_lf_1 import TypeConName |
14 | 13 | from ...model.core import ContractId |
15 | 14 | from ...model.types import VariantType, RecordType, ListType, ContractIdType, \ |
16 | 15 | UnsupportedType, TemplateChoice, TypeReference, TypeEvaluationContext, SCALAR_TYPE_UNIT, \ |
17 | 16 | TextMapType, OptionalType, EnumType |
18 | 17 | from ...model.writing import AbstractSerializer, CommandPayload |
19 | 18 | from ...util.prim_types import to_boolean, to_date, to_datetime, to_decimal, to_int, to_str, \ |
20 | | - decode_variant_dict |
| 19 | + to_ledger_api_decimal, decode_variant_dict |
21 | 20 |
|
22 | 21 | # noinspection PyPackageRequirements |
23 | 22 | from google.protobuf.empty_pb2 import Empty |
@@ -154,7 +153,7 @@ def serialize_int(self, context: TypeEvaluationContext, obj: Any) -> R: |
154 | 153 | return 'int64', to_int(obj) |
155 | 154 |
|
156 | 155 | def serialize_decimal(self, context: TypeEvaluationContext, obj: Any) -> R: |
157 | | - return 'numeric', str(to_decimal(obj)) |
| 156 | + return 'numeric', to_ledger_api_decimal(to_decimal(obj)) |
158 | 157 |
|
159 | 158 | def serialize_party(self, context: TypeEvaluationContext, obj: Any) -> R: |
160 | 159 | return 'party', to_str(obj) |
|
0 commit comments