From eb0122d403d098a261698386c4da11f4e119ed05 Mon Sep 17 00:00:00 2001 From: Janez Podhostnik Date: Fri, 16 Aug 2024 14:24:00 +0200 Subject: [PATCH] Fix intersection kind decoding --- flow_py_sdk/cadence/kinds.py | 2 +- tests/cadence/encode_test.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flow_py_sdk/cadence/kinds.py b/flow_py_sdk/cadence/kinds.py index 9eedc76..094c13a 100644 --- a/flow_py_sdk/cadence/kinds.py +++ b/flow_py_sdk/cadence/kinds.py @@ -440,7 +440,7 @@ def __str__(self): @classmethod def kind_str(cls) -> str: - return "Restriction" + return "Intersection" class CapabilityKind(Kind): diff --git a/tests/cadence/encode_test.py b/tests/cadence/encode_test.py index 0a3223d..28b88d0 100644 --- a/tests/cadence/encode_test.py +++ b/tests/cadence/encode_test.py @@ -1281,9 +1281,9 @@ def testReferenceKind(self): ) self._encodeAndDecodeAll([kind]) - def testRestrictedKind(self): + def testIntersectionKind(self): kind = _EncodeTestParams( - "Restricted Kind", + "Intersection Kind", cadence.IntersectionKind( "0x3.GreatContract.GreatNFT", [ @@ -1301,7 +1301,7 @@ def testRestrictedKind(self): ), """ { - "kind": "Restriction", + "kind": "Intersection", "typeID": "0x3.GreatContract.GreatNFT", "types": [ {