We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3a2f3e commit 1497970Copy full SHA for 1497970
1 file changed
pragma-sdk/tests/integration/update_client_test.py
@@ -57,11 +57,11 @@ async def declare_oracle(forked_client: PragmaOnChainClient) -> DeclareResult:
57
except ClientError as err:
58
if "is already declared" in err.message:
59
hash_str = (
60
- err.message.split('ClassHash(StarkFelt("')[1]
61
- .split('"))')[0]
62
- .replace("0x", "")
+ err.data["execution_error"]
+ .split("Class with hash ")[1]
+ .split(" is already declared")[0]
63
)
64
- return MagicMock(class_hash=int(f"0x{hash_str}", 16))
+ return MagicMock(class_hash=int(hash_str, 16))
65
else:
66
logger.info("An error occured during the declaration: %s", err)
67
raise err
0 commit comments