Skip to content

Commit

Permalink
Updated detector to detect OpenBrush implementation of AccountId
Browse files Browse the repository at this point in the history
  • Loading branch information
faculerena committed Aug 11, 2023
1 parent 1f16ae5 commit 8ef6c14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion detectors/unprotected-mapping-operation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ impl<'tcx> LateLintPass<'tcx> for UnprotectedMappingOperation {
let mapping_type = self.cx.typeck_results().expr_ty_adjusted(receiver);

if /* ty.to_string().contains("ink::storage::Mapping") && */
mapping_type.to_string().contains("ink::storage::Mapping<ink::ink_primitives::AccountId"){
mapping_type.to_string().contains("ink::storage::Mapping<ink::ink_primitives::AccountId") ||
mapping_type.to_string().contains("ink::storage::Mapping<OpenBrush::AccountIdExt") {

if path.ident.name.to_string() == "insert" {
self.insert_def_id = defid;
Expand Down

0 comments on commit 8ef6c14

Please sign in to comment.