Skip to content

Commit 3cc1901

Browse files
author
atomzakk
committed
Bug fixes
1 parent 3a647e4 commit 3cc1901

16 files changed

Lines changed: 36 additions & 34 deletions

File tree

ecosystem_apps/crowdfunding/contracts/CreateStartup.sim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ contract CreateStartup {
110110
information["description"] = $Description
111111
information["link"] = $SiteLink
112112

113-
$member_name = DBFind("@1members").Where("ecosystem": $ecosystem_id, "account": $account_id).One("member_name")
113+
$member_name = DBFind("@1members").Where({"ecosystem": $ecosystem_id, "account": $account_id}).One("member_name")
114114
creator["account"] = $account_id
115115
if $member_name {
116116
creator["member_name"] = $member_name

ecosystem_apps/crowdfunding/pages/startup_list.ptl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ DBFind("@1roles_participants").Where({"ecosystem": "#ecosystem_id#", "$and": [{"
1212
DBFind("@1roles_participants").Where({"ecosystem": "#ecosystem_id#", "$and": [{"role->id": {"$in": [#investor_role#]}}, {"role->id": "#role_id#"}], "member->account": "#account_id#", "deleted": 0}).Vars(investor_access)
1313

1414
If(#page_par# == 0){
15-
SetVar(type_filter, `"status": 0`)
15+
SetVar(type_filter, `, "status": 0`)
1616
}.ElseIf(#page_par# == 1){
17-
SetVar(type_filter, `"status": 1`)
17+
SetVar(type_filter, `, "status": 1`)
1818
}.ElseIf(#page_par# == 2){
19-
SetVar(type_filter, `"status": {"$gte": 2}`)
19+
SetVar(type_filter, `, "status": {"$gte": 2}`)
2020
}.ElseIf(#page_par# == -1){
21-
SetVar(type_filter, `"status": "-1"`)
21+
SetVar(type_filter, `, "status": "-1"`)
2222
}
2323

2424
If(#startup_access_id# > 0){
@@ -44,21 +44,21 @@ If(#global_access# == 1){
4444

4545
If(#search#){
4646
If(#startup_access_id# > 0){
47-
SetVar(where, {"deleted": 0, "#type_filter#", "informations->name": {"$ilike": "#search#"}})
47+
SetVar(where, {"deleted": 0, "informations->name": {"$ilike": "#search#"} #type_filter#})
4848
}.ElseIf(#investor_access_id# > 0){
49-
SetVar(where, {"deleted": 0, "#type_filter#", "informations->name": {"$ilike": "#search#"}})
49+
SetVar(where, {"deleted": 0, "informations->name": {"$ilike": "#search#"} #type_filter#})
5050
}.ElseIf(#admin_access_id# > 0){
51-
SetVar(where, {"#type_filter#", "informations->name": {"$ilike": "#search#"}})
51+
SetVar(where, {"informations->name": {"$ilike": "#search#"} #type_filter#})
5252
}.Else{
5353
SetVar(where, {"status": 10})
5454
}
5555
}.Else{
5656
If(#startup_access_id# > 0){
57-
SetVar(where, {"#type_filter#", "deleted": 0})
57+
SetVar(where, {"deleted": 0 #type_filter#})
5858
}.ElseIf(#investor_access_id# > 0){
59-
SetVar(where, {"#type_filter#", "deleted": 0})
59+
SetVar(where, {"deleted": 0 #type_filter#})
6060
}.ElseIf(#admin_access_id# > 0){
61-
SetVar(where, {"#type_filter#"})
61+
SetVar(where, {#type_filter#})
6262
}.Else{
6363
SetVar(where, {"status": 10})
6464
}

ecosystem_apps/crowdfunding/pages/startup_view.ptl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
DBFind("@1startups").WhereId(#stid#).Columns("id,collected_percent,date_created,collected_amount,informations,informations->name,informations->description,informations->link,date_started,date_ended,required_amount,min_investment,share_capital,ecosystem,deleted,creator,creator->member_name,creator->account,status").Vars(view)
2-
DBFind("@1roles").Where({"role_name": "Investor", "deleted": 0,"ecosystem": "#ecosystem_id#"}).Columns("id,role_name,deleted,ecosystem").Vars(check_role_invest)
2+
DBFind("@1applications").Where({"ecosystem": "#ecosystem_id#", "name": "Crowdfunding"}).Vars(application)
3+
SetVar(investor_role, AppParam(Ecosystem: #ecosystem_id#, App: #application_id#, Name: crowdfunding_investor_role))
4+
DBFind("@1roles_participants").Where({"ecosystem": "#ecosystem_id#", "$and": [{"role->id": {"$in": [#investor_role#]}}, {"role->id": "#role_id#"}], "member->account": "#account_id#", "deleted": 0}).Vars(investor_access)
35

46
Div(content-wrapper){
57
Div(row){
@@ -115,7 +117,7 @@ Div(content-wrapper){
115117
}
116118
}
117119
}
118-
If(And(#check_role_invest_id# == #role_id#,#view_status# == 1)){
120+
If(And(#investor_access_id# > 0, #view_status# == 1)){
119121
Div(list-group-item){
120122
Div(row){
121123
Div(col-lg-8 col-lg-offset-2 text-center){

ecosystem_apps/land_registry/pages/lr_view.ptl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ If(#object_id# > 0){
471471
}
472472
Div(Class: short-name text-bold, Body: #buyer_member_name#)
473473
}
474-
Div(Class: text-muted m0, Body: ($lr_owner$))
474+
Div(Class: text-muted m0, Body: ($lr_buyer$))
475475
}
476476
}
477477
}

ecosystem_apps/token_sale/contracts/TsFreeWalletAdd.sim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ contract TsFreeWalletAdd {
2828
}
2929

3030
action {
31-
DBInsert("ts_wallets", {"wallet_btc": $WalletBtc, "wallet_eth": $WalletEth})
31+
DBInsert("ts_wallets", {"wallet_btc": $WalletBtc, "wallet_eth": $WalletEth, "buyer_account": 0, "signer_account": 0})
3232
}
3333
}

ecosystem_apps/token_sale/contracts/TsKeyApprove.sim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ contract TsKeyApprove {
7474
action {
7575
var pub_bytes bytes
7676
pub_bytes = HexToPub($PublicKey)
77-
DBInsert("@1keys", {"account": $userAccount, "deleted": 0, "pub": pub_bytes, "ecosystem": 1})
77+
DBInsert("@1keys", {"id": $userKey, "account": $userAccount, "deleted": 0, "pub": pub_bytes, "ecosystem": 1})
7878
var start_balance money
7979
start_balance = Money(1000000000000000)
8080
@1TokensSend("Recipient,Amount", $userAccount, start_balance)

ecosystem_apps/token_sale/pages/ts_free_wallets.ptl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ If(And(#admin_role_id# > 0, #role_id# == #admin_role_id#)){
99
}
1010

1111
If(#search#){
12-
SetVar(where, {"$and": [{"deleted":0}, {"buyer_account":0}, {"$or":[{"wallet_btc": {"$ilike": "#search#"}}, {"wallet_eth": {"$ilike": "#search#"}}]}]})
12+
SetVar(where, {"$and": [{"deleted": 0}, {"buyer_account": 0}, {"$or": [{"wallet_btc": {"$ilike": "#search#"}}, {"wallet_eth": {"$ilike": "#search#"}}]}]})
1313
}.Else{
14-
SetVar(where, {"$and": [{"deleted":0}, {"buyer_account":0}]})
14+
SetVar(where, {"$and": [{"deleted": 0}, {"buyer_account": 0}]})
1515
}
1616

1717
Div(list-group-item ml-lg mr-lg pt-lg){

ecosystem_apps/token_sale/pages/ts_sales.ptl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ If(And(#admin_role_id# > 0, #role_id# == #admin_role_id#)){
1313
}
1414

1515
If(#search#){
16-
SetVar(where, {"id": "#search#"})
16+
SetVar(where, {"buyer_account": {"$ilike": "#search#"}})
1717
}.Else{
1818
SetVar(where, {"id": {"$gt": 0}})
1919
}
2020

2121
Div(list-group-item ml-lg mr-lg pt-lg){
22-
SetVar(search_name, LangRes(@1account))
22+
SetVar(search_name, LangRes(@1wallet))
2323
Include(@1search)
2424
}
2525

ecosystem_apps/token_sale/tables/ts_sales.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
{
6868
"conditions": "false",
6969
"name": "buyer_account",
70-
"type": "number"
70+
"type": "varchar"
7171
},
7272
{
7373
"conditions": "ContractAccess(\"@1TsTransferReject\",\"@1TsTransferManager\",\"@1TsTransferAdmin\",\"@1TsTransferSeller\")",

platform_apps/questionnaire/contracts/QOperations.sim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
contract QOperations {
22
data {
33
Id int "optional"
4-
Description string
5-
Question string
6-
Answer string
74
Operation string
5+
Description string "optional"
6+
Question string "optional"
7+
Answer string "optional"
88
Notifications bool "optional"
99
Hide bool "optional"
1010
Change bool "optional"
1111
AuGroups int "optional"
1212
AuRoles int "optional"
13-
EndDate string
14-
EndTime string
13+
EndDate string "optional"
14+
EndTime string "optional"
1515
}
1616

1717
func trimZeroTime(s string) string {

0 commit comments

Comments
 (0)