feat: token order API (#4391)

This commit is contained in:
Cuteivist 2023-12-04 11:18:05 +01:00 committed by GitHub
parent b9197510b1
commit 04873ef880
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 4115 additions and 4859 deletions

View File

@ -1 +1 @@
0.171.26
0.171.27

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
CREATE TABLE "token_preferences" (
"key" TEXT NOT NULL,
"position" INTEGER NOT NULL DEFAULT -1,
"group_position" INTEGER NOT NULL DEFAULT -1,
"visible" BOOLEAN NOT NULL DEFAULT TRUE,
"community_id" TEXT NOT NULL DEFAULT '',
"testnet" BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY("key","testnet")
);
ALTER TABLE settings ADD COLUMN wallet_token_preferences_change_clock INTEGER NOT NULL DEFAULT 0;
ALTER TABLE settings ADD COLUMN wallet_token_preferences_group_by_community BOOLEAN NOT NULL DEFAULT FALSE;

View File

@ -13,6 +13,7 @@ import (
"github.com/status-im/status-go/multiaccounts/settings"
notificationssettings "github.com/status-im/status-go/multiaccounts/settings_notifications"
sociallinkssettings "github.com/status-im/status-go/multiaccounts/settings_social_links"
walletsettings "github.com/status-im/status-go/multiaccounts/settings_wallet"
"github.com/status-im/status-go/nodecfg"
"github.com/status-im/status-go/params"
)
@ -285,6 +286,7 @@ type Database struct {
*settings.Database
*notificationssettings.NotificationsSettings
*sociallinkssettings.SocialLinksSettings
*walletsettings.WalletSettings
db *sql.DB
}
@ -296,8 +298,9 @@ func NewDB(db *sql.DB) (*Database, error) {
}
sn := notificationssettings.NewNotificationsSettings(db)
ssl := sociallinkssettings.NewSocialLinksSettings(db)
sw := walletsettings.NewWalletSettings(db)
return &Database{sDB, sn, ssl, db}, nil
return &Database{sDB, sn, ssl, sw, db}, nil
}
// DB Gets db sql.DB

View File

@ -397,6 +397,11 @@ var (
dBColumnName: "is_sepolia_enabled",
valueHandler: BoolHandler,
}
TokenGroupByCommunity = SettingField{
reactFieldName: "token-group-by-community?",
dBColumnName: "wallet_token_preferences_group_by_community",
valueHandler: BoolHandler,
}
UseMailservers = SettingField{
reactFieldName: "use-mailservers?",
dBColumnName: "use_mailservers",
@ -526,6 +531,7 @@ var (
WebviewAllowPermissionRequests,
ProfileMigrationNeeded,
IsSepoliaEnabled,
TokenGroupByCommunity,
URLUnfurlingMode,
}
)

View File

