Skip to content

Commit

Permalink
Merge branch 'starknet-id:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Nguyendinhtuan17 authored Mar 9, 2024
2 parents 02a95b9 + 620ada2 commit d931be5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/identity/main.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ mod Identity {
fn set_user_data(
ref self: ContractState, id: u128, field: felt252, data: felt252, domain: u32
) {
// todo: when volition comes, handle the domain
let caller = get_caller_address();
assert(caller == self.erc721._owner_of(id.into()), 'you don\'t own this id');
self.user_data.write((id, field), data);
self.emit(Event::UserDataUpdate(UserDataUpdate { id, field, _data: data }))
}
Expand Down

0 comments on commit d931be5

Please sign in to comment.