Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
611323b
test: First draft for settings wrappers and test file added
AYAHASSAN287 Oct 5, 2025
eed34eb
test: Making changes in test env & add tests
AYAHASSAN287 Oct 10, 2025
9583dcd
test: Add new test
AYAHASSAN287 Oct 12, 2025
5ef6ef6
feat: improve blockchainstate
dlipicar Sep 26, 2025
a032e5e
feat: replace old transfer detection algorithm with multistandardbala…
dlipicar Sep 26, 2025
d6f006a
build: add Android x86_64 support to Makefile (#6990)
glitchminer Oct 8, 2025
52f1fbf
ci: use official base docker image for builds
markoburcul Oct 9, 2025
e7e188f
test: community chats (#6987)
fbarbu15 Oct 10, 2025
5fc58ab
test: Adding node tests
AYAHASSAN287 Oct 15, 2025
a1943ab
test: contact verification (#6997)
fbarbu15 Oct 13, 2025
2e34d37
chore: point go.mod to original go-ethereum repo
dlipicar Oct 6, 2025
d58773d
chore: drop usage of non-multichain ethclient methods in rpc chain cl…
dlipicar Oct 6, 2025
9837fca
chore: drop usage of non-multichain ethclient methods in community to…
dlipicar Oct 6, 2025
d626137
chore: drop usage of non-multichain ethclient methods in fees manager
dlipicar Oct 6, 2025
7879025
chore: adapt to new geth logger
osmaczko Sep 29, 2025
d66bf11
chore: remove unused log_parser code
dlipicar Oct 1, 2025
5eb8f52
chore: replace custom NoSign parameter from bind.TransactOpts
dlipicar Oct 1, 2025
20a5993
chore: update SingleRequestCodec to go-ethereum upstream
igor-sirotin Oct 1, 2025
75439f3
chore: use `go-waku` with upstream `go-ethereum` (#6978)
igor-sirotin Oct 3, 2025
1d7080c
chore: fix tests
dlipicar Oct 3, 2025
bc85526
chore: bump go-waku and go-discover (#6983)
igor-sirotin Oct 3, 2025
bf4c893
refactor: use common Migrate function
osmaczko Oct 13, 2025
a25c5e5
refactor: move pubkeys utils from protocol to crypto package
osmaczko Oct 13, 2025
37b67fd
fix: Crash on uninitialized filterManager
alexjba Oct 10, 2025
f7a427c
test: Add new tests
AYAHASSAN287 Oct 15, 2025
6f39c0a
test: Adding wrappers &tests
AYAHASSAN287 Oct 16, 2025
5560bca
test: Add positive & negative tests
AYAHASSAN287 Oct 17, 2025
c3bc720
test: Added backup tests
AYAHASSAN287 Oct 19, 2025
5e77631
feat: clean up balance fetching from token manager (#6991)
dlipicar Oct 15, 2025
3b0af69
fix(scripts): branch_version_generated use current base branch (#7007)
igor-sirotin Oct 16, 2025
4fe3de8
fix: goimports configuration (#7004)
igor-sirotin Oct 16, 2025
cbe7387
feat: local timesource (#7003)
igor-sirotin Oct 16, 2025
4ad6877
feat(benchmark): threads and goroutines count (#7006)
igor-sirotin Oct 16, 2025
4d480c9
chore: cleanup chain client and transactor (#7008)
dlipicar Oct 17, 2025
fcd6bc2
test: add all APIs tests
AYAHASSAN287 Oct 19, 2025
8a708ea
test: Apply linters
AYAHASSAN287 Oct 20, 2025
c94a52e
Merge branch 'develop' into test/settings-tests
AYAHASSAN287 Oct 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions multiaccounts/settings_notifications/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ const (
type NotificationsSettings struct {
db *sql.DB
}
type ExemptionsDefaults struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's with the changes in the .go files?

MuteAllMessages bool
PersonalMentions string
GlobalMentions string
OtherMessages string
}

func (ns *NotificationsSettings) GetDefaultExemptions() ExemptionsDefaults {
return ExemptionsDefaults{
MuteAllMessages: defaultExMuteAllMessagesValue,
PersonalMentions: defaultExPersonalMentionsValue,
GlobalMentions: defaultExGlobalMentionsValue,
OtherMessages: defaultExOtherMessagesValue,
}
}

func NewNotificationsSettings(db *sql.DB) *NotificationsSettings {
return &NotificationsSettings{
Expand Down
17 changes: 17 additions & 0 deletions services/accounts/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ import (
"github.com/status-im/status-go/protocol"
)

type ExemptionsDefaultsDTO struct {
MuteAllMessages bool `json:"muteAllMessages"`
PersonalMentions string `json:"personalMentions"`
GlobalMentions string `json:"globalMentions"`
OtherMessages string `json:"otherMessages"`
}

func (api *SettingsAPI) NotificationsGetDefaultExemptions() (ExemptionsDefaultsDTO, error) {
d := api.db.GetDefaultExemptions()
return ExemptionsDefaultsDTO{
MuteAllMessages: d.MuteAllMessages,
PersonalMentions: d.PersonalMentions,
GlobalMentions: d.GlobalMentions,
OtherMessages: d.OtherMessages,
}, nil
}

func NewSettingsAPI(messenger **protocol.Messenger, db *accounts.Database, config *params.NodeConfig) *SettingsAPI {
return &SettingsAPI{
messenger: messenger,
Expand Down
145 changes: 141 additions & 4 deletions tests-functional/clients/services/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,148 @@ class SettingsService(Service):
def __init__(self, client: RpcClient):
super().__init__(client, "settings")

# Base settings
def get_settings(self):
response = self.rpc_request("getSettings")
return response
return self.rpc_request("getSettings")

def save_setting(self, key, value):
params = [key, value]
response = self.rpc_request("saveSetting", params)
return response
return self.rpc_request("saveSetting", params)

def get_node_config(self):
return self.rpc_request("nodeConfig")

# News Settings
def news_feed_enabled(self):
return self.rpc_request("newsFeedEnabled")

def news_notifications_enabled(self):
return self.rpc_request("newsNotificationsEnabled")

def news_rss_enabled(self):
return self.rpc_request("newsRSSEnabled")

# Backup Settings
def backup_path(self):
return self.rpc_request("backupPath")

def messages_backup_enabled(self):
return self.rpc_request("messagesBackupEnabled")

# Notifications Settings
def notifications_get_allow_notifications(self):
return self.rpc_request("notificationsGetAllowNotifications")

def notifications_set_allow_notifications(self, value: bool):
params = [value]
return self.rpc_request("notificationsSetAllowNotifications", params)

def notifications_get_one_to_one_chats(self):
return self.rpc_request("notificationsGetOneToOneChats")

def notifications_set_one_to_one_chats(self, value: str):
params = [value]
return self.rpc_request("notificationsSetOneToOneChats", params)

def notifications_get_group_chats(self):
return self.rpc_request("notificationsGetGroupChats")

def notifications_set_group_chats(self, value: str):
params = [value]
return self.rpc_request("notificationsSetGroupChats", params)

def notifications_get_personal_mentions(self):
return self.rpc_request("notificationsGetPersonalMentions")

def notifications_set_personal_mentions(self, value: str):
params = [value]
return self.rpc_request("notificationsSetPersonalMentions", params)

def notifications_get_global_mentions(self):
return self.rpc_request("notificationsGetGlobalMentions")

def notifications_set_global_mentions(self, value: str):
params = [value]
return self.rpc_request("notificationsSetGlobalMentions", params)

def notifications_get_all_messages(self):
return self.rpc_request("notificationsGetAllMessages")

def notifications_set_all_messages(self, value: str):
params = [value]
return self.rpc_request("notificationsSetAllMessages", params)

def notifications_get_contact_requests(self):
return self.rpc_request("notificationsGetContactRequests")

def notifications_set_contact_requests(self, value: str):
params = [value]
return self.rpc_request("notificationsSetContactRequests", params)

def notifications_get_identity_verification_requests(self):
return self.rpc_request("notificationsGetIdentityVerificationRequests")

def notifications_set_identity_verification_requests(self, value: str):
params = [value]
return self.rpc_request("notificationsSetIdentityVerificationRequests", params)

def notifications_get_sound_enabled(self):
return self.rpc_request("notificationsGetSoundEnabled")

def notifications_set_sound_enabled(self, value: bool):
params = [value]
return self.rpc_request("notificationsSetSoundEnabled", params)

def notifications_get_volume(self):
return self.rpc_request("notificationsGetVolume")

def notifications_set_volume(self, value: int):
params = [value]
return self.rpc_request("notificationsSetVolume", params)

def notifications_get_message_preview(self):
return self.rpc_request("notificationsGetMessagePreview")

def notifications_set_message_preview(self, value: int):
params = [value]
return self.rpc_request("notificationsSetMessagePreview", params)

def notifications_get_ex_mute_all_messages(self, id: str):
params = [id]
return self.rpc_request("notificationsGetExMuteAllMessages", params)

def notifications_get_ex_personal_mentions(self, id: str):
params = [id]
return self.rpc_request("notificationsGetExPersonalMentions", params)

def notifications_get_ex_global_mentions(self, id: str):
params = [id]
return self.rpc_request("notificationsGetExGlobalMentions", params)

def notifications_get_ex_other_messages(self, id: str):
params = [id]
return self.rpc_request("notificationsGetExOtherMessages", params)

def notifications_set_exemptions(self, id: str, mute_all_messages: bool, personal_mentions: str, global_mentions: str, other_messages: str):
params = [id, mute_all_messages, personal_mentions, global_mentions, other_messages]
return self.rpc_request("notificationsSetExemptions", params)

def delete_exemptions(self, id: str):
params = [id]
return self.rpc_request("deleteExemptions", params)

def set_bio(self, bio: str):
params = [bio]
return self.rpc_request("setBio", params)

def mnemonic_was_shown(self):
return self.rpc_request("mnemonicWasShown")

def last_tokens_update(self):
return self.rpc_request("lastTokensUpdate")

def thirdparty_services_enabled(self):
return self.rpc_request("thirdpartyServicesEnabled")

def notifications_get_default_exemptions(self):
return self.rpc_request("notificationsGetDefaultExemptions")
8 changes: 7 additions & 1 deletion tests-functional/clients/status_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from utils import fake
from utils import keys
from utils.config import Config
import copy

NANOSECONDS_PER_SECOND = 1_000_000_000

Expand Down Expand Up @@ -78,7 +79,7 @@ def __init__(self, await_signals=[], privileged=False, ipv6=USE_IPV6, **kwargs):
self.events = Events()
self.version = "unknown"
self.network_id = 1

self._boot_api_config = None
RpcClient.__init__(self)
ApiClient.__init__(self, self.api_url)
SignalClient.__init__(self, self.ws_url, await_signals)
Expand Down Expand Up @@ -291,13 +292,15 @@ def create_account_and_login(self, user=user_1, **kwargs):
self._set_display_name(**kwargs)
method = "CreateAccountAndLogin"
data = self._create_account_request(user, **kwargs)
self._boot_api_config = copy.deepcopy(data.get("apiConfig", {}))
return self.api_request_json(method, data)

def restore_account_and_login(self, user=user_1, **kwargs):
self._set_display_name(**kwargs)
method = "RestoreAccountAndLogin"
data = self._create_account_request(user, **kwargs)
data["mnemonic"] = user.passphrase
self._boot_api_config = copy.deepcopy(data.get("apiConfig", {}))
return self.api_request_json(method, data)

def login(self, keyUid, user=user_1):
Expand Down Expand Up @@ -479,3 +482,6 @@ def image_server_tls_cert(self):
method = "ImageServerTLSCert"
response = self.api_request(method, {})
return response.content.decode("utf-8")

def get_boot_api_config(self):
return copy.deepcopy(self._boot_api_config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you already did a deepcopy at line 295 / 303

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def test_full_migrate_flow(self):
add_resp = self.account.accounts_service.add_keypair_via_seed_phrase(
user_1.passphrase, self.account.password, keypair_name, wallet_account_details_derivation
)
self.account.accounts_service.migrate_non_profile_keycard_keypair_to_app
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's with this change?

assert "error" not in add_resp
add_result = add_resp
assert add_result is not None
Expand Down
Loading
Loading