From b448e66942c79437e8b9a8502fc308053bca6249 Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Fri, 17 Jan 2025 18:25:41 -0600 Subject: [PATCH] Scarb fmt --- onchain/src/multi_canvas.cairo | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/onchain/src/multi_canvas.cairo b/onchain/src/multi_canvas.cairo index 35e1fe89..58368ed8 100644 --- a/onchain/src/multi_canvas.cairo +++ b/onchain/src/multi_canvas.cairo @@ -400,15 +400,18 @@ pub mod MultiCanvas { self.awards_enabled.write(false); } - fn award_user( - ref self: ContractState, canvas_id: u32, user: ContractAddress, amount: u32 - ) { + fn award_user(ref self: ContractState, canvas_id: u32, user: ContractAddress, amount: u32) { if !self.awards_enabled.read() { return; } let caller = get_caller_address(); - assert(caller == self.hosts.read(canvas_id) || caller == self.game_master.read(), 'Only hosts can award'); - self.extra_pixels.write((canvas_id, user), self.extra_pixels.read((canvas_id, user)) + amount); + assert( + caller == self.hosts.read(canvas_id) || caller == self.game_master.read(), + 'Only hosts can award' + ); + self + .extra_pixels + .write((canvas_id, user), self.extra_pixels.read((canvas_id, user)) + amount); self.emit(CanvasHostAwardedUser { canvas_id, user, amount }); }