diff --git a/setup-scripts/funds-checker.py b/setup-scripts/funds-checker.py index d7c8fdbc..630298eb 100755 --- a/setup-scripts/funds-checker.py +++ b/setup-scripts/funds-checker.py @@ -62,15 +62,16 @@ async def check_funds(): round(unallocated_funds / sc_precision), round(allocated_funds / sc_precision) ) - # Send an alert if there is less than 1 allowance worth of money left. - if balance < allowance_funds: + # Send an alert if there is less than a certain part of allowance worth of money left in the wallet. + WALLET_ALLOWANCE_THRESHOLD = 0.3 + if balance < allowance_funds * WALLET_ALLOWANCE_THRESHOLD: wallet_address_res = siad.get("/wallet/address") wallet_msg = "Address: {}".format(wallet_address_res["address"]) message = "__Wallet balance running low!__ {} {}".format(balance_msg, wallet_msg) return await send_msg(client, message, force_notify=True) # Alert devs when only a fraction of the allowance is remaining. - SPEND_THRESHOLD = 0.8 + SPEND_THRESHOLD = 0.9 if allocated_funds >= SPEND_THRESHOLD * allowance_funds: message = "__More than {:.0%} of allowance spent!__ {}".format( SPEND_THRESHOLD, alloc_msg diff --git a/setup-scripts/support/authorized_keys b/setup-scripts/support/authorized_keys index c3daf5b7..6f02b87e 100644 --- a/setup-scripts/support/authorized_keys +++ b/setup-scripts/support/authorized_keys @@ -5,3 +5,4 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDgiq1etF0aD94rG/UVmYEt4ij5K8MvHZwb4wIUi6Ihr ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDFO8IxPO3CjfBzm3rAI0sof0BuEBVj6g1UY4hEm9Wn3PXx/iHn96ZP/nSh37X5e5KABCq7ob18T16B4U9JVlARvpozvCCUso28C/Vm44Vt/Q4xoQAYX4eLlRGkPJHhEtA+GhTt4HSE06IZkegAlZ6HVSpSxNiFmSWytIQIa2uTVDel16U+N0PiwQ/9ZS6c/MeC6ZebVEeyEBHNTOL3vkrtFzD/Iupi4QKASK8ejCKEnzCjwoWNyZPUJJLwyUC1ttZOH0cKQid9rcwQDqwM6clnJ5OAAdMkD9GbHs1ItyeC5M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