diff --git a/README.md b/README.md index 85b8ff1..7ab7f55 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [Flexpool.io](https://flexpool.io) is a next-generation [Ethereum](https://ethereum.org/en/) mining pool known for their [#STOPEIP1559](https://stopeip1559.org/) move. `flexpool-activity` is able to listen and notify when a new **block** is -mined by the pool and display the up-to-date **miner balance** and convert it to **fiat**. +mined by the pool, display the up-to-date **miner balance** and convert it to **fiat**. ## Installation @@ -21,7 +21,7 @@ bot. You'll need the `chat_id` and `auth_key` for the next section. ## Configuration Configuration file use the JSON format with the following keys: -* `miner`: wallet address of the miner +* `miner`: wallet address of the miner (optional) * `currency`: symbol of the currency to convert (optional) * `telegram`: send notifications with Telegram (optional) * `auth_key`: Telegram authentication key for the bot API diff --git a/config.schema.json b/config.schema.json index 2a37ead..2f4a5d5 100644 --- a/config.schema.json +++ b/config.schema.json @@ -22,8 +22,5 @@ "state_file": { "type": "string" } - }, - "required": [ - "miner" - ] + } } diff --git a/main.py b/main.py index 4413b20..6450975 100644 --- a/main.py +++ b/main.py @@ -118,11 +118,12 @@ def main(): logger.debug('saving block number to state file') write_state(state_file, block_number=block.number) - miner = watch_miner(last_balance=state.get('balance'), address=config['miner'], config=config, - disable_notifications=args.disable_notifications, exchange_rate=exchange_rate, - currency=currency) - logger.debug('saving miner balance to state file') - write_state(state_file, miner_balance=miner.raw_balance) + if config.get('miner'): + miner = watch_miner(last_balance=state.get('balance'), address=config['miner'], config=config, + disable_notifications=args.disable_notifications, exchange_rate=exchange_rate, + currency=currency) + logger.debug('saving miner balance to state file') + write_state(state_file, miner_balance=miner.raw_balance) if __name__ == '__main__':