@@ -14,51 +14,50 @@ contract CreditingStatusUpdate {
1414 offer_date = offers["date_created"]
1515 DBUpdate("crediting_requests", request_id, {"creditor": creditor, "rate": rate, "offer_id": offer_id, "offer_date": offer_date})
1616
17- var memberId int
18- var header body string params map
19- memberId = AddressToId(request["borrower"])
17+ var header body memberAccount string params map
18+ memberAccount = request["borrower"]
2019 header = "Signature for auction №" + Str(request_id)
2120 body = "Your signature is required!"
2221 params["crediting_id"] = request_id
23- @1NotificationsSend("MemberId ,Sender,Icon,Header,Body,Page,Params", memberId , 1, "fa-edit", header, body, "crediting_view", params)
22+ @1NotificationsSend("MemberAccount ,Sender,Icon,Header,Body,Page,Params", memberAccount , 1, "fa-edit", header, body, "crediting_view", params)
2423 }
2524 return offer_id
2625 }
2726
2827 func sendNotesAuctionStarted(request map) {
2928 var request_id i int subs_arr array
3029 request_id = Int(request["id"])
31- subs_arr = DBFind("crediting_subs").Columns("creditor").Limit(10000). Where({"request_id": request_id, "deleted": 0})
30+ subs_arr = DBFind("crediting_subs").Where({"request_id": request_id, "deleted": 0}).Columns("creditor").Limit(10000 )
3231 while i < Len(subs_arr) {
33- var sub_map memberId int
32+ var sub_map int memberAccount string
3433 sub_map = subs_arr[i]
35- memberId = AddressToId( sub_map["creditor"])
34+ memberAccount = sub_map["creditor"]
3635
3736 var header body string params map
3837 header = "Auction №" + Str(request_id) + " started"
3938 body = "You can bid now!"
4039 params["crediting_id"] = request_id
4140 params["optional"] = 1
42- @1NotificationsSend("MemberId ,Sender,Icon,Header,Body,Page,Params", memberId , 1, "fa-check", header, body, "crediting_view", params)
41+ @1NotificationsSend("MemberAccount ,Sender,Icon,Header,Body,Page,Params", memberAccount , 1, "fa-check", header, body, "crediting_view", params)
4342 i = i + 1
4443 }
4544 }
4645
4746 func sendNotesAuctionFinished(request map) {
4847 var request_id i int subs_arr array
4948 request_id = Int(request["id"])
50- subs_arr = DBFind("crediting_subs").Columns("creditor").Limit(10000). Where({"request_id": request_id, "deleted": 0})
49+ subs_arr = DBFind("crediting_subs").Where({"request_id": request_id, "deleted": 0}).Columns("creditor").Limit(10000 )
5150 while i < Len(subs_arr) {
52- var sub_map memberId int
51+ var sub_map int memberAccount string
5352 sub_map = subs_arr[i]
54- memberId = AddressToId( sub_map["creditor"])
53+ memberAccount = sub_map["creditor"]
5554
5655 var header body string params map
5756 header = "Auction №" + Str(request_id) + " finished"
5857 body = "You can't bid anymore!"
5958 params["crediting_id"] = request_id
6059 params["optional"] = 1
61- @1NotificationsSend("MemberId ,Sender,Icon,Header,Body,Page,Params", memberId , 1, "fa-close", header, body, "crediting_view", params)
60+ @1NotificationsSend("MemberAccount ,Sender,Icon,Header,Body,Page,Params", memberAccount , 1, "fa-close", header, body, "crediting_view", params)
6261 i = i + 1
6362 }
6463 }
@@ -97,7 +96,7 @@ contract CreditingStatusUpdate {
9796 $check_access = AppParam(Int($app), "crediting_admin_role", $ecosystem_id)
9897 var rids array
9998 rids = JSONDecode("["+$check_access+"]")
100- if !DBFind("@1roles_participants").Where({"ecosystem": $ecosystem_id, "role->id": {"$in": rids}, "member->member_id ": $key_id , "deleted": 0}).Row() {
99+ if !DBFind("@1roles_participants").Where({"ecosystem": $ecosystem_id, "role->id": {"$in": rids}, "member->account ": $account_id , "deleted": 0}).Row() {
101100 warning LangRes("@1access_denied", "en")
102101 }
103102 }
0 commit comments