@@ -30,7 +30,6 @@ import (
30
30
multiaccountscommon "github.com/status-im/status-go/multiaccounts/common"
31
31
"github.com/status-im/status-go/params"
32
32
"github.com/status-im/status-go/protocol/common"
33
- "github.com/status-im/status-go/protocol/common/shard"
34
33
community_token "github.com/status-im/status-go/protocol/communities/token"
35
34
"github.com/status-im/status-go/protocol/encryption"
36
35
"github.com/status-im/status-go/protocol/ens"
@@ -45,6 +44,7 @@ import (
45
44
"github.com/status-im/status-go/services/wallet/token"
46
45
"github.com/status-im/status-go/signal"
47
46
"github.com/status-im/status-go/transactions"
47
+ "github.com/status-im/status-go/wakuv2"
48
48
)
49
49
50
50
type Publisher interface {
@@ -740,8 +740,8 @@ func (m *Manager) All() ([]*Community, error) {
740
740
}
741
741
742
742
type CommunityShard struct {
743
- CommunityID string `json:"communityID"`
744
- Shard * shard .Shard `json:"shard"`
743
+ CommunityID string `json:"communityID"`
744
+ Shard * wakuv2 .Shard `json:"shard"`
745
745
}
746
746
747
747
type CuratedCommunities struct {
@@ -1549,7 +1549,7 @@ func (m *Manager) DeleteCommunity(id types.HexBytes) error {
1549
1549
return m .persistence .DeleteCommunitySettings (id )
1550
1550
}
1551
1551
1552
- func (m * Manager ) updateShard (community * Community , shard * shard .Shard , clock uint64 ) error {
1552
+ func (m * Manager ) updateShard (community * Community , shard * wakuv2 .Shard , clock uint64 ) error {
1553
1553
community .config .Shard = shard
1554
1554
if shard == nil {
1555
1555
return m .persistence .DeleteCommunityShard (community .ID ())
@@ -1558,15 +1558,15 @@ func (m *Manager) updateShard(community *Community, shard *shard.Shard, clock ui
1558
1558
return m .persistence .SaveCommunityShard (community .ID (), shard , clock )
1559
1559
}
1560
1560
1561
- func (m * Manager ) UpdateShard (community * Community , shard * shard .Shard , clock uint64 ) error {
1561
+ func (m * Manager ) UpdateShard (community * Community , shard * wakuv2 .Shard , clock uint64 ) error {
1562
1562
m .communityLock .Lock (community .ID ())
1563
1563
defer m .communityLock .Unlock (community .ID ())
1564
1564
1565
1565
return m .updateShard (community , shard , clock )
1566
1566
}
1567
1567
1568
1568
// SetShard assigns a shard to a community
1569
- func (m * Manager ) SetShard (communityID types.HexBytes , shard * shard .Shard ) (* Community , error ) {
1569
+ func (m * Manager ) SetShard (communityID types.HexBytes , shard * wakuv2 .Shard ) (* Community , error ) {
1570
1570
m .communityLock .Lock (communityID )
1571
1571
defer m .communityLock .Unlock (communityID )
1572
1572
@@ -2164,11 +2164,11 @@ func (m *Manager) HandleCommunityDescriptionMessage(signer *ecdsa.PublicKey, des
2164
2164
if err != nil {
2165
2165
return nil , err
2166
2166
}
2167
- var cShard * shard .Shard
2167
+ var cShard * wakuv2 .Shard
2168
2168
if communityShard == nil {
2169
- cShard = & shard .Shard {Cluster : shard .MainStatusShardCluster , Index : shard .DefaultShardIndex }
2169
+ cShard = & wakuv2 .Shard {Cluster : wakuv2 .MainStatusShardCluster , Index : wakuv2 .DefaultShardIndex }
2170
2170
} else {
2171
- cShard = shard .FromProtobuff (communityShard )
2171
+ cShard = wakuv2 .FromProtobuff (communityShard )
2172
2172
}
2173
2173
config := Config {
2174
2174
CommunityDescription : processedDescription ,
@@ -3946,11 +3946,11 @@ func (m *Manager) GetByIDString(idString string) (*Community, error) {
3946
3946
return m .GetByID (id )
3947
3947
}
3948
3948
3949
- func (m * Manager ) GetCommunityShard (communityID types.HexBytes ) (* shard .Shard , error ) {
3949
+ func (m * Manager ) GetCommunityShard (communityID types.HexBytes ) (* wakuv2 .Shard , error ) {
3950
3950
return m .persistence .GetCommunityShard (communityID )
3951
3951
}
3952
3952
3953
- func (m * Manager ) SaveCommunityShard (communityID types.HexBytes , shard * shard .Shard , clock uint64 ) error {
3953
+ func (m * Manager ) SaveCommunityShard (communityID types.HexBytes , shard * wakuv2 .Shard , clock uint64 ) error {
3954
3954
m .communityLock .Lock (communityID )
3955
3955
defer m .communityLock .Unlock (communityID )
3956
3956
0 commit comments