Skip to content

Discord Rich Presence should unwrap paginated /api/miners responses #7319

@yyswhsccc

Description

@yyswhsccc

Summary

discord_rich_presence.py still treats GET /api/miners as if it always returns a top-level JSON array. The live/current node API can return a paginated envelope such as { "miners": [...], "pagination": {...} }.

Impact

When the script receives the current envelope shape, the Rich Presence lookup can fail to find the user's active miner because it iterates the wrong payload shape. It also only compares the miner field even though RustChain clients commonly expose miner identifiers as miner_id, id, name, or wallet.

Expected

The script should accept legacy list responses and current paginated envelopes, filter malformed rows, and resolve common miner-id aliases before matching the requested miner.

Scope

Small client compatibility fix only. No wallet, transfer, reward, payout, admin-key, node, or production behavior changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagedReviewed and categorized

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions