Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

program: add-spot-insurance-activity-tracking #1127

Merged
merged 14 commits into from
Jul 15, 2024

Conversation

0xbigz
Copy link
Member

@0xbigz 0xbigz commented Jul 9, 2024

No description provided.

programs/drift/src/controller/insurance.rs Outdated Show resolved Hide resolved
programs/drift/src/controller/insurance.rs Outdated Show resolved Hide resolved
programs/drift/src/controller/orders.rs Outdated Show resolved Hide resolved
programs/drift/src/state/user.rs Outdated Show resolved Hide resolved
sdk/src/user.ts Outdated Show resolved Hide resolved
@@ -149,7 +149,8 @@ pub fn handle_initialize_user<'c: 'info, 'info>(

let now_ts = Clock::get()?.unix_timestamp;

user.last_fuel_bonus_update_ts = now_ts;
user_stats.last_fuel_if_bonus_update_ts = now_ts.cast()?;
Copy link
Member

Choose a reason for hiding this comment

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

should this only happen if user stats is zero? so it doesnt over write second time user stats is created? or it should just be in init user stats

Copy link
Member Author

Choose a reason for hiding this comment

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

ah yeah it should probably just be on init user stats

@crispheaney crispheaney merged commit c2fb946 into master Jul 15, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants