File tree 7 files changed +55
-5
lines changed
contexts/communities/actions/home_plus
7 files changed +55
-5
lines changed Original file line number Diff line number Diff line change @@ -32,3 +32,4 @@ DELETE_MESSAGE_ENABLED=1
32
32
TWO_MINUTES_SYNCING=1
33
33
STICKERS_TEST_ENABLED=1
34
34
LOCAL_PAIRING_ENABLED=1
35
+ FAST_CREATE_COMMUNITY_ENABLED=1
Original file line number Diff line number Diff line change @@ -34,3 +34,4 @@ TWO_MINUTES_SYNCING=1
34
34
ENABLE_QUO_PREVIEW=1
35
35
STICKERS_TEST_ENABLED=1
36
36
LOCAL_PAIRING_ENABLED=1
37
+ FAST_CREATE_COMMUNITY_ENABLED=1
Original file line number Diff line number Diff line change @@ -21,3 +21,4 @@ BLANK_PREVIEW=0
21
21
COMMUNITIES_ENABLED=1
22
22
DATABASE_MANAGEMENT_ENABLED=1
23
23
DELETE_MESSAGE_ENABLED=1
24
+ FAST_CREATE_COMMUNITY_ENABLED=0
Original file line number Diff line number Diff line change 532
532
{:db (assoc db :communities/create {:membership constants/community-no-membership-access})}
533
533
(navigation/navigate-to :community-create nil )))
534
534
535
+ (rf/defn create-closed-community
536
+ {:events [:fast-create-community/create-closed-community ]}
537
+ [_]
538
+ {:json-rpc/call [{:method " wakuext_createClosedCommunity"
539
+ :params []
540
+ :js-response true
541
+ :on-success #(rf/dispatch [:sanitize-messages-and-process-response %])
542
+ :on-error #(log/error " failed to create closed community." {:error %})}]
543
+ :dispatch [:hide-bottom-sheet ]})
544
+
545
+ (rf/defn create-open-community
546
+ {:events [:fast-create-community/create-open-community ]}
547
+ [_]
548
+ {:json-rpc/call [{:method " wakuext_createOpenCommunity"
549
+ :params []
550
+ :js-response true
551
+ :on-success #(rf/dispatch [:sanitize-messages-and-process-response %])
552
+ :on-error #(log/error " failed to create open community." {:error %})}]
553
+ :dispatch [:hide-bottom-sheet ]})
554
+
555
+ (rf/defn create-token-gated-community
556
+ {:events [:fast-create-community/create-token-gated-community ]}
557
+ [_]
558
+ {:json-rpc/call [{:method " wakuext_createTokenGatedCommunity"
559
+ :params []
560
+ :js-response true
561
+ :on-success #(rf/dispatch [:sanitize-messages-and-process-response %])
562
+ :on-error #(log/error " failed to create token gated community." {:error %})}]
563
+ :dispatch [:hide-bottom-sheet ]})
564
+
535
565
(rf/defn open-edit-community
536
566
{:events [::open-edit-community :communities/open-edit-community ]}
537
567
[{:keys [db] :as cofx} id]
Original file line number Diff line number Diff line change 68
68
(get-config :VERIFY_ENS_CONTRACT_ADDRESS
69
69
((ethereum/chain-id->chain-keyword verify-ens-chain-id) ens/ens-registries)))
70
70
71
+ (def fast-create-community-enabled?
72
+ (enabled? (get-config :FAST_CREATE_COMMUNITY_ENABLED " 0" )))
73
+
71
74
(def default-multiaccount
72
75
{:preview-privacy? blank-preview?
73
76
:wallet/visible-tokens {:mainnet #{:SNT }}
Original file line number Diff line number Diff line change 1
1
(ns status-im2.contexts.communities.actions.home-plus.view
2
2
(:require [quo2.core :as quo]
3
- [utils.re-frame :as rf]))
3
+ [utils.re-frame :as rf]
4
+ [status-im2.config :as config]))
4
5
5
6
(defn view
6
7
[]
12
13
{:icon :i/communities
13
14
:accessibility-label :create-community
14
15
:label " Create community (only for e2e)"
15
- :on-press #(rf/dispatch [:legacy-only-for-e2e/open-create-community ])}]]])
16
+ :on-press #(rf/dispatch [:legacy-only-for-e2e/open-create-community ])}
17
+ (when config/fast-create-community-enabled?
18
+ {:icon :i/communities
19
+ :accessibility-label :create-closed-community
20
+ :label " Create closed community"
21
+ :on-press #(rf/dispatch [:fast-create-community/create-closed-community ])}
22
+ {:icon :i/communities
23
+ :accessibility-label :create-open-community
24
+ :label " Create open community"
25
+ :on-press #(rf/dispatch [:fast-create-community/create-open-community ])}
26
+ {:icon :i/communities
27
+ :accessibility-label :create-token-gated-community
28
+ :label " Create token-gated community"
29
+ :on-press #(rf/dispatch [:fast-create-community/create-token-gated-community ])})]]])
Original file line number Diff line number Diff line change 3
3
"_comment" : " Instead use: scripts/update-status-go.sh <rev>" ,
4
4
"owner" : " status-im" ,
5
5
"repo" : " status-go" ,
6
- "version" : " v0.162.13 " ,
7
- "commit-sha1" : " b81ad3fcac4c8c5c24964fb9f62dedc020ec3eb5 " ,
8
- "src-sha256" : " 0w69rdpaqm88wa9yxkdg46iw7cvd8aln1c3znzph2wf0803ab1qm "
6
+ "version" : " feat/create-community-fast " ,
7
+ "commit-sha1" : " aa839e03d5cc6ba3958ccab629cb3e630ce001f0 " ,
8
+ "src-sha256" : " 12329877wwr3a02pdmc8nzdwvca7qrad14vgq3lrxb64x0a48z8k "
9
9
}
You can’t perform that action at this time.
0 commit comments