Conversation
- comply with hasura syntax - change to new graphql url in constants - update data model construction from json to comply new hasura return value
We have made hasura return string for number value.
…into beast/update-graphql
…work/quantus-apps into beast/miner-reward-menu
n13
left a comment
There was a problem hiding this comment.
We can only show Planck total rewards, and available rewards, and a redeem button
I think we need to update miner screen to include claiming reward,
we might need a redeem button, so it will show
total earned
redeemed:
redeemable: (total - redeemed) [REDEEM BUTTON]
We cannot show total QUAN mined, we don't have the information - we only have info how many blocks someone mined.
Block rewards are not fixed, so it's not a multiplication either.
Change to:
Show total mined blocks
Testnet mined blocks
Testnet total rewards (lets use testnet instead of planck in the wording)
Available to claim:
[Claim button] (can be disabled for now, will implement shortly)
change toHash to to_hash
…work/quantus-apps into beast/miner-reward-menu
…into beast/miner-reward-menu
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a4ac898. Configure here.
| TaskmasterService().getMinerStats(), | ||
| wormholeUtxoService.getUnspentBalance(wormholeAddress: keyPair.address, secretHex: keyPair.secretHex), | ||
| ).wait; | ||
| final redeemedRewards = planckStats.totalRewards - redeemableRewards; |
There was a problem hiding this comment.
Redeemed rewards can be negative from data inconsistency
Medium Severity
The calculation planckStats.totalRewards - redeemableRewards can produce a negative BigInt if the wormhole unspent balance exceeds the total rewards reported by the miner stats endpoint. This can occur due to timing differences between the two independent API calls, or if the wormhole address received funds from non-mining sources. The negative value would be formatted and displayed in the UI under "REDEEMED", showing something like "-0.5 QUAN" which is nonsensical.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a4ac898. Configure here.
| } | ||
|
|
||
| final mnemonic = await ref.watch(settingsServiceProvider).getMnemonic(0); | ||
| final keyPair = ref.watch(hdWalletServiceProvider).deriveWormholeKeyPair(mnemonic: mnemonic!); |
There was a problem hiding this comment.
Force unwrap of nullable mnemonic without null check
Low Severity
getMnemonic(0) returns Future<String?> and the result is force-unwrapped with mnemonic!. The codebase already handles the null mnemonic case in wallet_initializer.dart (showing a "mnemonic lost" dialog and sending telemetry), confirming this is a known possible state. If triggered here, the null assertion throws a generic exception surfaced as a confusing "Error getting mining rewards" message rather than guiding the user appropriately.
Reviewed by Cursor Bugbot for commit a4ac898. Configure here.
|
|
||
| if (path != null) launchUrl(Uri.parse('${AppConstants.explorerEndpoint}/$path')); | ||
| if (path != null) openUrl('${AppConstants.explorerEndpoint}/$path'); | ||
| } |
There was a problem hiding this comment.
are we changing semantics here, and why?
All these changes should be in separate PRs - there's some style changes, class changes, and the main implementation of miner reweards all mixed together.
| final Uri url = Uri.parse(AppConstants.tutorialsAndGuidesUrl); | ||
| launchUrl(url); | ||
| }, | ||
| onTap: () => openUrl(AppConstants.tutorialsAndGuidesUrl), |
There was a problem hiding this comment.
All these style and API changes should be in a separate PR, they have nothing to do with the feature
| @@ -11,25 +8,15 @@ class Skeleton extends StatefulWidget { | |||
| final BorderRadius? borderRadius; | |||
There was a problem hiding this comment.
Skeleton refactor should be in a separate PR



Summary
Screenshots
Note
Medium Risk
Introduces a new mining rewards flow that derives a Wormhole keypair from the user mnemonic and queries UTXO + Taskmaster stats, which touches wallet/keys and network calls. UI/theme changes are broad but mostly low-risk; the primary risk is correctness and error handling around rewards calculations and external service responses.
Overview
Adds a new Mining Rewards entry in v2 Settings (with a new
axe.svgicon) and a fullMiningRewardsScreenshowing mined blocks/rewards, loading/empty/error states, and external links to telemetry and the mining setup guide.Updates mining rewards data plumbing to include Planck reward totals plus redeemed vs redeemable amounts by fetching Taskmaster miner stats and Wormhole UTXO unspent balance (new
hdWalletServiceProvider/wormholeUtxoServiceProvider), and extendsMiningRewardsDataaccordingly.Standardizes external link handling by introducing
openUrl()(wrappedurl_launcherwith error logging) and replacing directlaunchUrlcalls across multiple components/sheets. Also refreshes UI polish: reworks v2 skeleton shimmer/colors (and addsTxItemSkeleton), simplifies the Home empty-state messaging, adds a zero-balance “Get Testnet Tokens” bottom CTA, and extends v2 theme text/colors for the new designs. Additionally fixes Wormhole transfer GraphQL ordering (block.height).Reviewed by Cursor Bugbot for commit a4ac898. Bugbot is set up for automated code reviews on this repo. Configure here.