mirror of
https://github.com/status-im/status-go.git
synced 2025-02-06 11:56:01 +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 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
|
return err
|
||||||
}
|
}
|
||||||
// Set initial connection state
|
// Set initial connection state
|
||||||
@ -2709,7 +2712,7 @@ func (b *GethStatusBackend) injectAccountsIntoWakuService(w wakutypes.WakuKeyMan
|
|||||||
}
|
}
|
||||||
b.statusNode.ChatService(accDB).Init(messenger)
|
b.statusNode.ChatService(accDB).Init(messenger)
|
||||||
b.statusNode.EnsService().Init(messenger.SyncEnsNamesWithDispatchMessage)
|
b.statusNode.EnsService().Init(messenger.SyncEnsNamesWithDispatchMessage)
|
||||||
b.statusNode.CommunityTokensServiceV2().Init(messenger)
|
b.statusNode.CommunityTokensService().Init(messenger)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -37,7 +37,7 @@ import (
|
|||||||
appmetricsservice "github.com/status-im/status-go/services/appmetrics"
|
appmetricsservice "github.com/status-im/status-go/services/appmetrics"
|
||||||
"github.com/status-im/status-go/services/browsers"
|
"github.com/status-im/status-go/services/browsers"
|
||||||
"github.com/status-im/status-go/services/chat"
|
"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/connector"
|
||||||
"github.com/status-im/status-go/services/ens"
|
"github.com/status-im/status-go/services/ens"
|
||||||
"github.com/status-im/status-go/services/eth"
|
"github.com/status-im/status-go/services/eth"
|
||||||
@ -128,7 +128,7 @@ type StatusNode struct {
|
|||||||
wakuV2Srvc *wakuv2.Waku
|
wakuV2Srvc *wakuv2.Waku
|
||||||
wakuV2ExtSrvc *wakuv2ext.Service
|
wakuV2ExtSrvc *wakuv2ext.Service
|
||||||
ensSrvc *ens.Service
|
ensSrvc *ens.Service
|
||||||
communityTokensSrvcV2 *communitytokensv2.Service
|
communityTokensSrvc *communitytokens.Service
|
||||||
gifSrvc *gif.Service
|
gifSrvc *gif.Service
|
||||||
stickersSrvc *stickers.Service
|
stickersSrvc *stickers.Service
|
||||||
chatSrvc *chat.Service
|
chatSrvc *chat.Service
|
||||||
@ -518,7 +518,7 @@ func (n *StatusNode) stop() error {
|
|||||||
n.wakuV2Srvc = nil
|
n.wakuV2Srvc = nil
|
||||||
n.wakuV2ExtSrvc = nil
|
n.wakuV2ExtSrvc = nil
|
||||||
n.ensSrvc = nil
|
n.ensSrvc = nil
|
||||||
n.communityTokensSrvcV2 = nil
|
n.communityTokensSrvc = nil
|
||||||
n.stickersSrvc = nil
|
n.stickersSrvc = nil
|
||||||
n.connectorSrvc = nil
|
n.connectorSrvc = nil
|
||||||
n.publicMethods = make(map[string]bool)
|
n.publicMethods = make(map[string]bool)
|
||||||
|
@ -40,7 +40,7 @@ import (
|
|||||||
appmetricsservice "github.com/status-im/status-go/services/appmetrics"
|
appmetricsservice "github.com/status-im/status-go/services/appmetrics"
|
||||||
"github.com/status-im/status-go/services/browsers"
|
"github.com/status-im/status-go/services/browsers"
|
||||||
"github.com/status-im/status-go/services/chat"
|
"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/connector"
|
||||||
"github.com/status-im/status-go/services/ens"
|
"github.com/status-im/status-go/services/ens"
|
||||||
"github.com/status-im/status-go/services/eth"
|
"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.statusPublicService())
|
||||||
services = append(services, b.pendingTrackerService(&b.walletFeed))
|
services = append(services, b.pendingTrackerService(&b.walletFeed))
|
||||||
services = append(services, b.ensService(b.timeSourceNow()))
|
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.stickersService(accDB))
|
||||||
services = append(services, b.updatesService())
|
services = append(services, b.updatesService())
|
||||||
services = appendIf(b.appDB != nil && b.multiaccountsDB != nil, services, b.accountsService(&b.accountsFeed, accDB, mediaServer))
|
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
|
return b.pendingTracker
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *StatusNode) CommunityTokensServiceV2() *communitytokensv2.Service {
|
func (b *StatusNode) CommunityTokensService() *communitytokens.Service {
|
||||||
if b.communityTokensSrvcV2 == nil {
|
if b.communityTokensSrvc == nil {
|
||||||
b.communityTokensSrvcV2 = communitytokensv2.NewService(b.rpcClient, b.gethAccountManager, b.config, b.appDB, &b.walletFeed, b.transactor)
|
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 {
|
func (b *StatusNode) stickersService(accountDB *accounts.Database) *stickers.Service {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package communitytokensv2
|
package communitytokens
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
@ -1,4 +1,4 @@
|
|||||||
package communitytokensv2
|
package communitytokens
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
@ -1,4 +1,4 @@
|
|||||||
package communitytokensv2
|
package communitytokens
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
@ -1,4 +1,4 @@
|
|||||||
package communitytokensv2
|
package communitytokens
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@ -24,7 +24,7 @@ import (
|
|||||||
"github.com/status-im/status-go/protocol/communities/token"
|
"github.com/status-im/status-go/protocol/communities/token"
|
||||||
"github.com/status-im/status-go/protocol/protobuf"
|
"github.com/status-im/status-go/protocol/protobuf"
|
||||||
"github.com/status-im/status-go/rpc"
|
"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"
|
"github.com/status-im/status-go/services/wallet/bigint"
|
||||||
walletCommon "github.com/status-im/status-go/services/wallet/common"
|
walletCommon "github.com/status-im/status-go/services/wallet/common"
|
||||||
"github.com/status-im/status-go/services/wallet/requests"
|
"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 {
|
func (s *Service) APIs() []ethRpc.API {
|
||||||
return []ethRpc.API{
|
return []ethRpc.API{
|
||||||
{
|
{
|
||||||
Namespace: "communitytokensv2",
|
Namespace: "communitytokens",
|
||||||
Version: "0.1.0",
|
Version: "0.1.0",
|
||||||
Service: NewAPI(s),
|
Service: NewAPI(s),
|
||||||
Public: true,
|
Public: true,
|
@ -1,4 +1,4 @@
|
|||||||
package communitytokensv2
|
package communitytokens
|
||||||
|
|
||||||
const currentVersion = "1.0.0"
|
const currentVersion = "1.0.0"
|
||||||
|
|
@ -52,7 +52,7 @@ import (
|
|||||||
"github.com/status-im/status-go/rpc"
|
"github.com/status-im/status-go/rpc"
|
||||||
"github.com/status-im/status-go/server"
|
"github.com/status-im/status-go/server"
|
||||||
"github.com/status-im/status-go/services/browsers"
|
"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"
|
"github.com/status-im/status-go/services/ext/mailservers"
|
||||||
mailserversDB "github.com/status-im/status-go/services/mailservers"
|
mailserversDB "github.com/status-im/status-go/services/mailservers"
|
||||||
"github.com/status-im/status-go/services/wallet"
|
"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,
|
func (s *Service) InitProtocol(nodeName string, identity *ecdsa.PrivateKey, appDb, walletDb *sql.DB,
|
||||||
httpServer *server.MediaServer, multiAccountDb *multiaccounts.Database, acc *multiaccounts.Account,
|
httpServer *server.MediaServer, multiAccountDb *multiaccounts.Database, acc *multiaccounts.Account,
|
||||||
accountManager *account.GethManager, rpcClient *rpc.Client, walletService *wallet.Service,
|
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 {
|
accountsFeed *event.Feed) error {
|
||||||
var err error
|
var err error
|
||||||
if !s.config.ShhextConfig.PFSEnabled {
|
if !s.config.ShhextConfig.PFSEnabled {
|
||||||
@ -403,7 +403,7 @@ func buildMessengerOptions(
|
|||||||
envelopesMonitorConfig *transport.EnvelopesMonitorConfig,
|
envelopesMonitorConfig *transport.EnvelopesMonitorConfig,
|
||||||
accountsDB *accounts.Database,
|
accountsDB *accounts.Database,
|
||||||
walletService *wallet.Service,
|
walletService *wallet.Service,
|
||||||
communityTokensService *communitytokensv2.Service,
|
communityTokensService *communitytokens.Service,
|
||||||
wakuService *wakuv2.Waku,
|
wakuService *wakuv2.Waku,
|
||||||
logger *zap.Logger,
|
logger *zap.Logger,
|
||||||
messengerSignalsHandler protocol.MessengerSignalsHandler,
|
messengerSignalsHandler protocol.MessengerSignalsHandler,
|
||||||
|
@ -33,7 +33,7 @@ import (
|
|||||||
"github.com/status-im/status-go/rpc/network"
|
"github.com/status-im/status-go/rpc/network"
|
||||||
"github.com/status-im/status-go/server"
|
"github.com/status-im/status-go/server"
|
||||||
"github.com/status-im/status-go/services/accounts/accountsevent"
|
"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/utils"
|
||||||
"github.com/status-im/status-go/services/wallet/bigint"
|
"github.com/status-im/status-go/services/wallet/bigint"
|
||||||
"github.com/status-im/status-go/services/wallet/community"
|
"github.com/status-im/status-go/services/wallet/community"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user