Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions mobile-app/lib/v2/screens/settings/mining_rewards_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ class _WithRewards extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final numberFmt = ref.watch(numberFormattingServiceProvider);
final quanEarned = numberFmt.formatBalance(data.planckRewards, addSymbol: true);
final redeemedRewards = numberFmt.formatBalance(data.redeemedRewards, addSymbol: true);
final redeemableRewards = numberFmt.formatBalance(data.redeemableRewards, addSymbol: true);
final quanEarned = numberFmt.formatBalance(data.planckRewards, maxDecimals: 2, addSymbol: true);
final redeemedRewards = numberFmt.formatBalance(data.redeemedRewards, maxDecimals: 2, addSymbol: true);
final redeemableRewards = numberFmt.formatBalance(data.redeemableRewards, maxDecimals: 2, addSymbol: true);

final colors = context.colors;
final text = context.themeText;
Expand Down Expand Up @@ -303,7 +303,11 @@ class _StatColumn extends StatelessWidget {
if (isLoading)
const Skeleton(width: 100, height: 24)
else
Text(value, style: text.sendSectionLabel?.copyWith(color: valueColor)),
FittedBox(
fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Text(value, maxLines: 1, softWrap: false, style: text.sendSectionLabel?.copyWith(color: valueColor)),
),
],
);
}
Expand Down
4 changes: 2 additions & 2 deletions quantus_sdk/lib/src/services/taskmaster_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ class TaskmasterService {
BigInt totalRewards = BigInt.zero;

for (final stats in minerStatsList) {
totalMinedBlocks += stats['totalMinedBlocks'] as int;
totalRewards += BigInt.from(stats['totalRewards']);
totalMinedBlocks += int.parse(stats['totalMinedBlocks'].toString());
totalRewards += BigInt.parse(stats['totalRewards'].toString());
}

return MinerStats(totalMinedBlocks: totalMinedBlocks, totalRewards: totalRewards);
Expand Down
Loading