File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1- __version__ = '0.2.7 '
1+ __version__ = '0.2.8 '
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ def subscribe_address(
125125 address : str ,
126126 callback : Callback ,
127127 filters : List [dict ] = None ,
128- abi : List [dict ] = None ,
128+ abi : Union [ List [dict ], str ] = None ,
129129 ):
130130 """Subscribes to an address to listen to any incoming and
131131 outgoing transactions that occur on that address.
@@ -140,10 +140,13 @@ def subscribe_address(
140140 if self .blockchain == BN_ETHEREUM :
141141 address = address .lower ()
142142
143+ if isinstance (abi , str ):
144+ abi = json .loads (abi )
145+
143146 # Add this subscription to the registry
144147 self ._subscription_registry [address ] = Subscription (
145148 callback ,
146- {"filters" : filters , "abi" : json . loads ( abi ) },
149+ {"filters" : filters , "abi" : abi },
147150 SubscriptionType .ADDRESS ,
148151 )
149152
You can’t perform that action at this time.
0 commit comments