Skip to content

Commit 0396b3d

Browse files
committed
handle pretty json while setting new onchain signing conditions
1 parent 83560f1 commit 0396b3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/set_signing_cohort_conditions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/python3
2+
import json
23

34
import click
45
from ape.cli import ConnectedProviderCommand, account_option, network_option
@@ -62,7 +63,8 @@ def cli(
6263
"""
6364

6465
with open(condition_file, 'r') as file:
65-
condition = file.read().strip().encode("utf-8")
66+
condition = json.dumps(json.loads(file.read().strip().encode("utf-8"))).encode("utf-8")
67+
6668
if not condition:
6769
raise click.ClickException("Condition file is empty or not provided.")
6870

0 commit comments

Comments
 (0)