mirror of
https://github.com/status-im/status-go.git
synced 2025-01-29 16:06:47 +00:00
chore(communities)!: rename communitytokensv2 package to communitytokens
This is a breaking change which renames `communitytokensv2` package to `communitytokens`.
This commit is contained in:
parent
988894ccaf
commit
a9a333d61a
@ -2692,7 +2692,10 @@ func (b *GethStatusBackend) injectAccountsIntoWakuService(w wakutypes.WakuKeyMan
|
||||
}
|
||||
|
||||
if st != nil {
|
||||
if err := st.InitProtocol(b.statusNode.GethNode().Config().Name, identity, b.appDB, b.walletDB, b.statusNode.HTTPServer(), b.multiaccountsDB, acc, b.accountManager, b.statusNode.RPCClient(), b.statusNode.WalletService(), b.statusNode.CommunityTokensServiceV2(), b.statusNode.WakuV2Service(), logutils.ZapLogger(), b.statusNode.AccountsFeed()); err != nil {
|
||||
if err := st.InitProtocol(b.statusNode.GethNode().Config().Name, identity, b.appDB, b.walletDB,
|
||||
b.statusNode.HTTPServer(), b.multiaccountsDB, acc, b.accountManager, b.statusNode.RPCClient(),
|
||||
b.statusNode.WalletService(), b.statusNode.CommunityTokensService(), b.statusNode.WakuV2Service(),
|
||||
logutils.ZapLogger(), b.statusNode.AccountsFeed()); err != nil {
|
||||
return err
|
||||
}
|
||||
// Set initial connection state
|
||||
@ -2709,7 +2712,7 @@ func (b *GethStatusBackend) injectAccountsIntoWakuService(w wakutypes.WakuKeyMan
|
||||
}
|
||||
b.statusNode.ChatService(accDB).Init(messenger)
|
||||
b.statusNode.EnsService().Init(messenger.SyncEnsNamesWithDispatchMessage)
|
||||
b.statusNode.CommunityTokensServiceV2().Init(messenger)
|
||||
b.statusNode.CommunityTokensService().Init(messenger)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -37,7 +37,7 @@ import (
|
||||
appmetricsservice "github.com/status-im/status-go/services/appmetrics"
|
||||
"github.com/status-im/status-go/services/browsers"
|
||||
"github.com/status-im/status-go/services/chat"
|
||||
"github.com/status-im/status-go/services/communitytokensv2"
|
||||
"github.com/status-im/status-go/services/communitytokens"
|
||||
"github.com/status-im/status-go/services/connector"
|
||||
"github.com/status-im/status-go/services/ens"
|
||||
"github.com/status-im/status-go/services/eth"
|
||||
@ -128,7 +128,7 @@ type StatusNode struct {
|
||||
wakuV2Srvc *wakuv2.Waku
|
||||
wakuV2ExtSrvc *wakuv2ext.Service
|
||||
ensSrvc *ens.Service
|
||||
communityTokensSrvcV2 *communitytokensv2.Service
|
||||
communityTokensSrvc *communitytokens.Service
|
||||
gifSrvc *gif.Service
|
||||
stickersSrvc *stickers.Service
|
||||
chatSrvc *chat.Service
|
||||
@ -518,7 +518,7 @@ func (n *StatusNode) stop() error {
|
||||
n.wakuV2Srvc = nil
|
||||
n.wakuV2ExtSrvc = nil
|
||||
n.ensSrvc = nil
|
||||
n.communityTokensSrvcV2 = nil
|
||||
n.communityTokensSrvc = nil
|
||||
n.stickersSrvc = nil
|
||||
n.connectorSrvc = nil
|
||||
n.publicMethods = make(map[string]bool)
|
||||
|
@ -40,7 +40,7 @@ import (
|
||||
appmetricsservice "github.com/status-im/status-go/services/appmetrics"
|
||||
"github.com/status-im/status-go/services/browsers"
|
||||
"github.com/status-im/status-go/services/chat"
|
||||
"github.com/status-im/status-go/services/communitytokensv2"
|
||||
"github.com/status-im/status-go/services/communitytokens"
|
||||
"github.com/status-im/status-go/services/connector"
|
||||
"github.com/status-im/status-go/services/ens"
|
||||
"github.com/status-im/status-go/services/eth"
|
||||
@ -96,7 +96,7 @@ func (b *StatusNode) initServices(config *params.NodeConfig, mediaServer *server
|
||||
services = append(services, b.statusPublicService())
|
||||
services = append(services, b.pendingTrackerService(&b.walletFeed))
|
||||
services = append(services, b.ensService(b.timeSourceNow()))
|
||||
services = append(services, b.CommunityTokensServiceV2())
|
||||
services = append(services, b.CommunityTokensService())
|
||||
services = append(services, b.stickersService(accDB))
|
||||
services = append(services, b.updatesService())
|
||||
services = appendIf(b.appDB != nil && b.multiaccountsDB != nil, services, b.accountsService(&b.accountsFeed, accDB, mediaServer))
|
||||
@ -502,11 +502,11 @@ func (b *StatusNode) pendingTrackerService(walletFeed *event.Feed) *transactions
|
||||
return b.pendingTracker
|
||||
}
|
||||
|
||||
func (b *StatusNode) CommunityTokensServiceV2() *communitytokensv2.Service {
|
||||
if b.communityTokensSrvcV2 == nil {
|
||||
b.communityTokensSrvcV2 = communitytokensv2.NewService(b.rpcClient, b.gethAccountManager, b.config, b.appDB, &b.walletFeed, b.transactor)
|
||||
func (b *StatusNode) CommunityTokensService() *communitytokens.Service {
|
||||
if b.communityTokensSrvc == nil {
|
||||
b.communityTokensSrvc = communitytokens.NewService(b.rpcClient, b.gethAccountManager, b.config, b.appDB, &b.walletFeed, b.transactor)
|
||||
}
|
||||
return b.communityTokensSrvcV2
|
||||
return b.communityTokensSrvc
|
||||
}
|
||||
|
||||
func (b *StatusNode) stickersService(accountDB *accounts.Database) *stickers.Service {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package communitytokensv2
|
||||
package communitytokens
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,4 +1,4 @@
|
||||
package communitytokensv2
|
||||
package communitytokens
|
||||
|
||||
import (
|
||||
"testing"
|
@ -1,4 +1,4 @@
|
||||
package communitytokensv2
|
||||
package communitytokens
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,4 +1,4 @@
|
||||
package communitytokensv2
|
||||
package communitytokens
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -24,7 +24,7 @@ import (
|
||||
"github.com/status-im/status-go/protocol/communities/token"
|
||||
"github.com/status-im/status-go/protocol/protobuf"
|
||||
"github.com/status-im/status-go/rpc"
|
||||
"github.com/status-im/status-go/services/communitytokensv2/communitytokensdatabase"
|
||||
"github.com/status-im/status-go/services/communitytokens/communitytokensdatabase"
|
||||
"github.com/status-im/status-go/services/wallet/bigint"
|
||||
walletCommon "github.com/status-im/status-go/services/wallet/common"
|
||||
"github.com/status-im/status-go/services/wallet/requests"
|
||||
@ -71,7 +71,7 @@ func (s *Service) Protocols() []p2p.Protocol {
|
||||
func (s *Service) APIs() []ethRpc.API {
|
||||
return []ethRpc.API{
|
||||
{
|
||||
Namespace: "communitytokensv2",
|
||||
Namespace: "communitytokens",
|
||||
Version: "0.1.0",
|
||||
Service: NewAPI(s),
|
||||
Public: true,
|
@ -1,4 +1,4 @@
|
||||
package communitytokensv2
|
||||
package communitytokens
|
||||
|
||||
const currentVersion = "1.0.0"
|
||||
|
@ -52,7 +52,7 @@ import (
|
||||
"github.com/status-im/status-go/rpc"
|
||||
"github.com/status-im/status-go/server"
|
||||
"github.com/status-im/status-go/services/browsers"
|
||||
"github.com/status-im/status-go/services/communitytokensv2"
|
||||
"github.com/status-im/status-go/services/communitytokens"
|
||||
"github.com/status-im/status-go/services/ext/mailservers"
|
||||
mailserversDB "github.com/status-im/status-go/services/mailservers"
|
||||
"github.com/status-im/status-go/services/wallet"
|
||||
@ -130,7 +130,7 @@ func (s *Service) GetPeer(rawURL string) (*enode.Node, error) {
|
||||
func (s *Service) InitProtocol(nodeName string, identity *ecdsa.PrivateKey, appDb, walletDb *sql.DB,
|
||||
httpServer *server.MediaServer, multiAccountDb *multiaccounts.Database, acc *multiaccounts.Account,
|
||||
accountManager *account.GethManager, rpcClient *rpc.Client, walletService *wallet.Service,
|
||||
communityTokensService *communitytokensv2.Service, wakuService *wakuv2.Waku, logger *zap.Logger,
|
||||
communityTokensService *communitytokens.Service, wakuService *wakuv2.Waku, logger *zap.Logger,
|
||||
accountsFeed *event.Feed) error {
|
||||
var err error
|
||||
if !s.config.ShhextConfig.PFSEnabled {
|
||||
@ -403,7 +403,7 @@ func buildMessengerOptions(
|
||||
envelopesMonitorConfig *transport.EnvelopesMonitorConfig,
|
||||
accountsDB *accounts.Database,
|
||||
walletService *wallet.Service,
|
||||
communityTokensService *communitytokensv2.Service,
|
||||
communityTokensService *communitytokens.Service,
|
||||
wakuService *wakuv2.Waku,
|
||||
logger *zap.Logger,
|
||||
messengerSignalsHandler protocol.MessengerSignalsHandler,
|
||||
|
@ -33,7 +33,7 @@ import (
|
||||
"github.com/status-im/status-go/rpc/network"
|
||||
"github.com/status-im/status-go/server"
|
||||
"github.com/status-im/status-go/services/accounts/accountsevent"
|
||||
"github.com/status-im/status-go/services/communitytokensv2/communitytokensdatabase"
|
||||
"github.com/status-im/status-go/services/communitytokens/communitytokensdatabase"
|
||||
"github.com/status-im/status-go/services/utils"
|
||||
"github.com/status-im/status-go/services/wallet/bigint"
|
||||
"github.com/status-im/status-go/services/wallet/community"
|
||||
|
Loading…
x
Reference in New Issue
Block a user