From 48f9be5025c7ebf431350cc06f565de0a6ffb8c0 Mon Sep 17 00:00:00 2001
From: Benjamin Wenger <ben@elixxir.ioo>
Date: Wed, 20 Oct 2021 13:20:35 -0700
Subject: [PATCH] fixed a bug

---
 bindings/notifications.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bindings/notifications.go b/bindings/notifications.go
index 4f1bac17c..745dafb1b 100644
--- a/bindings/notifications.go
+++ b/bindings/notifications.go
@@ -55,12 +55,12 @@ func NotificationForMe(messageHash, idFP string, preimages string) (*Notificatio
 	}
 
 	//check if any preimages match with the passed in data
-	for i:=0;i<len(preimageList);i++{
-		if fingerprint.CheckIdentityFpFromMessageHash(idFpBytes, messageHashBytes, preimageList[i].Data){
+	for _, preimage := range preimageList {
+		if fingerprint.CheckIdentityFpFromMessageHash(idFpBytes, messageHashBytes, preimage.Data){
 			return &NotificationForMeReport{
 				forMe:  true,
-				tYpe:   preimageList[i].Type,
-				source: preimageList[i].Source,
+				tYpe:   preimage.Type,
+				source: preimage.Source,
 			}, nil
 		}
 	}
-- 
GitLab