uid for receipt
This commit is contained in:
parent
9c17c33e35
commit
230f98975a
|
|
@ -26,6 +26,7 @@ pub fn update(ctx: Context<UpdateLeaderboard>, id:u64, player:Pubkey, new_score:
|
||||||
leaderboard.players.push(player);
|
leaderboard.players.push(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
leaderboard_entry.uid = receipt.uid.clone();
|
||||||
receipt.active = false;
|
receipt.active = false;
|
||||||
|
|
||||||
msg!("Successfully updated leaderboard with score: {}", new_score);
|
msg!("Successfully updated leaderboard with score: {}", new_score);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@ use crate::*;
|
||||||
#[account]
|
#[account]
|
||||||
#[derive(InitSpace)]
|
#[derive(InitSpace)]
|
||||||
pub struct LeaderboardEntry{
|
pub struct LeaderboardEntry{
|
||||||
pub owner: Pubkey,
|
#[max_len(50)]
|
||||||
|
pub uid: String,
|
||||||
pub highscore: u64,
|
pub highscore: u64,
|
||||||
pub total_tickets: u64
|
pub total_tickets: u64
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user