Skip to content

Commit 0659359

Browse files
committed
Fix structs loading
1 parent 8948197 commit 0659359

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tinyman/liquid_staking/struct.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# TODO: move struct to parent.
2+
import importlib.resources
23
import json
34
import re
45
from typing import Any
5-
6+
import tinyman.liquid_staking
67

78
MINIMUM_BALANCE_REQUIREMENT_PER_BOX = 2_500
89
MINIMUM_BALANCE_REQUIREMENT_PER_BOX_BYTE = 400
910

1011

11-
structs = json.load(open("structs.json"))["structs"]
12+
structs = json.load(importlib.resources.files(tinyman.liquid_staking).joinpath("structs.json").read_text())["structs"]
1213

1314

1415
class Struct():

0 commit comments

Comments
 (0)