@@ -38,19 +38,22 @@ def __init__(self, account: ETHAccount):
38
38
self .cfaV1Instance = CFA_V1 (account .rpc , account .chain_id )
39
39
40
40
def _simulate_create_tx_flow (self , flow : Decimal , block = True ) -> bool :
41
- operation = self .cfaV1Instance .create_flow (
42
- sender = self .normalized_address ,
43
- receiver = to_normalized_address (
44
- "0x0000000000000000000000000000000000000001"
45
- ), # Fake Address we do not sign/send this transactions
46
- super_token = self .super_token ,
47
- flow_rate = int (to_wei_token (flow )),
48
- )
49
-
50
- populated_transaction = operation ._get_populated_transaction_request (
51
- self .account .rpc , self .account ._account .key
52
- )
53
- return self .account .can_transact (tx = populated_transaction , block = block )
41
+ try :
42
+ operation = self .cfaV1Instance .create_flow (
43
+ sender = self .normalized_address ,
44
+ receiver = to_normalized_address (
45
+ "0x0000000000000000000000000000000000000001"
46
+ ), # Fake Address we do not sign/send this transactions
47
+ super_token = self .super_token ,
48
+ flow_rate = int (to_wei_token (flow )),
49
+ )
50
+
51
+ populated_transaction = operation ._get_populated_transaction_request (
52
+ self .account .rpc , self .account ._account .key
53
+ )
54
+ return self .account .can_transact (tx = populated_transaction , block = block )
55
+ except Exception :
56
+ return False
54
57
55
58
async def _execute_operation_with_account (self , operation : Operation ) -> str :
56
59
"""
0 commit comments