File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -962,15 +962,19 @@ def __init__(
962962 async def close (self ):
963963 await self .rest_client .close ()
964964
965- async def fund_account (self , address : AccountAddress , amount : int ):
965+ async def fund_account (
966+ self , address : AccountAddress , amount : int , wait_for_transaction = True
967+ ):
966968 """This creates an account if it does not exist and mints the specified amount of
967969 coins into that account."""
968970 request = f"{ self .base_url } /mint?amount={ amount } &address={ address } "
969971 response = await self .rest_client .client .post (request , headers = self .headers )
970972 if response .status_code >= 400 :
971973 raise ApiError (response .text , response .status_code )
972- for txn_hash in response .json ():
974+ txn_hash = response .json ()[0 ]
975+ if wait_for_transaction :
973976 await self .rest_client .wait_for_transaction (txn_hash )
977+ return txn_hash
974978
975979 async def healthy (self ) -> bool :
976980 response = await self .rest_client .client .get (self .base_url )
You can’t perform that action at this time.
0 commit comments