Skip to content
Merged
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
13 changes: 10 additions & 3 deletions src/ui/tokens/tokens_screen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1795,8 +1795,15 @@ impl TokensScreen {
}
}

// Append any tokens not present in the saved order (e.g., newly added tokens)
for (key, value) in &self.my_tokens {
if !reordered.contains_key(key) {
reordered.insert(*key, value.clone());
}
}

// Replace the original with the reordered map
//self.my_tokens = reordered;
self.my_tokens = reordered;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously this function was a no-op and we never perisisted token ordering; it was just whatever sdk gave us, even though UI exposed reordering

}

/// Save the current map's order of token IDs to the DB
Expand Down Expand Up @@ -2041,7 +2048,7 @@ impl TokensScreen {
.step_decreasing_initial_emission_input
.parse::<u64>()
.unwrap_or(0),
min_value: if self.step_decreasing_start_period_offset_input.is_empty() {
min_value: if self.step_decreasing_min_value_input.is_empty() {
None
} else {
match self.step_decreasing_min_value_input.parse::<u64>() {
Expand All @@ -2055,7 +2062,7 @@ impl TokensScreen {
}
}
},
max_interval_count: if self.step_decreasing_start_period_offset_input.is_empty()
max_interval_count: if self.step_decreasing_max_interval_count_input.is_empty()
{
None
} else {
Expand Down
Loading