Fixes#11514
The problem was that we were not handling the error from request to join correctly.
Then I added an event that sends a signal to the QML to show a toast about an error. I don't show the actual error to the user because usually it's not super helpful. It will be in the logs.
The status-go change makes it so that we don't save the request to join if the permission check failed.
Fixes#11273
Enables passing a private key as well as a public key to `RequestCommunityInfoFromMailserver`.
Also fixes a small issue in the error handling in the service
Adjst burning and minting flows to handle assets.
Supplies are passed from qml to nim as strings - "2" for ERC721, "1.5" for ERC20
String amounts are converted to Uint256 type. Additionally ERC20 amounts are converted to basic units (wei-like, decimals=18).
Uint256 values are passed to backend functions and then coverted to strings which can be converted to bigInt.BigInt types.
Supply and RemainingSupply are exposed to qml as floats.
Issue #11129
Fixes#11272
The problem was that we didn't handle the cancelation (checking with password was empty).
Now we do and we send the signal to cancel when it's the case.
Bump status-go to include required changes
Refactor the API usage to use the new async APIs.
Support multiple events in the same block
Report loading state for all the APIs
Also
- fix the loadingData state in the controller.nim
- reset the model to empty when the filter is invalidated due to
address and chain IDs change
Closes#11170
Fixes#11125
Updates the communities asset and collectibles lists when a new token is deployed.
Also refactors the section module to remove all that code and use the communities token list instead.
Adds community ID to the token list model so that we can show only the global tokens and the tokens from the community are shown in the community
This commit makes use of the newly introduced APIs added in
https://github.com/status-im/status-go/pull/3657
The idea is that clients can retrieve the last known channel permission
state from the database make use of the in the UI, before waiting for an
async onchain check to finish.
Closes#11156
Refactor code to use the token identity instead of token code
Removed the debugging activity view as now we have the API integrated
in the history view
Fixed the activity type in the activity entry
Closes: #11025
Fixes#10410
Adds the permission model to the curated communities model.
Also fixes the assetsModel and collectiblesModel used by the community portal, because it was using the basic Chat Store created in AppMain, but that store doesn't have the assets model.
Fixes#11041
Fixes the bug where going to a muted channel with a mention doesn't mark it as read. This was because the QML doesn't call mark as read when a channel doesn't have unviewed messages. That was because our Nim code put 0 as unviewedMessageCount when a channel is muted.
I changed it so that channels always have the value from status-go. No more conditions on the Nim side. Now the condition is on the QML side. So we hide the badge in QML instead. That also means that showing the number of unviewed message, even in a muted channel works.
I also fixed a bug where we counted muted messages on app restart for the normal badge. Usually it didn't cause issues, because it's rare that you had messages in a muted channel and nothing else. You'd also have unread messages in an unmuted channel. so you'd go there, read it, and it would then update the parent badge.
While testing this issue, I discovered that we in fact count muted channels for the parent badge.
So i fixed it in this one too.
So while chats don't have any Nim code for muted chats, sections do, because status-go doesn't really give us that information.
Bumps status-go to include the new API.
Add a new RecipientsModel to the activity controller.
Extends the activity Controller with API to access and manage data in
the RecipientsModel.
Resolving addresses to names remains to be implemented.
Updates #10025
Handle 'new transfers' event for activity view
to load transactions. It is a temporary solution until integration of
sequential transfer fetching is properly done with activity filter
Bump status-go with the refactoring of hasMore and add offset
Add support for continuously loading activity in the wallet API.
Extend the debugging demo with continuously loading
Closes#10994
Bump status-go to include the async API changes
Handle the wallet-activity-filtering-done event
Propagate the has more flag
Extend the debugging UX
Update #10994
Detect the MIME type using `QMimeDatabase` from the actual content and
save it in that same format using `QSaveFile`, as `QImage` does NOT
support saving a GIF
Fixes#10747
This is an improved version to check wether a user has permission to
join a community and updating the join community view accordingly.
We now asynchronously do all the checks in status-go and process
a single result upon token permission updates, additions and deletions.
Depends on: https://github.com/status-im/status-go/pull/3494Closes#10481#4939
Prior to this change, the control node would try to fetch the community
token data from its database entries.
However, when a community has been recovered from importing an account
via seedphrase, the database for community tokens will be empty.
So it's better to retrieve the contract addresses from the community
description's metadata (which should always be there).
This change determines the community token from the community metadata.
- when the user drops a remote URL (e.g. from a webbrowser), detect it
and download it before passing onto the "image_resizer"
- since the "dos_image_resizer" now handles both data and URLs, we can
simply forward the `imageUrl` to it
- detect an invalid (empty) result from "dos_image_resizer" and don't
try to send such an image
- getFileSize: NIM version would crash on non-existing or remote files
- isValidImageUrl: properly detect file extensions when the URL contains
a query (eg "file.jpeg?width=1000&height=600")
* feat(Chat): Display MutualStateUpdate system messages in 1-to-1 chats
* feat(ActivityCenter): Add AC notification when a user get removed by another contact
* fix: crutch fixing segfault on contact removal
Fixes#10501
The problem was that didn't have access to the updated contact from status-go after banning or unbanning, so we just changed the banned property, but there is more that gets changed in the backend, like `removed` being set to `true` as well.
With this fix, when you unban someone, you go back to a fresh start, as **non** contact, so you need to send a request again. That was the state you got if you restarted the app, so "re-sync" the state with status-go.
Another issue was on the frontend (QML). When banned, and after restarting to get the right state, the unban button would be disabled and the Add contact request button would show, which is not good. We only want to send requests when unbanned.
Bumps status-go HEAD to include required changes
Updates Nim filter components and APIs to follow API changes in
status-go
Complete the debugging code
Add TODO placeholders to be completed in follow up PRs: collectibles ...
General improvements and refactoring
Closes#10634
Add the possibility of retrieving the data of wallet activity based
on the given filter criteria.
Major changes:
- Bump status-go with the new equivalent API
- Add temporary developer tools
- Debugging ActivityView QML component to test filter and display
the activity
- Add activity Nim package and synchronous controller and model
Considerations
- Have the model synchronous for the first iteration and then move to
async while implementing the fetching mechanism
- Use QtObject instances in the model instead of roles over items as
agreed with the team
- Simplify the implementation by having a simple presentation layer
using backend (service also in the future)
- Small required fixes and improvements
Closes: #10633
Updates #10366
Bump status-go HEAD that removes deletion of pending multi-transactions
in status-go
Previous implementation was relying on the fact that all pending
transactions are also multi-transactions, which it seems not to be
the case (e.g. ens, airdrop collectible)
Also tried to extend the deletion of multi-transactions to status go
but it was causing crashes for minted/dropped tokens.
Updates #10474
- replace qml owners model with Nim one
- get token owners from wallet service
- keeping owners cache in community_tokens/service and refresh every 10 minutes
Issue #10254
Fixes#10340
Fixes a race condition when receiving a message in a channel that doesn't exist yet (for example in a delete 1-1 chat).
What happens is that the status-go signal contains both the message and the chat. Both are handled by different services, so there was a race between the two of them. If the chat service handled the chat first, then the message was added correctly, but in the case of the message service handling it first, it would try to add the message to a chat that doesn't exist yet, so it wouldn't work.
I also cleaned the ChatUpdateArgs by removing the messages arg that was not used anywhere and also was a bit counter-intuitive. Why did a Chat arg have messages?
was deleted
This is needed because there's cases where the deletion of a permission
might cause the current user to no longer be eligible to join
a community.
Community has the follwoing permissions:
- own 2 ETH and 1 FOO_NFT or
- own 1 FOO_NFT
User owns: 1 FOO_NFT
^ The above would make the user eligible to request access to join.
Now if the community removes the second permission, the user now no
longer fulfills the requirements so we need to ensure the UI
permits the user to request access.
Rebuilding the permissions model (including its token criteria) sets the
necessary flags in the UI automatically.
There are a bunch of notification related settings that cause RPC
calls when read from the UI in QML/Qt.
This is bad because whenever the view tries to read a notification
setting it causes an RPC call and then rerenders the view. This happens
pretty much every time a new signal arrives in the client.
To account for that we now fetch all notification settings once and mark
the service as initialized so it know when to simply return cached
values. The cache is updated when the notification settings change.
Fixes#10493
Fixes#10076
Reverts the refactor that makes getChannelGroups (ie getChats) not return chats (now it does return all chats too).
That way, we actually have the right mentions and unread count when receiving new messages
Also fixes an issue where mentions and unread count would get reset to 0 when getting a community update, because the signal doesn't have enough info
Also:
test(suite_communities): Fixed community related tests
- A new intermediate popup is now displayed when user clicks on `Create New Community` button from `Community Portal`.
- Reformulated `tst_communityPermissions` since now it is a default option without the need of activating it from experimental feature's section.
Closes#10115
disable retranslation, display a confirmation dialog and apply the
language change after app restart
rationale: the way the retranslation works internally is that it force
reevaluation of _all_ QML bindings which:
- might lead to crashes (immediately or later)
- lots of warnings printed to console, some bindings can get broken as a result
- not all UI is correctly retranslated on the fly (we have lots of places
where we assign the text imperatively via JS code), so these wouldn't
appear translated before app restart anyway
Fixes#7823
In case an account being deleted is migrated to a Keycard keystore file it was not removed from
`keycards_accounts` table and in case it was the last account for that keypair derived from keystore
file was not removed as well as other keycards containing the same keypair. That's all sorted out.
Fixes#10428
The issue above happened when you double click on a chat section. It causes the fetch to happen twice, which is wasteful, but also causes the model to get reset while it's being processed, thus creating the crash.
The fix here is to not signal that we are changing section if we are trying to switch to the section which is already active (makes sense ofc)
Upgrade Nim compiler to 1.6.
The necessary changes are related to how `for` loops now implicitly
create a `lent` type, which is Nim's way of creating a "temporary"
reference to an item inside a collection - this helps performance by
avoiding a copy of the data, but it also means that the copy that
previously was implicit in the for loop must be made explicit in the
code.
Fixes#10384
The problem was that doing the sort inside the insertRows messed up the model.
I removed it and it fixed the issues. However, it created an other issue with ordering.
The problem this time is that when populating the model at the start, we do not get the chats in order, so calculating the right position to insert a chat is difficult.
Instead, I use a setData function to just put all the chats in the items list, sort it and call it done, using the resetModel function.
I also did some clean ups.
- expose "isEnsVerified" as model role
- fix returning "ensName" when the user is not ensVerified
- react to nickname updates correctly
- fix sorting in the user/member list view
Major changes:
- Don't allow empty network selection. End up using the nim model
directly instead because of individual row changes issues
encountered with nim models
- Made the clone model a generic implementation to be used in other
places where we need to clone a model: ReceiveModal,
AddEditSavedAddressPopup
- Use cloned model as alternative to NetworksExtraStoreProxy in
ReceiveModal
- Added tristate support to our generic checkbox control
- UX improvements as per design
- Fix save address tests naming and zero address issue
- Various fixes
Notes:
- Failed to make NetworkSelectPopup follow ground-truth: show partially
checked as user intention until the network is selected in the
source model. Got stuck on nim models not being stable models and
report wrong entry change when reset. Tried sorting and only updating
changes without reset but it didn't work.
- Moved grouped property SingleSelectionInfo to its own file from
an inline component after finding out that it fails to load on Linux
with error "Cannot assign to property of unknown type: "*".".
It works on MacOS as expected
Closes: #10119
Part of #3364
To make the drag and drop reorder work correctly on channels, we needed to change the model again so that it was sorted in the model itself.
That is because the drag and drop gives us the value of the position it is dropped to as a single list, so dragging the second item of the second category would mean from position 5 to position to position 4, but what the backend wants is moving the item 2 to position 1.
Sorting the model enables us to get the category that is the parent of that position and call the service with the right positions and id.
It also enables us to reorder the channel in and out of the category.
See the module code to see how the calculation is done with an explanatory comment.
The model needed some changes to support that. Some of the function where changed from dataChange calls to resetModel calls, since we need to re-sort the model.
I tried using beginMove, but it would crash. Maybe there is a bug in NimQML or I used it badly, I'm not sure.
Fixes#10313
There were a couple of small issues.
First, we didn't call the function to calculate the highlight on new messages.
Secondly, the calculation was bugged because the category wasn't saved correctly in the channelGroup update.
- hide the market and other stuff that can't be used while offline
- recent stickers and already installed packs can still be used; they
will be sent when we return online
- when we return online, reload the views instead of closing the popup
- fix an evil NIM typo that prevented reloading the already installed
sticker packs
- remove the NIM parts that haven't been ported to the async nature; just
`loadStickers()` on the QMl side does the trick
* fix(ActivityCenter): Move ActivityCenterNotificationTypeCommunityKicked to the right place
Close#9811
* fix(ActivityCenter): fix accepting community request to join
- index was not returned properly because of case sensitive address comparison
- delete account was not done properly for keycard accounts
- after login the app was asking for store to keychain even it was a test environment
Fix balance in loading state to use loading component instead of 0
Fix width of some components in loading state.
Remove property modelDataValid in favor of existing isModelDataValid.
Fix loading items not always properly removed before adding new
transactions.
Fixes#9617
Fixes#10108
We were sending SIGNAL_NEW_MESSAGE_RECEIVED and SIGNAL_MESSAGE_EDITED, but the former is not needed, because the message editing is all done with the latter.
The new message signal was sending the OS notification, which is not wanted, plus it did some useless processing, like trying to re-edit the message model, when it was already done.
Fixes#10058
We were calling `updateParentBadgeNotifications` with wrong values, so we basically removed the badge all the time by accident.
Now, we calculate the unread messages and messages from the service's cache.
Also, we still called `updateParentBadgeNotifications` when a contact is updated, as if the contact requests still went in the old contact request popup.
- `AddAccountStore` moved to `AddAccountPopup`
- watch only address' placeholder text updated
- emoji popup button added to the right side of the account name input field
- `validateMnemonic` proc from accounts service updated
Fixes#9973
The buttons didn't work because we weren't using the right model + the section model didn't expose the PendingMemberRequestsModel.
I also fixed the service to update the community correctly and send the event. It should feel snappy-er to approve someone now.
There's a bug that all requests to join a community require the user to
authenticate themselves. This should only be needed for community that
are token permissioned.
This commit fixes it by only performing auth when requesting from the
tokengated community view.
Fixes#10010
Fixes#9949
Only calls `setTenorAPIKey` once we need it (when doing a search or getting trending).
Also caches the trending gifs so that they are only fetched once.
Makes the search and trending calls async by create an async tenor query async task.
Users that request access to community that are token permissioned
need to authenticate and enter their password, so they can reveal
their wallet addresses
This is necessary because with community token permissions, when owners
manually accept a request, we a) don't want to block the UI when the
users funds are check on chain and b) in case of insufficient funds,
we'll react with a modal that tells the owner that the user can't be
accepted.
All of that is done in this commit.
Fixes#9859
getMessageById was called way too often, because each time a contact was updated, we called it on every message that contained a mention. Now we only call it on messages that contain a mention from that specific user.
Also, we called emojiReactionsByChatIDMessageID as part of that service call, but only the pinned message used it, so I removed it from the service function. This means that the pinned messages will no longer have the emoji reactions. I could add them back if we really want, but IMO, it's not really necessary. You can just click on the message and see it in the chat instead.
I removed the call to `getMessageById` in the activity center as well, since we can get the replied message info from the MessageDto directly now.
I also removed some dead code in the messages module.
Also add handlers to JoinCommunityView for requesting and cancelling
requests. These will be extended in follow up commits to included
authentication modals
TLDR;
- all links visible in settings/popup
- persistent order of items
- drag'n'drop to reorder
- editing/deleting in a new popup
- several links of the same type
Needs changes in nimqml (to expose QAIM::begin/endMoveRows), in
DOtherSide (to expose those to NIM), in status-go (to preserve the links
order and fully save them to DB)
Fixes#9777
Introduce TokenItem struct.
TokenModel keeps TokenItems.
TokenItem keeps CommunityTokenDto and chain details.
Chain details are taken from networks service.
Fix#9867
- Added local pairing signals
- Remove slash ending from keystorePath
- Implemented localPairingState. Fixed sync new device workflow.
- Error message view design update
- Moved local pairing status to devices service
- ConnectionString automatic validation
- Async inputConnectionString
- Added all installation properties to model. Minor renaming.
- Removed emoji and color customization
- Show display name, colorhash and color in device being synced
- Add timeout to pairing server
- Add device type
Fix `DeviceSyncingView` sizing. Fix `inputConnectionString` async task slot.
This does a few things:
- It integrates with the latest `CommunityTokensMetadata` to access
community specific ERC721 token
- It changes `ChatLayout` such that it conditionally loads either
`ChatView` or `JoinCommunityView`. `JoinCommunityView` has been
specifically designed for token-gated communities
Here's what works (in terms of token permissions):
1. If a community has token permissions and the the current users is not
a member of that community, we show `JoinCommunityView` instead of
`ChatView`
2. Any community token permissions of type "Become member" are listed in
the `JoinCommunityView`
3. There are different types of token critera a permission can have:
ERC20 token, ERC721 token, or ENS (which is also ERC721 but we have
a type for that nonetheless)
Only ERC20 token balances are checked for the known wallet accounts.
This happens every time the known token list has been updated (every
10 min atm).
We still need to add balance checks for any ERC721 tokens and ENS.
4. If token permissions are created, updated or deleted by the community
owner, the `JoinCommunityView` will update in real-time.
You'll also notice that the `Reveal my address and request access`
button will be enabled if any of the token permissions are fulfilled
(only ERC20 at the time being). Clicking that button will not yet send
a request.
This will be done in the next step as part of https://github.com/status-im/status-desktop/issues/9761
This is a continuation of the effort to improve out app's startup time.
With these changes, installed stickers are only loaded when the sticker
popup is opened.
They are also loaded asynchronously to not block the main thread.
Closes#9435
This postpones the loading of recently used stickers to the point
when a) the stickers popup is opened and the recent stickers tab was the
last visited one or b) when the sticker popup is open and one switches
to the recent stickers tab.
Partially closes#9435
Instead of loading recent gifs right on startup eagerly,
we postpone the task to when it's actually needed (when the gif popup is
opened and the recent gifs tab is activated), and on top of that
we also load the data asynchronously to keep the amount of work
that needs to be done in a single tick as short as possible.
This needs: status-im/status-go#3170
Closes#9437
- missed space added in account already exists popup
- disable close button for shared keycard popup flows identified separately
- crash if built tokens from some other action (like enabling wallet) are received late while
keycard flow is setting up and keypair for processing is not prepared yet
- 3 words name was displayed on login for a keycard user
This commit is the first of implementing community permissions.
**It is not implementing the complete feature**, rather does it
introduce the first pieces, such that we can get code reviewed and
merged before it grows too big.
To review these features, please make sure to
1. Enable wallet (Settings -> Advanced -> Wallet toggle)
2. Enable community permissions (Settings -> Advanced -> Community
Permissions toggle)
You'll have to restart the app after doing so.
The commit introduces the following:
**UI, API calls and view models to CRUD community permissions**
After creating a community, the user can go to the community
settings and create new token permissions. The user can also update
and delete existing permissions.
**Asset and collectible view models**
To create community token permissions, users have to select
the token criteria. This commit introduces the `assetsModel` for ERC20
tokens and `collectiblesModel` for `ERC721` tokens.
The latter only supports custom minted community tokens at this point.
**This commit requires:** https://github.com/status-im/status-go/pull/3207
When a community link is shared with a user and that user visits that community, it turns out that the chat objects for that community have not been created yet.
This results in chat data being malformed/non-existent until another message signal is processed that updates the chats in memory. This update can someimes occur earlier, sometimes later, which is why the issue isn't always reproducible.
This commit ensures we're loading chats from status-go again upon spectating, to ensure they exist in memory when we try to access the data in the UI.
Closes#8361
AppController executes status-go Logout function when it's being deleted, and that will stop all status-go services and kill pending mailserver requests. If StatusFoundation is deleted before the AppController, it's possible for some tasks to freeze the app on logout
As of #9596, task-runner is no longer used.
Due to how the build system works, task-runner was providing nim-stew,
nim-bearssl and nim-chronos to the project, even though these are also
top-level dependencies - effectively this means there were multiple
versions of these libraries in the source tree and it is not entirely
intuitive which is actually used - adding to the confusion, the
submodule was pinning different versions.
This PR removes task-runner and resets the other dependencies to the
versions in task-runner thus minimising collateral changes.
A duplicate copy of bearssl is also removed.
- fix add-account-modal custom derivation checkbox blocking all workflows
- fix, improve and enable wallet tests
- wait_for_text_matching alternative, to is_text_matching, to check also for content as squish driver API
- add objectName based lookup for in some places where user-text was used
- add workaround to retry for 10 seconds add watch due to flakiness
- rename SquishDriver.type to type.text not to conflict with python's type
- add optional timeout to some APIs
- ignore error for extra step in reaching onboarding seedphrase in linux
Updates: #9576
This commit resolves a crash happened due to connection to
`SIGNAL_WALLET_ACCOUNT_TOKENS_REBUILT` when keycard sync
flow was run in the background.
Also updated the keycard synchronization process with the current state of
the application and is the first step of many which leads towards completion
of entire syncing feature.
Model with community tokens was moved to section_item - every section has its own model.
Every deployed smart contract is saved to database with "In Progress" state.
The app listenes to deployed transaction and updates contract state in database to "Failed" or "Deployed".
Corresponding model is updated.
Issue #9233
Fixes#9508
The issue was caused by some calls that try to update the activeSection's item, but during chat loading, the activeSection had the possibility of being empty, thus causing a crash.
The fix here is to create a LoadingItem and set it as active during the time the chats load (if the last active section was a community or chat). Then, the updates go to that Item and do nothing, but that's normal.
as we're dealing with local file URLs only here, we don't want to turn
the plus signs (`+`) into spaces (leads to failing to open the file,
emits an exception, crashes later on in our JS code)
Fixes#9538
Closing #9470
Adding Did You Know Splash Screen that will be shown when AppMain is completed.
The SplashScreen runs for 30 seconds and will randomly iterate through `fun messages` every 5 seconds.
- Bump status-go head that include the required specific changes
- fetch token balance (native or ERC20) and cache historical token quantity data
- fetch FIAT currency
- Extend presentation layer (NIM and QML) to account for API changes
- Remove timed request and other optimizations from the time of fetching
balance history every time instead of querying cache
- Add C++ integration debugging tests and update network chain configuration (outdated)
Closes: #8175
LinksMessageView component will receive the urls from nim as string and it will only forward the string to getLinkPreviewData slot implemented in nim together with some settings (supported img extensions and unfurling preferences)
On nim side the urls will be parsed and validated using the settings received from qml.
Images are now validated before sending them to the UI using the HEAD request.
Add Community Tokens testing UI with minting button, enabled by a Advanced Settings toggle.
Add minting module,view and needed models.
Add community_tokens service to call collectibles smart contract functions.
Issue #8921
Check box added to warn user if they want to add a path out of the
default Status' wallet derivation path. In case they do that, they are
not able to migrate such keypair to a Keycard.
Closes: #9118
- fix chat category/section height not being (re)set to 0 properly and
hidden
- restore the chat category header highlighting when it contains new
messages/mentions after the new flattened chat model refactoring
Fixes#9493
- make the `href` point to `#` to prevent Qt from resolving the empty URL
as if it were a relative link
- prepend the at sign (`@`) to the mention tag, just like Discord and
`@everyone` else :)
Fixes#9364
Due to changes done in https://github.com/status-im/status-go/pull/3133
we had to update procedure for adding migration keypair (which includes
local keystor files deletion for the accounts being migrated) and procedure
for account deletion, cause in order to delete local keystore file for the
acount which is being deleted, we have to provide a password now (states
only for non keycard accounts, keycard accounts use empty password).
For these source/dev builds:
- display "git master SHA" as the version number
- disable the "Check for updates" button
- use APP_VERSION in nim
Rationale: instead of updating git master VERSION text file manually each
time an official version is released, we will now mark source/dev builds
with the corresponding git commit hash and display that in the
Settings/About section
connect to the correct signal
the store node (aka mailserver) is no longer a dialog that would let the
user select a new available mailserver; we care about a working and
_active_ mailserver here
Fixes#9358