Skip to content

Commit dca9b88

Browse files
v2.0: EpochRewards: decode points and rewards fields as Strings (backport of #2501) (#2512)
EpochRewards: decode points and rewards fields as Strings (#2501) Decode points and rewards fields as Strings (cherry picked from commit 605acd1) Co-authored-by: Tyera <[email protected]>
1 parent 57a09f1 commit dca9b88

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

account-decoder/src/parse_sysvar.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ pub struct UiEpochRewards {
245245
pub distribution_starting_block_height: u64,
246246
pub num_partitions: u64,
247247
pub parent_blockhash: String,
248-
pub total_points: u128,
249-
pub total_rewards: u64,
250-
pub distributed_rewards: u64,
248+
pub total_points: String,
249+
pub total_rewards: String,
250+
pub distributed_rewards: String,
251251
pub active: bool,
252252
}
253253

@@ -257,9 +257,9 @@ impl From<EpochRewards> for UiEpochRewards {
257257
distribution_starting_block_height: epoch_rewards.distribution_starting_block_height,
258258
num_partitions: epoch_rewards.num_partitions,
259259
parent_blockhash: epoch_rewards.parent_blockhash.to_string(),
260-
total_points: epoch_rewards.total_points,
261-
total_rewards: epoch_rewards.total_rewards,
262-
distributed_rewards: epoch_rewards.distributed_rewards,
260+
total_points: epoch_rewards.total_points.to_string(),
261+
total_rewards: epoch_rewards.total_rewards.to_string(),
262+
distributed_rewards: epoch_rewards.distributed_rewards.to_string(),
263263
active: epoch_rewards.active,
264264
}
265265
}

0 commit comments

Comments
 (0)