File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
valuenetwork/valueaccounting Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -4508,13 +4508,16 @@ def spending_limit(self):
4508
4508
from valuenetwork .valueaccounting .faircoin_utils import network_fee
4509
4509
balance = self .digital_currency_balance () #get_address_balance(address)
4510
4510
newbalance = self .digital_currency_balance_unconfirmed ()
4511
- if balance :
4512
- if newbalance < balance :
4513
- bal = newbalance
4514
- else :
4515
- bal = balance #bal = Decimal(balance[0]) / FAIRCOIN_DIVISOR
4516
- fee = Decimal (network_fee ()) / FAIRCOIN_DIVISOR
4517
- limit = bal - fee
4511
+ try :
4512
+ if balance :
4513
+ if newbalance < balance :
4514
+ bal = newbalance
4515
+ else :
4516
+ bal = balance #bal = Decimal(balance[0]) / FAIRCOIN_DIVISOR
4517
+ fee = Decimal (network_fee ()) / FAIRCOIN_DIVISOR
4518
+ limit = bal - fee
4519
+ except InvalidOperation :
4520
+ limit = Decimal ("0.0" )
4518
4521
return limit
4519
4522
4520
4523
def context_agents (self ):
You can’t perform that action at this time.
0 commit comments