@ -353,7 +353,7 @@ func (db *Database) GetSettings() (Settings, error) {
profile_pictures_show_to, profile_pictures_visibility, wallet_root_address, wallet_set_up_passed, wallet_visible_tokens,
waku_bloom_filter_mode, webview_allow_permission_requests, current_user_status, send_status_updates, gif_recents,
gif_favorites, opensea_enabled, last_backup, backup_enabled, telemetry_server_url, auto_message_enabled, gif_api_key,
test_networks_enabled, mutual_contact_enabled, profile_migration_needed, is_sepolia_enabled, url_unfurling_mode,
test_networks_enabled, mutual_contact_enabled, profile_migration_needed, is_sepolia_enabled, wallet_token_preferences_group_by_community, url_unfurling_mode,
omit_transfers_history_scan, mnemonic_was_not_shown
FROM
settings
@ -429,6 +429,7 @@ func (db *Database) GetSettings() (Settings, error) {
&s.MutualContactEnabled,
&s.ProfileMigrationNeeded,
&s.IsSepoliaEnabled,
&s.TokenGroupByCommunity,
&s.URLUnfurlingMode,
&s.OmitTransfersHistoryScan,
&s.MnemonicWasNotShown,
@ -720,6 +721,18 @@ func (db *Database) GetIsSepoliaEnabled() (result bool, err error) {
return result, err
}
func (db *Database) GetTokenGroupByCommunity() (result bool, err error) {
err = db.makeSelectRow(TokenGroupByCommunity).Scan(&result)
if err == sql.ErrNoRows {
return result, nil
}
return result, err
}
func (db *Database) SetTokenGroupByCommunity(value bool) error {
return db.SaveSettingField(TokenGroupByCommunity, value)
}
func (db *Database) GetTelemetryServerURL() (string, error) {
return db.makeSelectString(TelemetryServerURL)
}

View File

@ -199,6 +199,7 @@ type Settings struct {
TestNetworksEnabled bool `json:"test-networks-enabled?,omitempty"`
ProfileMigrationNeeded bool `json:"profile-migration-needed,omitempty"`
IsSepoliaEnabled bool `json:"is-sepolia-enabled?,omitempty"`
TokenGroupByCommunity bool `json:"token-group-by-community?,omitempty"`
URLUnfurlingMode URLUnfurlingModeType `json:"url-unfurling-mode,omitempty"`
}

View File

@ -0,0 +1,126 @@
package walletsettings
import (
"database/sql"
"errors"
)
type TokenPreferences struct {
Key string `json:"key"`
Position int `json:"position"`
GroupPosition int `json:"groupPosition"`
Visible bool `json:"visible"`
CommunityID string `json:"communityId"`
}
type WalletSettings struct {
db *sql.DB
}
func NewWalletSettings(db *sql.DB) *WalletSettings {
return &WalletSettings{
db: db,
}
}
// This function should not be used directly, it is called from the functions which update token preferences.
func (ws *WalletSettings) setClockOfLastTokenPreferencesChange(tx *sql.Tx, clock uint64) error {
if tx == nil {
return errors.New("database transaction is nil")
}
_, err := tx.Exec("UPDATE settings SET wallet_token_preferences_change_clock = ? WHERE synthetic_id = 'id'", clock)
return err
}
func (ws *WalletSettings) GetClockOfLastTokenPreferencesChange() (result uint64, err error) {
query := "SELECT wallet_token_preferences_change_clock FROM settings WHERE synthetic_id = 'id'"
err = ws.db.QueryRow(query).Scan(&result)
if err != nil {
return 0, err
}
return result, err
}
func (ws *WalletSettings) UpdateTokenPreferences(preferences []TokenPreferences, groupByCommunity bool, testNetworksEnabled bool, clock uint64) error {
if len(preferences) == 0 {
return errors.New("tokens: trying to create custom order with empty list")
}
tx, err := ws.db.Begin()
if err != nil {
return err
}
var mainError error = nil
defer func() {
if mainError == nil {
err = tx.Commit()
return
}
_ = tx.Rollback()
}()
_, mainError = tx.Exec("DELETE FROM token_preferences WHERE testnet = ?", testNetworksEnabled)
if mainError != nil {
return mainError
}
for _, p := range preferences {
if p.Position < 0 {
mainError = errors.New("tokens: trying to create custom order with negative position")
return mainError
}
_, err := tx.Exec("INSERT INTO token_preferences (key, position, group_position, visible, community_id, testnet) VALUES (?, ?, ?, ?, ?, ?)", p.Key, p.Position, p.GroupPosition, p.Visible, p.CommunityID, testNetworksEnabled)
if err != nil {
mainError = err
return err
}
}
if groupByCommunity {
// Find community tokens without group position
// Group position can be -1 if it wasn't created yet. Values must be consitstent across all tokens
rows, err := tx.Query(`SELECT COUNT(*) FROM token_preferences WHERE testnet = ? AND group_position = -1 AND community_id != '' AND visible GROUP BY community_id HAVING COUNT(*) > 0`, testNetworksEnabled)
if err != nil {
mainError = err
return err
}
if rows.Next() {
mainError = errors.New("tokens: not all community tokens have assigned the group position")
return mainError
}
}
mainError = ws.setClockOfLastTokenPreferencesChange(tx, clock)
if mainError != nil {
return mainError
}
return nil
}
func (ws *WalletSettings) GetTokenPreferences(testNetworksEnabled bool) ([]TokenPreferences, error) {
rows, err := ws.db.Query("SELECT key, position, group_position, visible, community_id FROM token_preferences WHERE testnet = ?", testNetworksEnabled)
if err != nil {
return nil, err
}
defer rows.Close()
var result []TokenPreferences
for rows.Next() {
token := TokenPreferences{}
err := rows.Scan(&token.Key, &token.Position, &token.GroupPosition, &token.Visible, &token.CommunityID)
if err != nil {
return nil, err
}
result = append(result, token)
}
if err := rows.Err(); err != nil {
return nil, err
}
return result, nil
}

View File

@ -0,0 +1,308 @@
package walletsettings
import (
"encoding/json"
"testing"
"github.com/stretchr/testify/require"
"github.com/status-im/status-go/appdatabase"
"github.com/status-im/status-go/multiaccounts/settings"
"github.com/status-im/status-go/params"
"github.com/status-im/status-go/t/helpers"
)
var (
config = params.NodeConfig{
NetworkID: 10,
DataDir: "test",
}
networks = json.RawMessage("{}")
settingsObj = settings.Settings{
Networks: &networks,
}
)
func setupTestDB(t *testing.T) (*WalletSettings, func()) {
db, stop, err := helpers.SetupTestSQLDB(appdatabase.DbInitializer{}, "settings-wallet-tests-")
require.NoError(t, err)
settDb, err := settings.MakeNewDB(db)
require.NoError(t, err)
err = settDb.CreateSettings(settingsObj, config)
require.NoError(t, err)
walletSettings := NewWalletSettings(db)
return walletSettings, func() { require.NoError(t, stop()) }
}
func TestSetClockOfLastTokenPreferencesChange(t *testing.T) {
walletSettings, stop := setupTestDB(t)
defer stop()
clock, err := walletSettings.GetClockOfLastTokenPreferencesChange()
require.NoError(t, err)
require.Equal(t, uint64(0), clock)
err = walletSettings.setClockOfLastTokenPreferencesChange(nil, 123)
require.Error(t, err)
tx, err := walletSettings.db.Begin()
require.NoError(t, err)
err = walletSettings.setClockOfLastTokenPreferencesChange(tx, 123)
require.NoError(t, err)
err = tx.Commit()
require.NoError(t, err)
clock, err = walletSettings.GetClockOfLastTokenPreferencesChange()
require.NoError(t, err)
require.Equal(t, uint64(123), clock)
}
func TestGetTokenPreferencesEmpty(t *testing.T) {
walletSettings, stop := setupTestDB(t)
defer stop()
preferences, err := walletSettings.GetTokenPreferences(true)
require.NoError(t, err)
require.Equal(t, 0, len(preferences))
preferences, err = walletSettings.GetTokenPreferences(false)
require.NoError(t, err)
require.Equal(t, 0, len(preferences))
}
func TestUpdateTokenPreferencesEmpty(t *testing.T) {
walletSettings, stop := setupTestDB(t)
defer stop()
err := walletSettings.UpdateTokenPreferences([]TokenPreferences{}, false, false, 0)
require.Error(t, err)
err = walletSettings.UpdateTokenPreferences([]TokenPreferences{}, false, true, 0)
require.Error(t, err)
}
func TestUpdateTokenPreferencesTestnet(t *testing.T) {
walletSettings, stop := setupTestDB(t)
defer stop()
err := walletSettings.UpdateTokenPreferences([]TokenPreferences{
{"SNT", 0, -1, false, ""},
}, false, true, 0)
require.NoError(t, err)
// Mainnet is not affected by testnet preferences
preferences, err := walletSettings.GetTokenPreferences(false)
require.NoError(t, err)
require.Equal(t, 0, len(preferences))
preferences, err = walletSettings.GetTokenPreferences(true)
require.NoError(t, err)
require.Equal(t, 1, len(preferences))
require.Equal(t, "SNT", preferences[0].Key)
require.Equal(t, 0, preferences[0].Position)
require.Equal(t, -1, preferences[0].GroupPosition)
require.Equal(t, false, preferences[0].Visible)
require.Equal(t, "", preferences[0].CommunityID)
// Inserting into testnet doesn't affect mainnet
err = walletSettings.UpdateTokenPreferences([]TokenPreferences{
{"ABC0", 0, -1, true, ""},
{"ABC1", 1, -1, true, ""},
}, false, false, 0)
require.NoError(t, err)
err = walletSettings.UpdateTokenPreferences([]TokenPreferences{
{"ABC0", 1, -1, true, ""},
{"ABC1", 0, -1, true, ""},
}, false, true, 0)
require.NoError(t, err)
// Having same symbols on mainnet and testnet is allowed
preferences, err = walletSettings.GetTokenPreferences(true)
require.NoError(t, err)
require.Equal(t, 2, len(preferences))
require.Equal(t, "ABC0", preferences[0].Key)
require.Equal(t, 1, preferences[0].Position)
require.Equal(t, -1, preferences[0].GroupPosition)
require.Equal(t, true, preferences[0].Visible)
require.Equal(t, "", preferences[0].CommunityID)
require.Equal(t, "ABC1", preferences[1].Key)
require.Equal(t, 0, preferences[1].Position)
require.Equal(t, -1, preferences[1].GroupPosition)
require.Equal(t, true, preferences[1].Visible)
require.Equal(t, "", preferences[1].CommunityID)
preferences, err = walletSettings.GetTokenPreferences(false)
require.NoError(t, err)
require.Equal(t, 2, len(preferences))
require.Equal(t, "ABC0", preferences[0].Key)
require.Equal(t, 0, preferences[0].Position)
require.Equal(t, -1, preferences[0].GroupPosition)
require.Equal(t, true, preferences[0].Visible)
require.Equal(t, "", preferences[0].CommunityID)
require.Equal(t, "ABC1", preferences[1].Key)
require.Equal(t, 1, preferences[1].Position)
require.Equal(t, -1, preferences[1].GroupPosition)
require.Equal(t, true, preferences[1].Visible)
require.Equal(t, "", preferences[1].CommunityID)
}
func TestUpdateTokenPreferencesRollback(t *testing.T) {
db, stop := setupTestDB(t)
defer stop()
err := db.UpdateTokenPreferences([]TokenPreferences{
{"SNT", 0, -1, false, ""},
}, false, true, 0)
require.NoError(t, err)
// Duplicate is not allowed
err = db.UpdateTokenPreferences([]TokenPreferences{
{"ABC", 0, -1, false, ""},
{"ABC", 0, -1, true, ""},
}, false, true, 0)
require.Error(t, err)
// Rolled back to previous state
preferences, err := db.GetTokenPreferences(true)
require.NoError(t, err)
require.Equal(t, 1, len(preferences))
require.Equal(t, "SNT", preferences[0].Key)
require.Equal(t, 0, preferences[0].Position)
require.Equal(t, -1, preferences[0].GroupPosition)
require.Equal(t, false, preferences[0].Visible)
require.Equal(t, "", preferences[0].CommunityID)
}
func TestTokenPrefrencesGroupByCommunity(t *testing.T) {
walletSettings, stop := setupTestDB(t)
defer stop()
communityID01 := "0x000001"
communityID02 := "0x000002"
err := walletSettings.UpdateTokenPreferences([]TokenPreferences{
{"SNT", 0, -1, true, ""},
{"ETH", 1, -1, true, ""},
{"T01", 0, -1, true, communityID01},
{"T02", 1, -1, true, communityID01},
}, false, true, 0)
require.NoError(t, err)
preferences, err := walletSettings.GetTokenPreferences(true)
require.NoError(t, err)
require.Equal(t, 4, len(preferences))
require.Equal(t, "SNT", preferences[0].Key)
require.Equal(t, 0, preferences[0].Position)
require.Equal(t, -1, preferences[0].GroupPosition)
require.Equal(t, true, preferences[0].Visible)
require.Equal(t, "", preferences[0].CommunityID)
require.Equal(t, "ETH", preferences[1].Key)
require.Equal(t, 1, preferences[1].Position)
require.Equal(t, -1, preferences[1].GroupPosition)
require.Equal(t, true, preferences[1].Visible)
require.Equal(t, "", preferences[1].CommunityID)
require.Equal(t, "T01", preferences[2].Key)
require.Equal(t, 0, preferences[2].Position)
require.Equal(t, -1, preferences[2].GroupPosition)
require.Equal(t, true, preferences[2].Visible)
require.Equal(t, communityID01, preferences[2].CommunityID)
require.Equal(t, "T02", preferences[3].Key)
require.Equal(t, 1, preferences[3].Position)
require.Equal(t, -1, preferences[3].GroupPosition)
require.Equal(t, true, preferences[3].Visible)
require.Equal(t, communityID01, preferences[3].CommunityID)
err = walletSettings.UpdateTokenPreferences([]TokenPreferences{
{"SNT", 0, -1, true, ""},
{"ETH", 1, -1, true, ""},
{"T01", 0, 1, true, communityID01},
{"T02", 1, 0, true, communityID01},
{"T03", 0, 0, true, communityID02},
}, false, true, 0)
require.NoError(t, err)
preferences, err = walletSettings.GetTokenPreferences(true)
require.NoError(t, err)
require.Equal(t, 5, len(preferences))
require.Equal(t, "SNT", preferences[0].Key)
require.Equal(t, 0, preferences[0].Position)
require.Equal(t, -1, preferences[0].GroupPosition)
require.Equal(t, true, preferences[0].Visible)
require.Equal(t, "", preferences[0].CommunityID)
require.Equal(t, "ETH", preferences[1].Key)
require.Equal(t, 1, preferences[1].Position)
require.Equal(t, -1, preferences[1].GroupPosition)
require.Equal(t, true, preferences[1].Visible)
require.Equal(t, "", preferences[1].CommunityID)
require.Equal(t, "T01", preferences[2].Key)
require.Equal(t, 0, preferences[2].Position)
require.Equal(t, 1, preferences[2].GroupPosition)
require.Equal(t, true, preferences[2].Visible)
require.Equal(t, communityID01, preferences[2].CommunityID)
require.Equal(t, "T02", preferences[3].Key)
require.Equal(t, 1, preferences[3].Position)
require.Equal(t, 0, preferences[3].GroupPosition)
require.Equal(t, true, preferences[3].Visible)
require.Equal(t, communityID01, preferences[3].CommunityID)
require.Equal(t, "T03", preferences[4].Key)
require.Equal(t, 0, preferences[4].Position)
require.Equal(t, 0, preferences[4].GroupPosition)
require.Equal(t, true, preferences[4].Visible)
require.Equal(t, communityID02, preferences[4].CommunityID)
// Insert not full group positioning (one group has -1 group position)
err = walletSettings.UpdateTokenPreferences([]TokenPreferences{
{"SNT", 0, -1, true, ""},
{"ETH", 1, -1, true, ""},
{"T01", 0, 1, true, communityID01},
{"T02", 1, 0, true, communityID01},
{"T03", 0, -1, true, communityID02},
}, true, true, 0)
require.Error(t, err)
// Group by community is disabled so there's no check for proper grouping
err = walletSettings.UpdateTokenPreferences([]TokenPreferences{
{"SNT", 0, -1, true, ""},
{"ETH", 1, -1, true, ""},
{"T01", 0, 1, true, communityID01},
{"T02", 1, 0, true, communityID01},
{"T03", 0, -1, true, communityID02},
}, false, true, 0)
require.NoError(t, err)
// Insert not full group positioning with invsibile item set
err = walletSettings.UpdateTokenPreferences([]TokenPreferences{
{"SNT", 0, -1, true, ""},
{"ETH", 1, -1, true, ""},
{"T01", 0, 1, true, communityID01},
{"T02", 1, 0, true, communityID01},
{"T03", 0, -1, false, communityID02},
}, true, true, 0)
require.NoError(t, err)
}
func TestUpdateTokenPreferencesSettings(t *testing.T) {
walletSettings, stop := setupTestDB(t)
defer stop()
preferences := []TokenPreferences{
{"SNT", 0, -1, true, ""},
{"ETH", 1, -1, true, ""},
{"T01", 0, 1, true, "0x000001"},
{"T02", 1, 0, true, "0x000001"},
}
err := walletSettings.UpdateTokenPreferences(preferences, true, true, 123)
require.NoError(t, err)
// Verify that the preferences are updated correctly
prefs, err := walletSettings.GetTokenPreferences(true)
require.NoError(t, err)
require.Equal(t, len(preferences), len(prefs))
for i := range preferences {
require.Equal(t, preferences[i], prefs[i])
}
// Verify that the clock is updated
clock, err := walletSettings.GetClockOfLastTokenPreferencesChange()
require.NoError(t, err)
require.True(t, clock > 0)
}

View File

@ -23,6 +23,7 @@ import (
"github.com/status-im/status-go/multiaccounts/accounts"
multiaccountscommon "github.com/status-im/status-go/multiaccounts/common"
"github.com/status-im/status-go/multiaccounts/settings"
walletsettings "github.com/status-im/status-go/multiaccounts/settings_wallet"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/common/shard"
"github.com/status-im/status-go/protocol/communities"
@ -52,6 +53,7 @@ var (
ErrSomeFieldsMissingForWalletAccount = errors.New("some fields are missing for wallet account")
ErrUnknownKeypairForWalletAccount = errors.New("keypair is not known for the wallet account")
ErrInvalidCommunityID = errors.New("invalid community id")
ErrTryingToApplyOldTokenPreferences = errors.New("trying to apply old token preferences")
)
// HandleMembershipUpdate updates a Chat instance according to the membership updates.
@ -3226,6 +3228,46 @@ func (m *Messenger) handleSyncWatchOnlyAccount(message *protobuf.SyncAccount, fr
return acc, nil
}
func (m *Messenger) handleSyncTokenPreferences(message *protobuf.SyncTokenPreferences) ([]walletsettings.TokenPreferences, error) {
if len(message.Preferences) == 0 {
return nil, nil
}
dbLastUpdate, err := m.settings.GetClockOfLastTokenPreferencesChange()
if err != nil {
return nil, err
}
groupByCommunity, err := m.settings.GetTokenGroupByCommunity()
if err != nil {
return nil, err
}
// Since adding new token preferences updates `ClockOfLastTokenPreferencesChange` we should handle token preferences changes
// even they are with the same clock, that ensures the correct order in case of syncing devices.
if message.Clock < dbLastUpdate {
return nil, ErrTryingToApplyOldTokenPreferences
}
var tokenPreferences []walletsettings.TokenPreferences
for _, pref := range message.Preferences {
tokenPref := walletsettings.TokenPreferences{
Key: pref.Key,
Position: int(pref.Position),
GroupPosition: int(pref.GroupPosition),
Visible: pref.Visible,
CommunityID: pref.CommunityId,
}
tokenPreferences = append(tokenPreferences, tokenPref)
}
err = m.settings.UpdateTokenPreferences(tokenPreferences, groupByCommunity, message.Testnet, message.Clock)
if err != nil {
return nil, err
}
return tokenPreferences, nil
}
func (m *Messenger) handleSyncAccountsPositions(message *protobuf.SyncAccountsPositions) ([]*accounts.Account, error) {
if len(message.Accounts) == 0 {
return nil, nil
@ -3459,6 +3501,21 @@ func (m *Messenger) HandleSyncAccountsPositions(state *ReceivedMessageState, mes
return nil
}
func (m *Messenger) HandleSyncTokenPreferences(state *ReceivedMessageState, message *protobuf.SyncTokenPreferences, statusMessage *v1protocol.StatusMessage) error {
tokenPreferences, err := m.handleSyncTokenPreferences(message)
if err != nil {
if err == ErrTryingToApplyOldTokenPreferences {
m.logger.Warn("syncing token preferences issue", zap.Error(err))
return nil
}
return err
}
state.Response.TokenPreferences = append(state.Response.TokenPreferences, tokenPreferences...)
return nil
}
func (m *Messenger) HandleSyncAccount(state *ReceivedMessageState, message *protobuf.SyncAccount, statusMessage *v1protocol.StatusMessage) error {
acc, err := m.handleSyncWatchOnlyAccount(message, false)
if err != nil {

View File

@ -232,6 +232,9 @@ func (m *Messenger) dispatchToHandler(messageState *ReceivedMessageState, protoB
case protobuf.ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_COMMUNITY_REQUEST_DECISION:
return m.handleSyncActivityCenterCommunityRequestDecisionProtobuf(messageState, protoBytes, msg, filter)
case protobuf.ApplicationMetadataMessage_SYNC_TOKEN_PREFERENCES:
return m.handleSyncTokenPreferencesProtobuf(messageState, protoBytes, msg, filter)
default:
m.logger.Info("protobuf type not found", zap.String("type", string(msg.ApplicationLayer.Type)))
return errors.New("protobuf type not found")
@ -1655,3 +1658,26 @@ func (m *Messenger) handleSyncActivityCenterCommunityRequestDecisionProtobuf(mes
}
func (m *Messenger) handleSyncTokenPreferencesProtobuf(messageState *ReceivedMessageState, protoBytes []byte, msg *v1protocol.StatusMessage, filter transport.Filter) error {
m.logger.Info("handling SyncTokenPreferences")
if !common.IsPubKeyEqual(messageState.CurrentMessageState.PublicKey, &m.identity.PublicKey) {
m.logger.Warn("not coming from us, ignoring")
return nil
}
p := &protobuf.SyncTokenPreferences{}
err := proto.Unmarshal(protoBytes, p)
if err != nil {
return err
}
m.outputToCSV(msg.TransportLayer.Message.Timestamp, msg.ApplicationLayer.ID, messageState.CurrentMessageState.Contact.ID, filter.ContentTopic, filter.ChatID, msg.ApplicationLayer.Type, p)
return m.HandleSyncTokenPreferences(messageState, p, msg)
}

View File

@ -12,6 +12,7 @@ import (
"github.com/status-im/status-go/images"
"github.com/status-im/status-go/multiaccounts/accounts"
"github.com/status-im/status-go/multiaccounts/settings"
walletsettings "github.com/status-im/status-go/multiaccounts/settings_wallet"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/communities"
"github.com/status-im/status-go/protocol/discord"
@ -49,6 +50,7 @@ type MessengerResponse struct {
WatchOnlyAccounts []*accounts.Account
Keypairs []*accounts.Keypair
AccountsPositions []*accounts.Account
TokenPreferences []walletsettings.TokenPreferences
DiscordCategories []*discord.Category
DiscordChannels []*discord.Channel
DiscordOldestMessageTimestamp int
@ -114,6 +116,7 @@ func (r *MessengerResponse) MarshalJSON() ([]byte, error) {
WatchOnlyAccounts []*accounts.Account `json:"watchOnlyAccounts,omitempty"`
Keypairs []*accounts.Keypair `json:"keypairs,omitempty"`
AccountsPositions []*accounts.Account `json:"accountsPositions,omitempty"`
TokenPreferences []walletsettings.TokenPreferences `json:"tokenPreferences,omitempty"`
DiscordCategories []*discord.Category `json:"discordCategories,omitempty"`
DiscordChannels []*discord.Channel `json:"discordChannels,omitempty"`
DiscordOldestMessageTimestamp int `json:"discordOldestMessageTimestamp"`
@ -138,6 +141,7 @@ func (r *MessengerResponse) MarshalJSON() ([]byte, error) {
WatchOnlyAccounts: r.WatchOnlyAccounts,
Keypairs: r.Keypairs,
AccountsPositions: r.AccountsPositions,
TokenPreferences: r.TokenPreferences,
Messages: r.Messages(),
VerificationRequests: r.VerificationRequests(),
@ -279,6 +283,7 @@ func (r *MessengerResponse) IsEmpty() bool {
len(r.WatchOnlyAccounts)+
len(r.Keypairs)+
len(r.AccountsPositions)+
len(r.TokenPreferences)+
len(r.notifications)+
len(r.statusUpdates)+
len(r.activityCenterNotifications)+
@ -328,7 +333,8 @@ func (r *MessengerResponse) Merge(response *MessengerResponse) error {
r.CustomizationColor = response.CustomizationColor
r.WatchOnlyAccounts = append(r.WatchOnlyAccounts, response.WatchOnlyAccounts...)
r.Keypairs = append(r.Keypairs, response.Keypairs...)
r.WatchOnlyAccounts = append(r.AccountsPositions, response.AccountsPositions...)
r.AccountsPositions = append(r.AccountsPositions, response.AccountsPositions...)
r.TokenPreferences = append(r.TokenPreferences, response.TokenPreferences...)
r.SocialLinksInfo = response.SocialLinksInfo
return nil

View File

@ -220,6 +220,17 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
m.logger.Error("failed to HandleSyncAccountsPositions when HandleSyncRawMessages", zap.Error(err))
continue
}
case protobuf.ApplicationMetadataMessage_SYNC_TOKEN_PREFERENCES:
var message protobuf.SyncTokenPreferences
err := proto.Unmarshal(rawMessage.GetPayload(), &message)
if err != nil {
return err
}
err = m.HandleSyncTokenPreferences(state, &message, nil)
if err != nil {
m.logger.Error("failed to HandleSyncTokenPreferences when HandleSyncRawMessages", zap.Error(err))
continue
}
case protobuf.ApplicationMetadataMessage_SYNC_SAVED_ADDRESS:
var message protobuf.SyncSavedAddress
err := proto.Unmarshal(rawMessage.GetPayload(), &message)

View File

@ -12,6 +12,7 @@ import (
"github.com/status-im/status-go/account"
"github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/multiaccounts/accounts"
walletsettings "github.com/status-im/status-go/multiaccounts/settings_wallet"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/encryption/multidevice"
"github.com/status-im/status-go/protocol/protobuf"
@ -417,6 +418,99 @@ func (m *Messenger) prepareSyncKeypairMessage(kp *accounts.Keypair) (*protobuf.S
return message, nil
}
func (m *Messenger) UpdateTokenPreferences(preferences []walletsettings.TokenPreferences) error {
clock, _ := m.getLastClockWithRelatedChat()
testNetworksEnabled, err := m.settings.GetTestNetworksEnabled()
if err != nil {
return err
}
groupByCommunity, err := m.settings.GetTokenGroupByCommunity()
if err != nil {
return err
}
err = m.settings.UpdateTokenPreferences(preferences, groupByCommunity, testNetworksEnabled, clock)
if err != nil {
return err
}
return m.syncTokenPreferences(m.dispatchMessage)
}
func (m *Messenger) GetTokenPreferences() ([]walletsettings.TokenPreferences, error) {
testNetworksEnabled, err := m.settings.GetTestNetworksEnabled()
if err != nil {
return nil, err
}
list, err := m.settings.GetTokenPreferences(testNetworksEnabled)
if err != nil {
return nil, err
}
return list, nil
}
func (m *Messenger) prepareTokenPreferencesMessage(pref walletsettings.TokenPreferences) *protobuf.TokenPreferences {
return &protobuf.TokenPreferences{
Key: pref.Key,
Position: int64(pref.Position),
GroupPosition: int64(pref.GroupPosition),
Visible: pref.Visible,
CommunityId: pref.CommunityID,
}
}
func (m *Messenger) syncTokenPreferences(rawMessageHandler RawMessageHandler) error {
if !m.hasPairedDevices() {
return nil
}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
_, chat := m.getLastClockWithRelatedChat()
lastUpdate, err := m.settings.GetClockOfLastTokenPreferencesChange()
if err != nil {
return err
}
testNetworksEnabled, err := m.settings.GetTestNetworksEnabled()
if err != nil {
return err
}
preferences, err := m.GetTokenPreferences()
if err != nil {
return err
}
message := &protobuf.SyncTokenPreferences{
Clock: lastUpdate,
Testnet: testNetworksEnabled,
}
for _, pref := range preferences {
message.Preferences = append(message.Preferences, m.prepareTokenPreferencesMessage(pref))
}
encodedMessage, err := proto.Marshal(message)
if err != nil {
return err
}
rawMessage := common.RawMessage{
LocalChatID: chat.ID,
Payload: encodedMessage,
MessageType: protobuf.ApplicationMetadataMessage_SYNC_TOKEN_PREFERENCES,
ResendAutomatically: true,
}
_, err = rawMessageHandler(ctx, rawMessage)
return err
}
func (m *Messenger) syncAccountsPositions(rawMessageHandler RawMessageHandler) error {
if !m.hasPairedDevices() {
return nil

View File

@ -1,56 +1,54 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.24.4
// source: application_metadata_message.proto
package protobuf
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type ApplicationMetadataMessage_Type int32
const (
ApplicationMetadataMessage_UNKNOWN ApplicationMetadataMessage_Type = 0
ApplicationMetadataMessage_CHAT_MESSAGE ApplicationMetadataMessage_Type = 1
ApplicationMetadataMessage_CONTACT_UPDATE ApplicationMetadataMessage_Type = 2
ApplicationMetadataMessage_MEMBERSHIP_UPDATE_MESSAGE ApplicationMetadataMessage_Type = 3
ApplicationMetadataMessage_SYNC_PAIR_INSTALLATION ApplicationMetadataMessage_Type = 4
// Deprecated: Marked as deprecated in application_metadata_message.proto.
ApplicationMetadataMessage_DEPRECATED_SYNC_INSTALLATION ApplicationMetadataMessage_Type = 5
ApplicationMetadataMessage_REQUEST_ADDRESS_FOR_TRANSACTION ApplicationMetadataMessage_Type = 6
ApplicationMetadataMessage_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION ApplicationMetadataMessage_Type = 7
ApplicationMetadataMessage_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION ApplicationMetadataMessage_Type = 8
ApplicationMetadataMessage_REQUEST_TRANSACTION ApplicationMetadataMessage_Type = 9
ApplicationMetadataMessage_SEND_TRANSACTION ApplicationMetadataMessage_Type = 10
ApplicationMetadataMessage_DECLINE_REQUEST_TRANSACTION ApplicationMetadataMessage_Type = 11
ApplicationMetadataMessage_SYNC_INSTALLATION_CONTACT_V2 ApplicationMetadataMessage_Type = 12
ApplicationMetadataMessage_SYNC_INSTALLATION_ACCOUNT ApplicationMetadataMessage_Type = 13
ApplicationMetadataMessage_CONTACT_CODE_ADVERTISEMENT ApplicationMetadataMessage_Type = 15
ApplicationMetadataMessage_PUSH_NOTIFICATION_REGISTRATION ApplicationMetadataMessage_Type = 16
ApplicationMetadataMessage_PUSH_NOTIFICATION_REGISTRATION_RESPONSE ApplicationMetadataMessage_Type = 17
ApplicationMetadataMessage_PUSH_NOTIFICATION_QUERY ApplicationMetadataMessage_Type = 18
ApplicationMetadataMessage_PUSH_NOTIFICATION_QUERY_RESPONSE ApplicationMetadataMessage_Type = 19
ApplicationMetadataMessage_PUSH_NOTIFICATION_REQUEST ApplicationMetadataMessage_Type = 20
ApplicationMetadataMessage_PUSH_NOTIFICATION_RESPONSE ApplicationMetadataMessage_Type = 21
ApplicationMetadataMessage_EMOJI_REACTION ApplicationMetadataMessage_Type = 22
ApplicationMetadataMessage_GROUP_CHAT_INVITATION ApplicationMetadataMessage_Type = 23
ApplicationMetadataMessage_CHAT_IDENTITY ApplicationMetadataMessage_Type = 24
ApplicationMetadataMessage_COMMUNITY_DESCRIPTION ApplicationMetadataMessage_Type = 25
// Deprecated: Marked as deprecated in application_metadata_message.proto.
ApplicationMetadataMessage_COMMUNITY_INVITATION ApplicationMetadataMessage_Type = 26
ApplicationMetadataMessage_UNKNOWN ApplicationMetadataMessage_Type = 0
ApplicationMetadataMessage_CHAT_MESSAGE ApplicationMetadataMessage_Type = 1
ApplicationMetadataMessage_CONTACT_UPDATE ApplicationMetadataMessage_Type = 2
ApplicationMetadataMessage_MEMBERSHIP_UPDATE_MESSAGE ApplicationMetadataMessage_Type = 3
ApplicationMetadataMessage_SYNC_PAIR_INSTALLATION ApplicationMetadataMessage_Type = 4
ApplicationMetadataMessage_DEPRECATED_SYNC_INSTALLATION ApplicationMetadataMessage_Type = 5 // Deprecated: Do not use.
ApplicationMetadataMessage_REQUEST_ADDRESS_FOR_TRANSACTION ApplicationMetadataMessage_Type = 6
ApplicationMetadataMessage_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION ApplicationMetadataMessage_Type = 7
ApplicationMetadataMessage_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION ApplicationMetadataMessage_Type = 8
ApplicationMetadataMessage_REQUEST_TRANSACTION ApplicationMetadataMessage_Type = 9
ApplicationMetadataMessage_SEND_TRANSACTION ApplicationMetadataMessage_Type = 10
ApplicationMetadataMessage_DECLINE_REQUEST_TRANSACTION ApplicationMetadataMessage_Type = 11
ApplicationMetadataMessage_SYNC_INSTALLATION_CONTACT_V2 ApplicationMetadataMessage_Type = 12
ApplicationMetadataMessage_SYNC_INSTALLATION_ACCOUNT ApplicationMetadataMessage_Type = 13
ApplicationMetadataMessage_CONTACT_CODE_ADVERTISEMENT ApplicationMetadataMessage_Type = 15
ApplicationMetadataMessage_PUSH_NOTIFICATION_REGISTRATION ApplicationMetadataMessage_Type = 16
ApplicationMetadataMessage_PUSH_NOTIFICATION_REGISTRATION_RESPONSE ApplicationMetadataMessage_Type = 17
ApplicationMetadataMessage_PUSH_NOTIFICATION_QUERY ApplicationMetadataMessage_Type = 18
ApplicationMetadataMessage_PUSH_NOTIFICATION_QUERY_RESPONSE ApplicationMetadataMessage_Type = 19
ApplicationMetadataMessage_PUSH_NOTIFICATION_REQUEST ApplicationMetadataMessage_Type = 20
ApplicationMetadataMessage_PUSH_NOTIFICATION_RESPONSE ApplicationMetadataMessage_Type = 21
ApplicationMetadataMessage_EMOJI_REACTION ApplicationMetadataMessage_Type = 22
ApplicationMetadataMessage_GROUP_CHAT_INVITATION ApplicationMetadataMessage_Type = 23
ApplicationMetadataMessage_CHAT_IDENTITY ApplicationMetadataMessage_Type = 24
ApplicationMetadataMessage_COMMUNITY_DESCRIPTION ApplicationMetadataMessage_Type = 25
ApplicationMetadataMessage_COMMUNITY_INVITATION ApplicationMetadataMessage_Type = 26 // Deprecated: Do not use.
ApplicationMetadataMessage_COMMUNITY_REQUEST_TO_JOIN ApplicationMetadataMessage_Type = 27
ApplicationMetadataMessage_PIN_MESSAGE ApplicationMetadataMessage_Type = 28
ApplicationMetadataMessage_EDIT_MESSAGE ApplicationMetadataMessage_Type = 29
@ -99,484 +97,312 @@ const (
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_DELETED ApplicationMetadataMessage_Type = 75
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_UNREAD ApplicationMetadataMessage_Type = 76
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_COMMUNITY_REQUEST_DECISION ApplicationMetadataMessage_Type = 77
ApplicationMetadataMessage_SYNC_TOKEN_PREFERENCES ApplicationMetadataMessage_Type = 78
)
// Enum value maps for ApplicationMetadataMessage_Type.
var (
ApplicationMetadataMessage_Type_name = map[int32]string{
0: "UNKNOWN",
1: "CHAT_MESSAGE",
2: "CONTACT_UPDATE",
3: "MEMBERSHIP_UPDATE_MESSAGE",
4: "SYNC_PAIR_INSTALLATION",
5: "DEPRECATED_SYNC_INSTALLATION",
6: "REQUEST_ADDRESS_FOR_TRANSACTION",
7: "ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION",
8: "DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION",
9: "REQUEST_TRANSACTION",
10: "SEND_TRANSACTION",
11: "DECLINE_REQUEST_TRANSACTION",
12: "SYNC_INSTALLATION_CONTACT_V2",
13: "SYNC_INSTALLATION_ACCOUNT",
15: "CONTACT_CODE_ADVERTISEMENT",
16: "PUSH_NOTIFICATION_REGISTRATION",
17: "PUSH_NOTIFICATION_REGISTRATION_RESPONSE",
18: "PUSH_NOTIFICATION_QUERY",
19: "PUSH_NOTIFICATION_QUERY_RESPONSE",
20: "PUSH_NOTIFICATION_REQUEST",
21: "PUSH_NOTIFICATION_RESPONSE",
22: "EMOJI_REACTION",
23: "GROUP_CHAT_INVITATION",
24: "CHAT_IDENTITY",
25: "COMMUNITY_DESCRIPTION",
26: "COMMUNITY_INVITATION",
27: "COMMUNITY_REQUEST_TO_JOIN",
28: "PIN_MESSAGE",
29: "EDIT_MESSAGE",
30: "STATUS_UPDATE",
31: "DELETE_MESSAGE",
32: "SYNC_INSTALLATION_COMMUNITY",
33: "ANONYMOUS_METRIC_BATCH",
34: "SYNC_CHAT_REMOVED",
35: "SYNC_CHAT_MESSAGES_READ",
36: "BACKUP",
37: "SYNC_ACTIVITY_CENTER_READ",
38: "SYNC_ACTIVITY_CENTER_ACCEPTED",
39: "SYNC_ACTIVITY_CENTER_DISMISSED",
40: "SYNC_BOOKMARK",
41: "SYNC_CLEAR_HISTORY",
42: "SYNC_SETTING",
43: "COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK",
44: "SYNC_PROFILE_PICTURES",
45: "SYNC_ACCOUNT",
46: "ACCEPT_CONTACT_REQUEST",
47: "RETRACT_CONTACT_REQUEST",
48: "COMMUNITY_REQUEST_TO_JOIN_RESPONSE",
49: "SYNC_COMMUNITY_SETTINGS",
50: "REQUEST_CONTACT_VERIFICATION",
51: "ACCEPT_CONTACT_VERIFICATION",
52: "DECLINE_CONTACT_VERIFICATION",
53: "SYNC_TRUSTED_USER",
54: "SYNC_VERIFICATION_REQUEST",
56: "SYNC_CONTACT_REQUEST_DECISION",
57: "COMMUNITY_REQUEST_TO_LEAVE",
58: "SYNC_DELETE_FOR_ME_MESSAGE",
59: "SYNC_SAVED_ADDRESS",
60: "COMMUNITY_CANCEL_REQUEST_TO_JOIN",
61: "CANCEL_CONTACT_VERIFICATION",
62: "SYNC_KEYPAIR",
63: "SYNC_SOCIAL_LINKS",
64: "SYNC_ENS_USERNAME_DETAIL",
67: "COMMUNITY_EVENTS_MESSAGE",
68: "COMMUNITY_EDIT_SHARED_ADDRESSES",
69: "SYNC_ACCOUNT_CUSTOMIZATION_COLOR",
70: "SYNC_ACCOUNTS_POSITIONS",
71: "COMMUNITY_EVENTS_MESSAGE_REJECTED",
72: "COMMUNITY_PRIVILEGED_USER_SYNC_MESSAGE",
73: "COMMUNITY_SHARD_KEY",
74: "SYNC_CHAT",
75: "SYNC_ACTIVITY_CENTER_DELETED",
76: "SYNC_ACTIVITY_CENTER_UNREAD",
77: "SYNC_ACTIVITY_CENTER_COMMUNITY_REQUEST_DECISION",
}
ApplicationMetadataMessage_Type_value = map[string]int32{
"UNKNOWN": 0,
"CHAT_MESSAGE": 1,
"CONTACT_UPDATE": 2,
"MEMBERSHIP_UPDATE_MESSAGE": 3,
"SYNC_PAIR_INSTALLATION": 4,
"DEPRECATED_SYNC_INSTALLATION": 5,
"REQUEST_ADDRESS_FOR_TRANSACTION": 6,
"ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION": 7,
"DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION": 8,
"REQUEST_TRANSACTION": 9,
"SEND_TRANSACTION": 10,
"DECLINE_REQUEST_TRANSACTION": 11,
"SYNC_INSTALLATION_CONTACT_V2": 12,
"SYNC_INSTALLATION_ACCOUNT": 13,
"CONTACT_CODE_ADVERTISEMENT": 15,
"PUSH_NOTIFICATION_REGISTRATION": 16,
"PUSH_NOTIFICATION_REGISTRATION_RESPONSE": 17,
"PUSH_NOTIFICATION_QUERY": 18,
"PUSH_NOTIFICATION_QUERY_RESPONSE": 19,
"PUSH_NOTIFICATION_REQUEST": 20,
"PUSH_NOTIFICATION_RESPONSE": 21,
"EMOJI_REACTION": 22,
"GROUP_CHAT_INVITATION": 23,
"CHAT_IDENTITY": 24,
"COMMUNITY_DESCRIPTION": 25,
"COMMUNITY_INVITATION": 26,
"COMMUNITY_REQUEST_TO_JOIN": 27,
"PIN_MESSAGE": 28,
"EDIT_MESSAGE": 29,
"STATUS_UPDATE": 30,
"DELETE_MESSAGE": 31,
"SYNC_INSTALLATION_COMMUNITY": 32,
"ANONYMOUS_METRIC_BATCH": 33,
"SYNC_CHAT_REMOVED": 34,
"SYNC_CHAT_MESSAGES_READ": 35,
"BACKUP": 36,
"SYNC_ACTIVITY_CENTER_READ": 37,
"SYNC_ACTIVITY_CENTER_ACCEPTED": 38,
"SYNC_ACTIVITY_CENTER_DISMISSED": 39,
"SYNC_BOOKMARK": 40,
"SYNC_CLEAR_HISTORY": 41,
"SYNC_SETTING": 42,
"COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK": 43,
"SYNC_PROFILE_PICTURES": 44,
"SYNC_ACCOUNT": 45,
"ACCEPT_CONTACT_REQUEST": 46,
"RETRACT_CONTACT_REQUEST": 47,
"COMMUNITY_REQUEST_TO_JOIN_RESPONSE": 48,
"SYNC_COMMUNITY_SETTINGS": 49,
"REQUEST_CONTACT_VERIFICATION": 50,
"ACCEPT_CONTACT_VERIFICATION": 51,
"DECLINE_CONTACT_VERIFICATION": 52,
"SYNC_TRUSTED_USER": 53,
"SYNC_VERIFICATION_REQUEST": 54,
"SYNC_CONTACT_REQUEST_DECISION": 56,
"COMMUNITY_REQUEST_TO_LEAVE": 57,
"SYNC_DELETE_FOR_ME_MESSAGE": 58,
"SYNC_SAVED_ADDRESS": 59,
"COMMUNITY_CANCEL_REQUEST_TO_JOIN": 60,
"CANCEL_CONTACT_VERIFICATION": 61,
"SYNC_KEYPAIR": 62,
"SYNC_SOCIAL_LINKS": 63,
"SYNC_ENS_USERNAME_DETAIL": 64,
"COMMUNITY_EVENTS_MESSAGE": 67,
"COMMUNITY_EDIT_SHARED_ADDRESSES": 68,
"SYNC_ACCOUNT_CUSTOMIZATION_COLOR": 69,
"SYNC_ACCOUNTS_POSITIONS": 70,
"COMMUNITY_EVENTS_MESSAGE_REJECTED": 71,
"COMMUNITY_PRIVILEGED_USER_SYNC_MESSAGE": 72,
"COMMUNITY_SHARD_KEY": 73,
"SYNC_CHAT": 74,
"SYNC_ACTIVITY_CENTER_DELETED": 75,
"SYNC_ACTIVITY_CENTER_UNREAD": 76,
"SYNC_ACTIVITY_CENTER_COMMUNITY_REQUEST_DECISION": 77,
}
)
var ApplicationMetadataMessage_Type_name = map[int32]string{
0: "UNKNOWN",
1: "CHAT_MESSAGE",
2: "CONTACT_UPDATE",
3: "MEMBERSHIP_UPDATE_MESSAGE",
4: "SYNC_PAIR_INSTALLATION",
5: "DEPRECATED_SYNC_INSTALLATION",
6: "REQUEST_ADDRESS_FOR_TRANSACTION",
7: "ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION",
8: "DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION",
9: "REQUEST_TRANSACTION",
10: "SEND_TRANSACTION",
11: "DECLINE_REQUEST_TRANSACTION",
12: "SYNC_INSTALLATION_CONTACT_V2",
13: "SYNC_INSTALLATION_ACCOUNT",
15: "CONTACT_CODE_ADVERTISEMENT",
16: "PUSH_NOTIFICATION_REGISTRATION",
17: "PUSH_NOTIFICATION_REGISTRATION_RESPONSE",
18: "PUSH_NOTIFICATION_QUERY",
19: "PUSH_NOTIFICATION_QUERY_RESPONSE",
20: "PUSH_NOTIFICATION_REQUEST",
21: "PUSH_NOTIFICATION_RESPONSE",
22: "EMOJI_REACTION",
23: "GROUP_CHAT_INVITATION",
24: "CHAT_IDENTITY",
25: "COMMUNITY_DESCRIPTION",
26: "COMMUNITY_INVITATION",
27: "COMMUNITY_REQUEST_TO_JOIN",
28: "PIN_MESSAGE",
29: "EDIT_MESSAGE",
30: "STATUS_UPDATE",
31: "DELETE_MESSAGE",
32: "SYNC_INSTALLATION_COMMUNITY",
33: "ANONYMOUS_METRIC_BATCH",
34: "SYNC_CHAT_REMOVED",
35: "SYNC_CHAT_MESSAGES_READ",
36: "BACKUP",
37: "SYNC_ACTIVITY_CENTER_READ",
38: "SYNC_ACTIVITY_CENTER_ACCEPTED",
39: "SYNC_ACTIVITY_CENTER_DISMISSED",
40: "SYNC_BOOKMARK",
41: "SYNC_CLEAR_HISTORY",
42: "SYNC_SETTING",
43: "COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK",
44: "SYNC_PROFILE_PICTURES",
45: "SYNC_ACCOUNT",
46: "ACCEPT_CONTACT_REQUEST",
47: "RETRACT_CONTACT_REQUEST",
48: "COMMUNITY_REQUEST_TO_JOIN_RESPONSE",
49: "SYNC_COMMUNITY_SETTINGS",
50: "REQUEST_CONTACT_VERIFICATION",
51: "ACCEPT_CONTACT_VERIFICATION",
52: "DECLINE_CONTACT_VERIFICATION",
53: "SYNC_TRUSTED_USER",
54: "SYNC_VERIFICATION_REQUEST",
56: "SYNC_CONTACT_REQUEST_DECISION",
57: "COMMUNITY_REQUEST_TO_LEAVE",
58: "SYNC_DELETE_FOR_ME_MESSAGE",
59: "SYNC_SAVED_ADDRESS",
60: "COMMUNITY_CANCEL_REQUEST_TO_JOIN",
61: "CANCEL_CONTACT_VERIFICATION",
62: "SYNC_KEYPAIR",
63: "SYNC_SOCIAL_LINKS",
64: "SYNC_ENS_USERNAME_DETAIL",
67: "COMMUNITY_EVENTS_MESSAGE",
68: "COMMUNITY_EDIT_SHARED_ADDRESSES",
69: "SYNC_ACCOUNT_CUSTOMIZATION_COLOR",
70: "SYNC_ACCOUNTS_POSITIONS",
71: "COMMUNITY_EVENTS_MESSAGE_REJECTED",
72: "COMMUNITY_PRIVILEGED_USER_SYNC_MESSAGE",
73: "COMMUNITY_SHARD_KEY",
74: "SYNC_CHAT",
75: "SYNC_ACTIVITY_CENTER_DELETED",
76: "SYNC_ACTIVITY_CENTER_UNREAD",
77: "SYNC_ACTIVITY_CENTER_COMMUNITY_REQUEST_DECISION",
78: "SYNC_TOKEN_PREFERENCES",
}
func (x ApplicationMetadataMessage_Type) Enum() *ApplicationMetadataMessage_Type {
p := new(ApplicationMetadataMessage_Type)
*p = x
return p
var ApplicationMetadataMessage_Type_value = map[string]int32{
"UNKNOWN": 0,
"CHAT_MESSAGE": 1,
"CONTACT_UPDATE": 2,
"MEMBERSHIP_UPDATE_MESSAGE": 3,
"SYNC_PAIR_INSTALLATION": 4,
"DEPRECATED_SYNC_INSTALLATION": 5,
"REQUEST_ADDRESS_FOR_TRANSACTION": 6,
"ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION": 7,
"DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION": 8,
"REQUEST_TRANSACTION": 9,
"SEND_TRANSACTION": 10,
"DECLINE_REQUEST_TRANSACTION": 11,
"SYNC_INSTALLATION_CONTACT_V2": 12,
"SYNC_INSTALLATION_ACCOUNT": 13,
"CONTACT_CODE_ADVERTISEMENT": 15,
"PUSH_NOTIFICATION_REGISTRATION": 16,
"PUSH_NOTIFICATION_REGISTRATION_RESPONSE": 17,
"PUSH_NOTIFICATION_QUERY": 18,
"PUSH_NOTIFICATION_QUERY_RESPONSE": 19,
"PUSH_NOTIFICATION_REQUEST": 20,
"PUSH_NOTIFICATION_RESPONSE": 21,
"EMOJI_REACTION": 22,
"GROUP_CHAT_INVITATION": 23,
"CHAT_IDENTITY": 24,
"COMMUNITY_DESCRIPTION": 25,
"COMMUNITY_INVITATION": 26,
"COMMUNITY_REQUEST_TO_JOIN": 27,
"PIN_MESSAGE": 28,
"EDIT_MESSAGE": 29,
"STATUS_UPDATE": 30,
"DELETE_MESSAGE": 31,
"SYNC_INSTALLATION_COMMUNITY": 32,
"ANONYMOUS_METRIC_BATCH": 33,
"SYNC_CHAT_REMOVED": 34,
"SYNC_CHAT_MESSAGES_READ": 35,
"BACKUP": 36,
"SYNC_ACTIVITY_CENTER_READ": 37,
"SYNC_ACTIVITY_CENTER_ACCEPTED": 38,
"SYNC_ACTIVITY_CENTER_DISMISSED": 39,
"SYNC_BOOKMARK": 40,
"SYNC_CLEAR_HISTORY": 41,
"SYNC_SETTING": 42,
"COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK": 43,
"SYNC_PROFILE_PICTURES": 44,
"SYNC_ACCOUNT": 45,
"ACCEPT_CONTACT_REQUEST": 46,
"RETRACT_CONTACT_REQUEST": 47,
"COMMUNITY_REQUEST_TO_JOIN_RESPONSE": 48,
"SYNC_COMMUNITY_SETTINGS": 49,
"REQUEST_CONTACT_VERIFICATION": 50,
"ACCEPT_CONTACT_VERIFICATION": 51,
"DECLINE_CONTACT_VERIFICATION": 52,
"SYNC_TRUSTED_USER": 53,
"SYNC_VERIFICATION_REQUEST": 54,
"SYNC_CONTACT_REQUEST_DECISION": 56,
"COMMUNITY_REQUEST_TO_LEAVE": 57,
"SYNC_DELETE_FOR_ME_MESSAGE": 58,
"SYNC_SAVED_ADDRESS": 59,
"COMMUNITY_CANCEL_REQUEST_TO_JOIN": 60,
"CANCEL_CONTACT_VERIFICATION": 61,
"SYNC_KEYPAIR": 62,
"SYNC_SOCIAL_LINKS": 63,
"SYNC_ENS_USERNAME_DETAIL": 64,
"COMMUNITY_EVENTS_MESSAGE": 67,
"COMMUNITY_EDIT_SHARED_ADDRESSES": 68,
"SYNC_ACCOUNT_CUSTOMIZATION_COLOR": 69,
"SYNC_ACCOUNTS_POSITIONS": 70,
"COMMUNITY_EVENTS_MESSAGE_REJECTED": 71,
"COMMUNITY_PRIVILEGED_USER_SYNC_MESSAGE": 72,
"COMMUNITY_SHARD_KEY": 73,
"SYNC_CHAT": 74,
"SYNC_ACTIVITY_CENTER_DELETED": 75,
"SYNC_ACTIVITY_CENTER_UNREAD": 76,
"SYNC_ACTIVITY_CENTER_COMMUNITY_REQUEST_DECISION": 77,
"SYNC_TOKEN_PREFERENCES": 78,
}
func (x ApplicationMetadataMessage_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
return proto.EnumName(ApplicationMetadataMessage_Type_name, int32(x))
}
func (ApplicationMetadataMessage_Type) Descriptor() protoreflect.EnumDescriptor {
return file_application_metadata_message_proto_enumTypes[0].Descriptor()
}
func (ApplicationMetadataMessage_Type) Type() protoreflect.EnumType {
return &file_application_metadata_message_proto_enumTypes[0]
}
func (x ApplicationMetadataMessage_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ApplicationMetadataMessage_Type.Descriptor instead.
func (ApplicationMetadataMessage_Type) EnumDescriptor() ([]byte, []int) {
return file_application_metadata_message_proto_rawDescGZIP(), []int{0, 0}
return fileDescriptor_ad09a6406fcf24c7, []int{0, 0}
}
type ApplicationMetadataMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Signature of the payload field
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
// This is the encoded protobuf of the application level message, i.e ChatMessage
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
// The type of protobuf message sent
Type ApplicationMetadataMessage_Type `protobuf:"varint,3,opt,name=type,proto3,enum=protobuf.ApplicationMetadataMessage_Type" json:"type,omitempty"`
Type ApplicationMetadataMessage_Type `protobuf:"varint,3,opt,name=type,proto3,enum=protobuf.ApplicationMetadataMessage_Type" json:"type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *ApplicationMetadataMessage) Reset() {
*x = ApplicationMetadataMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_application_metadata_message_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ApplicationMetadataMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplicationMetadataMessage) ProtoMessage() {}
func (x *ApplicationMetadataMessage) ProtoReflect() protoreflect.Message {
mi := &file_application_metadata_message_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ApplicationMetadataMessage.ProtoReflect.Descriptor instead.
func (m *ApplicationMetadataMessage) Reset() { *m = ApplicationMetadataMessage{} }
func (m *ApplicationMetadataMessage) String() string { return proto.CompactTextString(m) }
func (*ApplicationMetadataMessage) ProtoMessage() {}
func (*ApplicationMetadataMessage) Descriptor() ([]byte, []int) {
return file_application_metadata_message_proto_rawDescGZIP(), []int{0}
return fileDescriptor_ad09a6406fcf24c7, []int{0}
}
func (x *ApplicationMetadataMessage) GetSignature() []byte {
if x != nil {
return x.Signature
func (m *ApplicationMetadataMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApplicationMetadataMessage.Unmarshal(m, b)
}
func (m *ApplicationMetadataMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApplicationMetadataMessage.Marshal(b, m, deterministic)
}
func (m *ApplicationMetadataMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApplicationMetadataMessage.Merge(m, src)
}
func (m *ApplicationMetadataMessage) XXX_Size() int {
return xxx_messageInfo_ApplicationMetadataMessage.Size(m)
}
func (m *ApplicationMetadataMessage) XXX_DiscardUnknown() {
xxx_messageInfo_ApplicationMetadataMessage.DiscardUnknown(m)
}
var xxx_messageInfo_ApplicationMetadataMessage proto.InternalMessageInfo
func (m *ApplicationMetadataMessage) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
func (x *ApplicationMetadataMessage) GetPayload() []byte {
if x != nil {
return x.Payload
func (m *ApplicationMetadataMessage) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func (x *ApplicationMetadataMessage) GetType() ApplicationMetadataMessage_Type {
if x != nil {
return x.Type
func (m *ApplicationMetadataMessage) GetType() ApplicationMetadataMessage_Type {
if m != nil {
return m.Type
}
return ApplicationMetadataMessage_UNKNOWN
}
var File_application_metadata_message_proto protoreflect.FileDescriptor
var file_application_metadata_message_proto_rawDesc = []byte{
0x0a, 0x22, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0xa6,
0x13, 0x0a, 0x1a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a,
0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70,
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61,
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04,
0x74, 0x79, 0x70, 0x65, 0x22, 0x90, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a,
0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x48,
0x41, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e,
0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02,
0x12, 0x1d, 0x0a, 0x19, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x55,
0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12,
0x1a, 0x0a, 0x16, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x5f, 0x49, 0x4e, 0x53,
0x54, 0x41, 0x4c, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x1c, 0x44,
0x45, 0x50, 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x49,
0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x1a, 0x02, 0x08,
0x01, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x44, 0x44,
0x52, 0x45, 0x53, 0x53, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43,
0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x2a, 0x0a, 0x26, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54,
0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53,
0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e,
0x10, 0x07, 0x12, 0x2b, 0x0a, 0x27, 0x44, 0x45, 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x52, 0x45,
0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x46, 0x4f,
0x52, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x08, 0x12,
0x17, 0x0a, 0x13, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53,
0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x4e, 0x44,
0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0a, 0x12, 0x1f,
0x0a, 0x1b, 0x44, 0x45, 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53,
0x54, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0b, 0x12,
0x20, 0x0a, 0x1c, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x41,
0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x56, 0x32, 0x10,
0x0c, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c,
0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x0d,
0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x43, 0x4f, 0x44, 0x45,
0x5f, 0x41, 0x44, 0x56, 0x45, 0x52, 0x54, 0x49, 0x53, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x0f,
0x12, 0x22, 0x0a, 0x1e, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43,
0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49,
0x4f, 0x4e, 0x10, 0x10, 0x12, 0x2b, 0x0a, 0x27, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x4e, 0x4f, 0x54,
0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54,
0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10,
0x11, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49,
0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x12, 0x12, 0x24,
0x0a, 0x20, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54,
0x49, 0x4f, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e,
0x53, 0x45, 0x10, 0x13, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x4e, 0x4f, 0x54,
0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53,
0x54, 0x10, 0x14, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x4e, 0x4f, 0x54, 0x49,
0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53,
0x45, 0x10, 0x15, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x4d, 0x4f, 0x4a, 0x49, 0x5f, 0x52, 0x45, 0x41,
0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x16, 0x12, 0x19, 0x0a, 0x15, 0x47, 0x52, 0x4f, 0x55, 0x50,
0x5f, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e,
0x10, 0x17, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54,
0x49, 0x54, 0x59, 0x10, 0x18, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49,
0x54, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x19,
0x12, 0x1c, 0x0a, 0x14, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x49, 0x4e,
0x56, 0x49, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x1a, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x1d,
0x0a, 0x19, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55,
0x45, 0x53, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x1b, 0x12, 0x0f, 0x0a,
0x0b, 0x50, 0x49, 0x4e, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x1c, 0x12, 0x10,
0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x1d,
0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54,
0x45, 0x10, 0x1e, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x4d, 0x45,
0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x1f, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x59, 0x4e, 0x43, 0x5f,
0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4d,
0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x10, 0x20, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x4e, 0x4f, 0x4e,
0x59, 0x4d, 0x4f, 0x55, 0x53, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x42, 0x41, 0x54,
0x43, 0x48, 0x10, 0x21, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x43, 0x48, 0x41,
0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x22, 0x12, 0x1b, 0x0a, 0x17, 0x53,
0x59, 0x4e, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45,
0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x23, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x41, 0x43, 0x4b,
0x55, 0x50, 0x10, 0x24, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54,
0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x41,
0x44, 0x10, 0x25, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49,
0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x45,
0x50, 0x54, 0x45, 0x44, 0x10, 0x26, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41,
0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x44,
0x49, 0x53, 0x4d, 0x49, 0x53, 0x53, 0x45, 0x44, 0x10, 0x27, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x59,
0x4e, 0x43, 0x5f, 0x42, 0x4f, 0x4f, 0x4b, 0x4d, 0x41, 0x52, 0x4b, 0x10, 0x28, 0x12, 0x16, 0x0a,
0x12, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x43, 0x4c, 0x45, 0x41, 0x52, 0x5f, 0x48, 0x49, 0x53, 0x54,
0x4f, 0x52, 0x59, 0x10, 0x29, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x53, 0x45,
0x54, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x2a, 0x12, 0x28, 0x0a, 0x24, 0x43, 0x4f, 0x4d, 0x4d, 0x55,
0x4e, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x41, 0x52, 0x43,
0x48, 0x49, 0x56, 0x45, 0x5f, 0x4d, 0x41, 0x47, 0x4e, 0x45, 0x54, 0x4c, 0x49, 0x4e, 0x4b, 0x10,
0x2b, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c,
0x45, 0x5f, 0x50, 0x49, 0x43, 0x54, 0x55, 0x52, 0x45, 0x53, 0x10, 0x2c, 0x12, 0x10, 0x0a, 0x0c,
0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x2d, 0x12, 0x1a,
0x0a, 0x16, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54,
0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x2e, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x45,
0x54, 0x52, 0x41, 0x43, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x52, 0x45,
0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x2f, 0x12, 0x26, 0x0a, 0x22, 0x43, 0x4f, 0x4d, 0x4d, 0x55,
0x4e, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x54, 0x4f, 0x5f,
0x4a, 0x4f, 0x49, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x30, 0x12,
0x1b, 0x0a, 0x17, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54,
0x59, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x53, 0x10, 0x31, 0x12, 0x20, 0x0a, 0x1c,
0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f,
0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x32, 0x12, 0x1f,
0x0a, 0x1b, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54,
0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x33, 0x12,
0x20, 0x0a, 0x1c, 0x44, 0x45, 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41,
0x43, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10,
0x34, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x54, 0x52, 0x55, 0x53, 0x54, 0x45,
0x44, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x35, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x59, 0x4e, 0x43,
0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45,
0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x36, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x59, 0x4e, 0x43, 0x5f,
0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f,
0x44, 0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x38, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f,
0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f,
0x54, 0x4f, 0x5f, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x39, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x59,
0x4e, 0x43, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x4d, 0x45,
0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x3a, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x59,
0x4e, 0x43, 0x5f, 0x53, 0x41, 0x56, 0x45, 0x44, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53,
0x10, 0x3b, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f,
0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x54,
0x4f, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x3c, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x41, 0x4e, 0x43,
0x45, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46,
0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x3d, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x59, 0x4e,
0x43, 0x5f, 0x4b, 0x45, 0x59, 0x50, 0x41, 0x49, 0x52, 0x10, 0x3e, 0x12, 0x15, 0x0a, 0x11, 0x53,
0x59, 0x4e, 0x43, 0x5f, 0x53, 0x4f, 0x43, 0x49, 0x41, 0x4c, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x53,
0x10, 0x3f, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x45, 0x4e, 0x53, 0x5f, 0x55,
0x53, 0x45, 0x52, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x10, 0x40,
0x12, 0x1c, 0x0a, 0x18, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x56,
0x45, 0x4e, 0x54, 0x53, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x43, 0x12, 0x23,
0x0a, 0x1f, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x44, 0x49, 0x54,
0x5f, 0x53, 0x48, 0x41, 0x52, 0x45, 0x44, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x45,
0x53, 0x10, 0x44, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x4f,
0x55, 0x4e, 0x54, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f,
0x4e, 0x5f, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x10, 0x45, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x59, 0x4e,
0x43, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x53, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54,
0x49, 0x4f, 0x4e, 0x53, 0x10, 0x46, 0x12, 0x25, 0x0a, 0x21, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e,
0x49, 0x54, 0x59, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x53, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41,
0x47, 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x47, 0x12, 0x2a, 0x0a,
0x26, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x49,
0x4c, 0x45, 0x47, 0x45, 0x44, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f,
0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x48, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d,
0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x44, 0x5f, 0x4b, 0x45, 0x59,
0x10, 0x49, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x54, 0x10,
0x4a, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49,
0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45,
0x44, 0x10, 0x4b, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49,
0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x52, 0x45,
0x41, 0x44, 0x10, 0x4c, 0x12, 0x33, 0x0a, 0x2f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54,
0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4d,
0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x44,
0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x4d, 0x22, 0x04, 0x08, 0x0e, 0x10, 0x0e, 0x22,
0x04, 0x08, 0x41, 0x10, 0x41, 0x22, 0x04, 0x08, 0x42, 0x10, 0x42, 0x2a, 0x1d, 0x53, 0x59, 0x4e,
0x43, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50,
0x55, 0x42, 0x4c, 0x49, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x54, 0x2a, 0x22, 0x53, 0x59, 0x4e, 0x43,
0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52,
0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x2a, 0x27,
0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45,
0x4e, 0x54, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f,
0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
func init() {
proto.RegisterEnum("protobuf.ApplicationMetadataMessage_Type", ApplicationMetadataMessage_Type_name, ApplicationMetadataMessage_Type_value)
proto.RegisterType((*ApplicationMetadataMessage)(nil), "protobuf.ApplicationMetadataMessage")
}
var (
file_application_metadata_message_proto_rawDescOnce sync.Once
file_application_metadata_message_proto_rawDescData = file_application_metadata_message_proto_rawDesc
)
func file_application_metadata_message_proto_rawDescGZIP() []byte {
file_application_metadata_message_proto_rawDescOnce.Do(func() {
file_application_metadata_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_application_metadata_message_proto_rawDescData)
})
return file_application_metadata_message_proto_rawDescData
func init() {
proto.RegisterFile("application_metadata_message.proto", fileDescriptor_ad09a6406fcf24c7)
}
var file_application_metadata_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_application_metadata_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_application_metadata_message_proto_goTypes = []interface{}{
(ApplicationMetadataMessage_Type)(0), // 0: protobuf.ApplicationMetadataMessage.Type
(*ApplicationMetadataMessage)(nil), // 1: protobuf.ApplicationMetadataMessage
}
var file_application_metadata_message_proto_depIdxs = []int32{
0, // 0: protobuf.ApplicationMetadataMessage.type:type_name -> protobuf.ApplicationMetadataMessage.Type
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_application_metadata_message_proto_init() }
func file_application_metadata_message_proto_init() {
if File_application_metadata_message_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_application_metadata_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ApplicationMetadataMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_application_metadata_message_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_application_metadata_message_proto_goTypes,
DependencyIndexes: file_application_metadata_message_proto_depIdxs,
EnumInfos: file_application_metadata_message_proto_enumTypes,
MessageInfos: file_application_metadata_message_proto_msgTypes,
}.Build()
File_application_metadata_message_proto = out.File
file_application_metadata_message_proto_rawDesc = nil
file_application_metadata_message_proto_goTypes = nil
file_application_metadata_message_proto_depIdxs = nil
var fileDescriptor_ad09a6406fcf24c7 = []byte{
// 1140 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x56, 0x6d, 0x53, 0x1b, 0x37,
0x17, 0x7d, 0x48, 0xfc, 0x24, 0x8e, 0x08, 0x44, 0x51, 0xde, 0x0c, 0x98, 0x37, 0x87, 0x00, 0x21,
0xad, 0x69, 0xa1, 0xed, 0xb4, 0x4d, 0xd3, 0x56, 0x96, 0x2e, 0xb6, 0xf0, 0xae, 0xb4, 0x91, 0xb4,
0xee, 0x38, 0x5f, 0x34, 0x4e, 0xe3, 0x66, 0x98, 0x49, 0x82, 0x27, 0x38, 0x1f, 0xf8, 0x4f, 0xfd,
0x15, 0xfd, 0x65, 0x1d, 0xed, 0xab, 0xc1, 0xa6, 0x7c, 0x02, 0xeb, 0x1e, 0x5d, 0xe9, 0x9c, 0x7b,
0xee, 0xd5, 0xa2, 0xc6, 0x60, 0x34, 0xfa, 0x70, 0xf2, 0xe7, 0x60, 0x7c, 0x72, 0xfa, 0xc9, 0x7d,
0x1c, 0x8e, 0x07, 0xef, 0x06, 0xe3, 0x81, 0xfb, 0x38, 0x3c, 0x3b, 0x1b, 0xbc, 0x1f, 0x36, 0x47,
0x9f, 0x4f, 0xc7, 0xa7, 0xa4, 0x9a, 0xfc, 0x79, 0xfb, 0xe5, 0xaf, 0xc6, 0x3f, 0x0f, 0xd0, 0x32,
0x2d, 0x37, 0x84, 0x19, 0x3e, 0x4c, 0xe1, 0xa4, 0x8e, 0xee, 0x9c, 0x9d, 0xbc, 0xff, 0x34, 0x18,
0x7f, 0xf9, 0x3c, 0xac, 0xcd, 0x6d, 0xcc, 0xed, 0xde, 0xd5, 0xe5, 0x02, 0xa9, 0xa1, 0xdb, 0xa3,
0xc1, 0xf9, 0x87, 0xd3, 0xc1, 0xbb, 0xda, 0x8d, 0x24, 0x96, 0xff, 0x24, 0xaf, 0x50, 0x65, 0x7c,
0x3e, 0x1a, 0xd6, 0x6e, 0x6e, 0xcc, 0xed, 0x2e, 0x1e, 0x3c, 0x6f, 0xe6, 0xe7, 0x35, 0xaf, 0x3e,
0xab, 0x69, 0xcf, 0x47, 0x43, 0x9d, 0x6c, 0x6b, 0xfc, 0x4d, 0x50, 0xc5, 0xff, 0x24, 0xf3, 0xe8,
0x76, 0x2c, 0xbb, 0x52, 0xfd, 0x21, 0xf1, 0xff, 0x08, 0x46, 0x77, 0x59, 0x87, 0x5a, 0x17, 0x82,
0x31, 0xb4, 0x0d, 0x78, 0x8e, 0x10, 0xb4, 0xc8, 0x94, 0xb4, 0x94, 0x59, 0x17, 0x47, 0x9c, 0x5a,
0xc0, 0x37, 0xc8, 0x2a, 0x5a, 0x0a, 0x21, 0x6c, 0x81, 0x36, 0x1d, 0x11, 0x65, 0xcb, 0xc5, 0x96,
0x9b, 0x64, 0x19, 0x3d, 0x36, 0x7d, 0xc9, 0x5c, 0x44, 0x85, 0x76, 0x42, 0x1a, 0x4b, 0x83, 0x80,
0x5a, 0xa1, 0x24, 0xae, 0x90, 0x2d, 0x54, 0xe7, 0x10, 0x69, 0x60, 0xd4, 0x02, 0x77, 0x09, 0xec,
0x02, 0xe2, 0xff, 0xcb, 0x37, 0xaa, 0x73, 0xe4, 0x29, 0x5a, 0xd7, 0xf0, 0x3a, 0x06, 0x63, 0x1d,
0xe5, 0x5c, 0x83, 0x31, 0xee, 0x48, 0x69, 0x67, 0x35, 0x95, 0x86, 0xb2, 0x04, 0x78, 0x8b, 0xec,
0xa1, 0x6d, 0xca, 0x18, 0x44, 0xd6, 0x5d, 0x87, 0xbd, 0x4d, 0x5e, 0xa0, 0x1d, 0x0e, 0x2c, 0x10,
0x12, 0xae, 0x05, 0x57, 0xc9, 0x13, 0xf4, 0x20, 0x07, 0x4d, 0x06, 0xee, 0x90, 0x87, 0x08, 0x1b,
0x90, 0xfc, 0xc2, 0x2a, 0x22, 0xeb, 0x68, 0xe5, 0x72, 0xee, 0x49, 0xc0, 0x3c, 0xd9, 0x40, 0xf5,
0x29, 0xa2, 0x2e, 0x17, 0xb5, 0x77, 0x80, 0xef, 0x7a, 0x41, 0xa7, 0x11, 0x94, 0x31, 0x15, 0x4b,
0x8b, 0x17, 0xc8, 0x1a, 0x5a, 0xce, 0xe1, 0x4c, 0x71, 0x70, 0x94, 0xf7, 0x40, 0x5b, 0x61, 0x20,
0x04, 0x69, 0xf1, 0x3d, 0xd2, 0x40, 0x6b, 0x51, 0x6c, 0x3a, 0x4e, 0x2a, 0x2b, 0x8e, 0x04, 0x4b,
0xb7, 0x6b, 0x68, 0x0b, 0x63, 0x75, 0x2a, 0x2b, 0xf6, 0x0a, 0xfc, 0x37, 0xc6, 0x69, 0x30, 0x91,
0x92, 0x06, 0xf0, 0x7d, 0xb2, 0x82, 0x9e, 0x4c, 0x83, 0x5f, 0xc7, 0xa0, 0xfb, 0x98, 0x90, 0x2d,
0xb4, 0x71, 0x45, 0xb0, 0x4c, 0xf1, 0xc0, 0x53, 0x9a, 0x75, 0x5e, 0xa2, 0x0f, 0x7e, 0xe8, 0x29,
0xcd, 0x0a, 0x67, 0xdb, 0x1f, 0x79, 0xdb, 0x41, 0xa8, 0x8e, 0x85, 0xd3, 0x90, 0xe9, 0xf8, 0x98,
0x2c, 0xa1, 0x47, 0x6d, 0xad, 0xe2, 0xc8, 0x25, 0x16, 0x15, 0xb2, 0x27, 0x6c, 0xca, 0xee, 0x09,
0xb9, 0x8f, 0x16, 0xd2, 0x45, 0x0e, 0xd2, 0x0a, 0xdb, 0xc7, 0x35, 0x8f, 0x66, 0x2a, 0x0c, 0x63,
0x29, 0x6c, 0xdf, 0x71, 0x30, 0x4c, 0x8b, 0x28, 0x41, 0x2f, 0x91, 0x3a, 0x7a, 0x58, 0x86, 0x26,
0xf2, 0x2c, 0x27, 0xe6, 0x5b, 0x45, 0x4b, 0x65, 0xb4, 0xa8, 0xa8, 0x72, 0xc7, 0x4a, 0x48, 0xbc,
0x42, 0xee, 0xa1, 0xf9, 0x48, 0xc8, 0xc2, 0xee, 0x75, 0xdf, 0x33, 0xc0, 0x45, 0xd9, 0x33, 0xab,
0xfe, 0x36, 0xc6, 0x52, 0x1b, 0x9b, 0xbc, 0x65, 0xd6, 0x3c, 0x1f, 0x0e, 0x01, 0x4c, 0xf4, 0xc9,
0xba, 0x37, 0xce, 0x2c, 0x5f, 0x64, 0x47, 0xe3, 0x0d, 0xdf, 0x48, 0x54, 0x2a, 0xd9, 0x0f, 0x55,
0x6c, 0x5c, 0x08, 0x56, 0x0b, 0xe6, 0x5a, 0xd4, 0xb2, 0x0e, 0xde, 0x24, 0x8f, 0xd0, 0xfd, 0x64,
0x73, 0x42, 0x5b, 0x43, 0xa8, 0x7a, 0xc0, 0x71, 0xc3, 0x57, 0xae, 0x5c, 0xce, 0x8e, 0x32, 0x5e,
0x44, 0x8e, 0x9f, 0x12, 0x84, 0x6e, 0xb5, 0x28, 0xeb, 0xc6, 0x11, 0xde, 0x2a, 0x2c, 0xe7, 0xd5,
0xed, 0x79, 0xa6, 0x0c, 0xa4, 0x05, 0x9d, 0x42, 0x9f, 0x91, 0x4d, 0xb4, 0x3a, 0x33, 0x9c, 0x76,
0x1c, 0x70, 0xbc, 0xed, 0x5d, 0x37, 0x13, 0xc2, 0x85, 0x09, 0x85, 0x31, 0xc0, 0xf1, 0x4e, 0xa2,
0x84, 0xc7, 0xb4, 0x94, 0xea, 0x86, 0x54, 0x77, 0xf1, 0x2e, 0x79, 0x8c, 0x48, 0x7a, 0xc3, 0x00,
0xa8, 0x76, 0x1d, 0x61, 0xac, 0xd2, 0x7d, 0xfc, 0xdc, 0xcb, 0x98, 0xac, 0x1b, 0xb0, 0x56, 0xc8,
0x36, 0xde, 0x23, 0xbb, 0x68, 0xab, 0x2c, 0x44, 0xc6, 0xc5, 0x51, 0xcd, 0x3a, 0xa2, 0x07, 0x2e,
0xa4, 0x6d, 0x09, 0x36, 0x10, 0xb2, 0x8b, 0x5f, 0xf8, 0x5a, 0xa7, 0x13, 0x47, 0xab, 0x23, 0x11,
0x80, 0x8b, 0x04, 0xb3, 0xb1, 0x06, 0x83, 0xbf, 0x2a, 0xd2, 0xe6, 0xdd, 0xf4, 0x75, 0xa2, 0x6a,
0x3a, 0x37, 0xf2, 0xa6, 0xca, 0x6d, 0xd9, 0xf4, 0xf2, 0x69, 0xb0, 0x3a, 0xed, 0xb4, 0x8b, 0xc1,
0x7d, 0xb2, 0x8d, 0x1a, 0x57, 0x1a, 0xa3, 0xf4, 0xee, 0x37, 0x65, 0x0d, 0x0a, 0x70, 0xc6, 0xc9,
0xe0, 0x6f, 0xfd, 0x30, 0xc8, 0xb7, 0x16, 0x23, 0x00, 0x74, 0xd1, 0x03, 0xf8, 0xc0, 0xdb, 0xe2,
0xd2, 0xfd, 0x2e, 0x00, 0x0e, 0x7d, 0x8a, 0x7c, 0xe0, 0xcc, 0x44, 0x7c, 0x57, 0x98, 0xc3, 0xea,
0xd8, 0xf8, 0x39, 0x1b, 0x1b, 0xd0, 0xf8, 0xfb, 0xa2, 0xe6, 0x93, 0xe8, 0x82, 0xdf, 0x0f, 0x45,
0xcd, 0x2f, 0x31, 0x77, 0x1c, 0x98, 0x30, 0x3e, 0xf1, 0x8f, 0xe9, 0x24, 0x9a, 0x21, 0x41, 0x00,
0xb4, 0x07, 0xf8, 0x27, 0x1f, 0x4f, 0x52, 0x64, 0x5e, 0xf7, 0xb3, 0x35, 0x2c, 0x2d, 0xff, 0x73,
0x51, 0x7c, 0x43, 0x7b, 0xc0, 0xf3, 0x11, 0x8c, 0x5f, 0xfa, 0x99, 0x52, 0xe6, 0x65, 0x54, 0x32,
0x08, 0xa6, 0x5a, 0xef, 0x17, 0xaf, 0x4c, 0x16, 0x9b, 0xc9, 0xfb, 0x55, 0x51, 0xec, 0x2e, 0xf4,
0xfd, 0xe3, 0x83, 0x7f, 0x2d, 0x94, 0x30, 0x8a, 0x09, 0x1a, 0x38, 0xef, 0x17, 0x83, 0x7f, 0x23,
0x75, 0x54, 0x4b, 0x96, 0x41, 0x9a, 0x44, 0x1c, 0x49, 0x43, 0x70, 0x1c, 0x2c, 0x15, 0x01, 0xfe,
0xdd, 0x47, 0xcb, 0xdb, 0x40, 0x0f, 0xa4, 0x35, 0x05, 0x07, 0xe6, 0x1f, 0xa7, 0x89, 0xa8, 0xef,
0x7c, 0xd3, 0xa1, 0xba, 0xa4, 0x03, 0x06, 0x73, 0x4f, 0x68, 0xd2, 0x76, 0x8e, 0xc5, 0xc6, 0xaa,
0x50, 0xbc, 0xc9, 0x9b, 0x3c, 0x50, 0x1a, 0x43, 0xe1, 0x94, 0x0c, 0x65, 0x5c, 0xa4, 0x8c, 0xf0,
0x08, 0x83, 0x8f, 0xc8, 0x33, 0xb4, 0x79, 0xd5, 0x2d, 0x9c, 0x86, 0x63, 0x60, 0xbe, 0x0d, 0xdb,
0xfe, 0x19, 0x2c, 0x61, 0x91, 0x16, 0x3d, 0x11, 0x40, 0x3b, 0xab, 0x79, 0xfa, 0xc0, 0xe6, 0x57,
0xef, 0xf8, 0x97, 0x6d, 0xc2, 0x94, 0x1d, 0xaa, 0xb9, 0x97, 0x0a, 0x0b, 0xb2, 0x80, 0xee, 0x14,
0x63, 0x03, 0x1f, 0x17, 0x2f, 0xd6, 0x54, 0x6b, 0x27, 0x65, 0xe5, 0xb8, 0x5b, 0xcc, 0xae, 0xcb,
0x88, 0x58, 0x26, 0x03, 0x24, 0x20, 0x87, 0x68, 0x7f, 0x26, 0x60, 0xda, 0x3e, 0x85, 0xbd, 0xc2,
0xe2, 0xcb, 0xc1, 0xaa, 0x2e, 0x48, 0x17, 0x69, 0x38, 0x02, 0x0d, 0x92, 0x81, 0xc1, 0xb2, 0x51,
0xa9, 0x2e, 0xe2, 0xc5, 0x46, 0xa5, 0x4a, 0x31, 0x6d, 0x54, 0xaa, 0x2d, 0xdc, 0xda, 0x5b, 0x9d,
0x9e, 0x9e, 0x51, 0xdc, 0x0a, 0x44, 0x4a, 0x63, 0xaf, 0x31, 0xf3, 0xfc, 0xc9, 0x07, 0xc7, 0xec,
0xed, 0x5c, 0x8b, 0x71, 0x7e, 0x92, 0x43, 0x6b, 0xe1, 0xcd, 0x7c, 0x73, 0xff, 0x65, 0xfe, 0x8d,
0xf5, 0xf6, 0x56, 0xf2, 0xdf, 0xe1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x9d, 0xe5, 0x86,
0x0a, 0x0a, 0x00, 0x00,
}

View File

@ -95,5 +95,6 @@ message ApplicationMetadataMessage {
SYNC_ACTIVITY_CENTER_DELETED = 75;
SYNC_ACTIVITY_CENTER_UNREAD = 76;
SYNC_ACTIVITY_CENTER_COMMUNITY_REQUEST_DECISION = 77;
SYNC_TOKEN_PREFERENCES = 78;
}
}

View File

@ -1,24 +1,24 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.24.4
// source: community_privileged_user_sync_message.proto
package protobuf
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type CommunityPrivilegedUserSyncMessage_EventType int32
@ -29,250 +29,135 @@ const (
CommunityPrivilegedUserSyncMessage_CONTROL_NODE_ALL_SYNC_REQUESTS_TO_JOIN CommunityPrivilegedUserSyncMessage_EventType = 3
)
// Enum value maps for CommunityPrivilegedUserSyncMessage_EventType.
var (
CommunityPrivilegedUserSyncMessage_EventType_name = map[int32]string{
0: "UNKNOWN",
1: "CONTROL_NODE_ACCEPT_REQUEST_TO_JOIN",
2: "CONTROL_NODE_REJECT_REQUEST_TO_JOIN",
3: "CONTROL_NODE_ALL_SYNC_REQUESTS_TO_JOIN",
}
CommunityPrivilegedUserSyncMessage_EventType_value = map[string]int32{
"UNKNOWN": 0,
"CONTROL_NODE_ACCEPT_REQUEST_TO_JOIN": 1,
"CONTROL_NODE_REJECT_REQUEST_TO_JOIN": 2,
"CONTROL_NODE_ALL_SYNC_REQUESTS_TO_JOIN": 3,
}
)
var CommunityPrivilegedUserSyncMessage_EventType_name = map[int32]string{
0: "UNKNOWN",
1: "CONTROL_NODE_ACCEPT_REQUEST_TO_JOIN",
2: "CONTROL_NODE_REJECT_REQUEST_TO_JOIN",
3: "CONTROL_NODE_ALL_SYNC_REQUESTS_TO_JOIN",
}
func (x CommunityPrivilegedUserSyncMessage_EventType) Enum() *CommunityPrivilegedUserSyncMessage_EventType {
p := new(CommunityPrivilegedUserSyncMessage_EventType)
*p = x
return p
var CommunityPrivilegedUserSyncMessage_EventType_value = map[string]int32{
"UNKNOWN": 0,
"CONTROL_NODE_ACCEPT_REQUEST_TO_JOIN": 1,
"CONTROL_NODE_REJECT_REQUEST_TO_JOIN": 2,
"CONTROL_NODE_ALL_SYNC_REQUESTS_TO_JOIN": 3,
}
func (x CommunityPrivilegedUserSyncMessage_EventType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
return proto.EnumName(CommunityPrivilegedUserSyncMessage_EventType_name, int32(x))
}
func (CommunityPrivilegedUserSyncMessage_EventType) Descriptor() protoreflect.EnumDescriptor {
return file_community_privileged_user_sync_message_proto_enumTypes[0].Descriptor()
}
func (CommunityPrivilegedUserSyncMessage_EventType) Type() protoreflect.EnumType {
return &file_community_privileged_user_sync_message_proto_enumTypes[0]
}
func (x CommunityPrivilegedUserSyncMessage_EventType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CommunityPrivilegedUserSyncMessage_EventType.Descriptor instead.
func (CommunityPrivilegedUserSyncMessage_EventType) EnumDescriptor() ([]byte, []int) {
return file_community_privileged_user_sync_message_proto_rawDescGZIP(), []int{0, 0}
return fileDescriptor_158595055b4cfee2, []int{0, 0}
}
type CommunityPrivilegedUserSyncMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Type CommunityPrivilegedUserSyncMessage_EventType `protobuf:"varint,2,opt,name=type,proto3,enum=protobuf.CommunityPrivilegedUserSyncMessage_EventType" json:"type,omitempty"`
CommunityId []byte `protobuf:"bytes,3,opt,name=community_id,json=communityId,proto3" json:"community_id,omitempty"`
RequestToJoin map[string]*CommunityRequestToJoin `protobuf:"bytes,4,rep,name=request_to_join,json=requestToJoin,proto3" json:"request_to_join,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
SyncRequestsToJoin []*SyncCommunityRequestsToJoin `protobuf:"bytes,5,rep,name=sync_requests_to_join,json=syncRequestsToJoin,proto3" json:"sync_requests_to_join,omitempty"`
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Type CommunityPrivilegedUserSyncMessage_EventType `protobuf:"varint,2,opt,name=type,proto3,enum=protobuf.CommunityPrivilegedUserSyncMessage_EventType" json:"type,omitempty"`
CommunityId []byte `protobuf:"bytes,3,opt,name=community_id,json=communityId,proto3" json:"community_id,omitempty"`
RequestToJoin map[string]*CommunityRequestToJoin `protobuf:"bytes,4,rep,name=request_to_join,json=requestToJoin,proto3" json:"request_to_join,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
SyncRequestsToJoin []*SyncCommunityRequestsToJoin `protobuf:"bytes,5,rep,name=sync_requests_to_join,json=syncRequestsToJoin,proto3" json:"sync_requests_to_join,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *CommunityPrivilegedUserSyncMessage) Reset() {
*x = CommunityPrivilegedUserSyncMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_community_privileged_user_sync_message_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CommunityPrivilegedUserSyncMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CommunityPrivilegedUserSyncMessage) ProtoMessage() {}
func (x *CommunityPrivilegedUserSyncMessage) ProtoReflect() protoreflect.Message {
mi := &file_community_privileged_user_sync_message_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CommunityPrivilegedUserSyncMessage.ProtoReflect.Descriptor instead.
func (m *CommunityPrivilegedUserSyncMessage) Reset() { *m = CommunityPrivilegedUserSyncMessage{} }
func (m *CommunityPrivilegedUserSyncMessage) String() string { return proto.CompactTextString(m) }
func (*CommunityPrivilegedUserSyncMessage) ProtoMessage() {}
func (*CommunityPrivilegedUserSyncMessage) Descriptor() ([]byte, []int) {
return file_community_privileged_user_sync_message_proto_rawDescGZIP(), []int{0}
return fileDescriptor_158595055b4cfee2, []int{0}
}
func (x *CommunityPrivilegedUserSyncMessage) GetClock() uint64 {
if x != nil {
return x.Clock
func (m *CommunityPrivilegedUserSyncMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommunityPrivilegedUserSyncMessage.Unmarshal(m, b)
}
func (m *CommunityPrivilegedUserSyncMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CommunityPrivilegedUserSyncMessage.Marshal(b, m, deterministic)
}
func (m *CommunityPrivilegedUserSyncMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_CommunityPrivilegedUserSyncMessage.Merge(m, src)
}
func (m *CommunityPrivilegedUserSyncMessage) XXX_Size() int {
return xxx_messageInfo_CommunityPrivilegedUserSyncMessage.Size(m)
}
func (m *CommunityPrivilegedUserSyncMessage) XXX_DiscardUnknown() {
xxx_messageInfo_CommunityPrivilegedUserSyncMessage.DiscardUnknown(m)
}
var xxx_messageInfo_CommunityPrivilegedUserSyncMessage proto.InternalMessageInfo
func (m *CommunityPrivilegedUserSyncMessage) GetClock() uint64 {
if m != nil {
return m.Clock
}
return 0
}
func (x *CommunityPrivilegedUserSyncMessage) GetType() CommunityPrivilegedUserSyncMessage_EventType {
if x != nil {
return x.Type
func (m *CommunityPrivilegedUserSyncMessage) GetType() CommunityPrivilegedUserSyncMessage_EventType {
if m != nil {
return m.Type
}
return CommunityPrivilegedUserSyncMessage_UNKNOWN
}
func (x *CommunityPrivilegedUserSyncMessage) GetCommunityId() []byte {
if x != nil {
return x.CommunityId
func (m *CommunityPrivilegedUserSyncMessage) GetCommunityId() []byte {
if m != nil {
return m.CommunityId
}
return nil
}
func (x *CommunityPrivilegedUserSyncMessage) GetRequestToJoin() map[string]*CommunityRequestToJoin {
if x != nil {
return x.RequestToJoin
func (m *CommunityPrivilegedUserSyncMessage) GetRequestToJoin() map[string]*CommunityRequestToJoin {
if m != nil {
return m.RequestToJoin
}
return nil
}
func (x *CommunityPrivilegedUserSyncMessage) GetSyncRequestsToJoin() []*SyncCommunityRequestsToJoin {
if x != nil {
return x.SyncRequestsToJoin
func (m *CommunityPrivilegedUserSyncMessage) GetSyncRequestsToJoin() []*SyncCommunityRequestsToJoin {
if m != nil {
return m.SyncRequestsToJoin
}
return nil
}
var File_community_privileged_user_sync_message_proto protoreflect.FileDescriptor
var file_community_privileged_user_sync_message_proto_rawDesc = []byte{
0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x76,
0x69, 0x6c, 0x65, 0x67, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x79, 0x6e, 0x63,
0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e,
0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x70, 0x61, 0x69,
0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe9, 0x04, 0x0a, 0x22, 0x43,
0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67,
0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x4a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c,
0x65, 0x67, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74,
0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79,
0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75,
0x6e, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x67, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x75,
0x6e, 0x69, 0x74, 0x79, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x64, 0x55, 0x73,
0x65, 0x72, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x4a, 0x6f, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x4a, 0x6f, 0x69, 0x6e, 0x12,
0x58, 0x0a, 0x15, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,
0x5f, 0x74, 0x6f, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f,
0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x54,
0x6f, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x12, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x73, 0x54, 0x6f, 0x4a, 0x6f, 0x69, 0x6e, 0x1a, 0x62, 0x0a, 0x12, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x4a, 0x6f, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x4a, 0x6f,
0x69, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x96, 0x01,
0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55,
0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x27, 0x0a, 0x23, 0x43, 0x4f, 0x4e, 0x54,
0x52, 0x4f, 0x4c, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x5f,
0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10,
0x01, 0x12, 0x27, 0x0a, 0x23, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x5f, 0x4e, 0x4f, 0x44,
0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54,
0x5f, 0x54, 0x4f, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x2a, 0x0a, 0x26, 0x43, 0x4f,
0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x53,
0x59, 0x4e, 0x43, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x53, 0x5f, 0x54, 0x4f, 0x5f,
0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x03, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
func init() {
proto.RegisterEnum("protobuf.CommunityPrivilegedUserSyncMessage_EventType", CommunityPrivilegedUserSyncMessage_EventType_name, CommunityPrivilegedUserSyncMessage_EventType_value)
proto.RegisterType((*CommunityPrivilegedUserSyncMessage)(nil), "protobuf.CommunityPrivilegedUserSyncMessage")
proto.RegisterMapType((map[string]*CommunityRequestToJoin)(nil), "protobuf.CommunityPrivilegedUserSyncMessage.RequestToJoinEntry")
}
var (
file_community_privileged_user_sync_message_proto_rawDescOnce sync.Once
file_community_privileged_user_sync_message_proto_rawDescData = file_community_privileged_user_sync_message_proto_rawDesc
)
func file_community_privileged_user_sync_message_proto_rawDescGZIP() []byte {
file_community_privileged_user_sync_message_proto_rawDescOnce.Do(func() {
file_community_privileged_user_sync_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_community_privileged_user_sync_message_proto_rawDescData)
})
return file_community_privileged_user_sync_message_proto_rawDescData
func init() {
proto.RegisterFile("community_privileged_user_sync_message.proto", fileDescriptor_158595055b4cfee2)
}
var file_community_privileged_user_sync_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_community_privileged_user_sync_message_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_community_privileged_user_sync_message_proto_goTypes = []interface{}{
(CommunityPrivilegedUserSyncMessage_EventType)(0), // 0: protobuf.CommunityPrivilegedUserSyncMessage.EventType
(*CommunityPrivilegedUserSyncMessage)(nil), // 1: protobuf.CommunityPrivilegedUserSyncMessage
nil, // 2: protobuf.CommunityPrivilegedUserSyncMessage.RequestToJoinEntry
(*SyncCommunityRequestsToJoin)(nil), // 3: protobuf.SyncCommunityRequestsToJoin
(*CommunityRequestToJoin)(nil), // 4: protobuf.CommunityRequestToJoin
}
var file_community_privileged_user_sync_message_proto_depIdxs = []int32{
0, // 0: protobuf.CommunityPrivilegedUserSyncMessage.type:type_name -> protobuf.CommunityPrivilegedUserSyncMessage.EventType
2, // 1: protobuf.CommunityPrivilegedUserSyncMessage.request_to_join:type_name -> protobuf.CommunityPrivilegedUserSyncMessage.RequestToJoinEntry
3, // 2: protobuf.CommunityPrivilegedUserSyncMessage.sync_requests_to_join:type_name -> protobuf.SyncCommunityRequestsToJoin
4, // 3: protobuf.CommunityPrivilegedUserSyncMessage.RequestToJoinEntry.value:type_name -> protobuf.CommunityRequestToJoin
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_community_privileged_user_sync_message_proto_init() }
func file_community_privileged_user_sync_message_proto_init() {
if File_community_privileged_user_sync_message_proto != nil {
return
}
file_communities_proto_init()
file_pairing_proto_init()
if !protoimpl.UnsafeEnabled {
file_community_privileged_user_sync_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CommunityPrivilegedUserSyncMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_community_privileged_user_sync_message_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_community_privileged_user_sync_message_proto_goTypes,
DependencyIndexes: file_community_privileged_user_sync_message_proto_depIdxs,
EnumInfos: file_community_privileged_user_sync_message_proto_enumTypes,
MessageInfos: file_community_privileged_user_sync_message_proto_msgTypes,
}.Build()
File_community_privileged_user_sync_message_proto = out.File
file_community_privileged_user_sync_message_proto_rawDesc = nil
file_community_privileged_user_sync_message_proto_goTypes = nil
file_community_privileged_user_sync_message_proto_depIdxs = nil
var fileDescriptor_158595055b4cfee2 = []byte{
// 407 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0x5f, 0xab, 0xd3, 0x30,
0x18, 0xc6, 0xed, 0xda, 0xa9, 0x27, 0x3d, 0xd3, 0x19, 0x14, 0xca, 0xae, 0xea, 0x44, 0x2d, 0x22,
0x15, 0x26, 0x1c, 0x44, 0x2f, 0x44, 0x6b, 0x2e, 0x4e, 0x9d, 0xed, 0x31, 0xed, 0xf0, 0xcf, 0x4d,
0xd8, 0xba, 0x58, 0xe2, 0xb6, 0xa4, 0x26, 0xed, 0xa0, 0x5f, 0xc4, 0xef, 0xe8, 0xb7, 0x90, 0x35,
0x6b, 0xe7, 0x98, 0x20, 0x5e, 0xf5, 0x7d, 0x9f, 0x3e, 0xf9, 0x3d, 0xbc, 0x0f, 0x78, 0x9a, 0x89,
0xcd, 0xa6, 0xe2, 0xac, 0xac, 0x49, 0x21, 0xd9, 0x96, 0xad, 0x69, 0x4e, 0x97, 0xa4, 0x52, 0x54,
0x12, 0x55, 0xf3, 0x8c, 0x6c, 0xa8, 0x52, 0xf3, 0x9c, 0xfa, 0x85, 0x14, 0xa5, 0x80, 0x37, 0x9b,
0xcf, 0xa2, 0xfa, 0x36, 0xba, 0xd3, 0xbe, 0x63, 0x54, 0xe9, 0x9f, 0xa3, 0x41, 0x31, 0x67, 0x92,
0xf1, 0x5c, 0xaf, 0xe3, 0x5f, 0x16, 0x18, 0x07, 0x2d, 0xfc, 0xaa, 0x63, 0xcf, 0x14, 0x95, 0x49,
0xcd, 0xb3, 0x0f, 0x1a, 0x0c, 0xef, 0x82, 0x7e, 0xb6, 0x16, 0xd9, 0xca, 0x31, 0x5c, 0xc3, 0xb3,
0xb0, 0x5e, 0x60, 0x08, 0xac, 0xb2, 0x2e, 0xa8, 0xd3, 0x73, 0x0d, 0xef, 0xd6, 0xe4, 0xc2, 0x6f,
0x73, 0xfd, 0x7f, 0x13, 0x7d, 0xb4, 0xa5, 0xbc, 0x4c, 0xeb, 0x82, 0xe2, 0x86, 0x01, 0xef, 0x83,
0xf3, 0xc3, 0x91, 0x6c, 0xe9, 0x98, 0xae, 0xe1, 0x9d, 0x63, 0xbb, 0xd3, 0x2e, 0x97, 0x30, 0x07,
0xb7, 0x25, 0xfd, 0x51, 0x51, 0x55, 0x92, 0x52, 0x90, 0xef, 0x82, 0x71, 0xc7, 0x72, 0x4d, 0xcf,
0x9e, 0xbc, 0xfe, 0xaf, 0x64, 0xac, 0x19, 0xa9, 0x08, 0x05, 0xe3, 0x88, 0x97, 0xb2, 0xc6, 0x03,
0xf9, 0xa7, 0x06, 0x3f, 0x83, 0x7b, 0x4d, 0xad, 0x7b, 0x55, 0x75, 0x71, 0xfd, 0x26, 0xee, 0xe1,
0x21, 0x6e, 0xc7, 0xed, 0x22, 0xf7, 0x60, 0xa5, 0x29, 0x18, 0xee, 0x18, 0xc7, 0xda, 0x68, 0x01,
0xe0, 0x69, 0x3c, 0x1c, 0x02, 0x73, 0x45, 0xeb, 0xa6, 0xdb, 0x33, 0xbc, 0x1b, 0xe1, 0x05, 0xe8,
0x6f, 0xe7, 0xeb, 0x4a, 0x57, 0x6b, 0x4f, 0xdc, 0xbf, 0x1c, 0x78, 0xc4, 0xc1, 0xda, 0xfe, 0xb2,
0xf7, 0xc2, 0x18, 0xff, 0x34, 0xc0, 0x59, 0xd7, 0x2e, 0xb4, 0xc1, 0x8d, 0x59, 0xf4, 0x3e, 0x8a,
0x3f, 0x45, 0xc3, 0x6b, 0xf0, 0x31, 0x78, 0x10, 0xc4, 0x51, 0x8a, 0xe3, 0x29, 0x89, 0xe2, 0x77,
0x88, 0xbc, 0x09, 0x02, 0x74, 0x95, 0x12, 0x8c, 0x3e, 0xce, 0x50, 0x92, 0x92, 0x34, 0x26, 0x61,
0x7c, 0x19, 0x0d, 0x8d, 0x13, 0x23, 0x46, 0x21, 0x0a, 0x4e, 0x8d, 0x3d, 0xf8, 0x04, 0x3c, 0x3a,
0x26, 0x4e, 0xa7, 0x24, 0xf9, 0x12, 0x05, 0xad, 0x35, 0xe9, 0xbc, 0xe6, 0xdb, 0xc1, 0x57, 0xdb,
0x7f, 0xf6, 0xaa, 0xbd, 0x64, 0x71, 0xbd, 0x99, 0x9e, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x83,
0x24, 0x18, 0xbe, 0xdd, 0x02, 0x00, 0x00,
}

File diff suppressed because it is too large Load Diff

View File

@ -407,3 +407,17 @@ message SyncAccountCustomizationColor {
string customization_color = 2;
string key_uid = 3;
}
message TokenPreferences {
string key = 1;
int64 position = 2;
int64 groupPosition = 3;
bool visible = 4;
string communityId = 5;
}
message SyncTokenPreferences {
uint64 clock = 1;
bool testnet = 2;
repeated TokenPreferences preferences = 3;
}

View File

@ -12,6 +12,7 @@ import (
"github.com/status-im/status-go/account"
"github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/multiaccounts/accounts"
walletsettings "github.com/status-im/status-go/multiaccounts/settings_wallet"
"github.com/status-im/status-go/params"
"github.com/status-im/status-go/protocol"
"github.com/status-im/status-go/services/accounts/accountsevent"
@ -84,6 +85,14 @@ func (api *API) MoveWalletAccount(ctx context.Context, fromPosition int64, toPos
return (*api.messenger).MoveWalletAccount(fromPosition, toPosition)
}
func (api *API) UpdateTokenPreferences(ctx context.Context, preferences []walletsettings.TokenPreferences) error {
return (*api.messenger).UpdateTokenPreferences(preferences)
}
func (api *API) GetTokenPreferences(ctx context.Context) ([]walletsettings.TokenPreferences, error) {
return (*api.messenger).GetTokenPreferences()
}
func (api *API) GetAccounts(ctx context.Context) ([]*accounts.Account, error) {
return api.db.GetActiveAccounts()
}

View File

@ -102,7 +102,7 @@ type Token struct {
MarketValuesPerCurrency map[string]TokenMarketValues `json:"marketValuesPerCurrency"`
PegSymbol string `json:"pegSymbol"`
Verified bool `json:"verified"`
CommunitID string `json:"communityId"`
CommunityID string `json:"communityId"`
}
func splitVerifiedTokens(tokens []*token.Token) ([]*token.Token, []*token.Token) {
@ -337,7 +337,7 @@ func (r *Reader) GetWalletToken(ctx context.Context, addresses []common.Address)
Decimals: decimals,
PegSymbol: token.GetTokenPegSymbol(symbol),
Verified: tokens[0].Verified,
CommunitID: communityID,
CommunityID: communityID,
}
tokenSymbols = append(tokenSymbols, symbol)