Skip to content

Commit

Permalink
Merge pull request #43 from TaggrNetwork/release
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
taggrx authored Apr 3, 2024
2 parents fe86a43 + 1181bb8 commit da864f5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 25 deletions.
4 changes: 4 additions & 0 deletions src/backend/env/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ pub fn create_feature(caller: Principal, post_id: PostId) -> Result<(), String>
return Err("no post with a feature found".into());
};

if state.memory.features.get(&post_id).is_some() {
return Err("feature already exists".into());
}

state
.memory
.features
Expand Down
2 changes: 1 addition & 1 deletion src/backend/env/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1602,14 +1602,14 @@ impl State {
state.pending_polls.len(),
state.migrations.len(),
));
log_time(state, "Daily");
});
}

if last_hourly_chores + HOUR < now {
State::hourly_chores(now).await;
mutate(|state| {
state.last_hourly_chores += HOUR;
log_time(state, "Hourly");
});
}
}
Expand Down
23 changes: 1 addition & 22 deletions src/backend/updates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,7 @@ fn post_upgrade() {
}

#[allow(clippy::all)]
fn sync_post_upgrade_fixtures() {
mutate(|state| {
let controllers = state
.realms
.iter()
.flat_map(|(realm_id, realm)| {
realm
.controllers
.iter()
.map(move |user_id| (realm_id.clone(), *user_id))
})
.collect::<Vec<_>>();
for (realm_id, controller_id) in controllers {
state
.users
.get_mut(&controller_id)
.unwrap()
.controlled_realms
.insert(realm_id);
}
})
}
fn sync_post_upgrade_fixtures() {}

#[allow(clippy::all)]
async fn async_post_upgrade_fixtures() {}
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/proposals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export const ProposalView = ({
);
if (!data) return;
}
if ("Reward" in proposal.payload) {
if ("Rewards" in proposal.payload) {
const { max_funding_amount, token_symbol } =
window.backendCache.config;
const cap = token(
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/roadmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const Roadmap = () => {
</>
}
/>
<div className="outstanding vertically_spaced">
<div className="outstanding vertically_spaced spaced">
This is the community driven roadmap for{" "}
{window.backendCache.config.name}. Any user can add a new
feature requests for{" "}
Expand Down

0 comments on commit da864f5

Please sign in to comment.