Commit Graph

3188 Commits

Author SHA1 Message Date
Anthony Laibe 2019e8c699 fix(@wallet): close save address modal policy
fixes: #9773
2023-03-09 21:11:40 +01:00
Pascal Precht 25b0641cc2 feat: introduce first JoinCommunityView for token-gated communities
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
2023-03-09 16:35:06 +01:00
Michal Iskierko 8f3a965a49 fix(@desktop/communities): Rename minting module
Issue #9817
2023-03-09 16:34:55 +01:00
Anthony Laibe 37d539f061 fix(@wallet): saved address form typo
fixes #9769
2023-03-09 16:31:56 +01:00
Michał Cieślak ab523ee19f fix(CommunityPermissions): Temporary solution for assets icons
Closes: #9613
2023-03-09 14:16:36 +01:00
Lukáš Tinkl 5c0f1981ad feat: Profile Showcase: Proof of concept for own Profile Dialog
- the goal of this PR is to get some bsais UI building blocks done for
the followup PRs
- the order of showcase tabs now is:
Communities/Accounts/Collectibles/Assets
- there will be further changes to accomodate for different types of
backend models as those get developed (for other users' profiles)

Fixes #9664
2023-03-08 18:45:27 +01:00
Lukáš Tinkl 3fd196323e chore: silence warnings 2023-03-08 18:45:27 +01:00
Michal Iskierko 2ac1216b68 fix(@desktop/communities): Fix community tokens model
Fix #9781
2023-03-08 13:36:41 +01:00
Michał Cieślak 0e92b69bc5 chore(CommunityPermissions): fixed warnings introduced during integration with backend 2023-03-08 12:02:55 +01:00
Michał Cieślak d813cc12b8 chore(CommunityPermissions): refactor access to stores in CP components
So far CP components (views, panels) were accessing stores directly.
Now `CommunitySettingsView` is a single place where stores are accessed.
Other components no longer depend on stores.

Moreover:
- dedicated store `PermissionsStore` created for handling permissions
  in a single, separated place
- storybook pages fixed

Closes: #9784
2023-03-08 12:02:55 +01:00
Pascal Precht 48c322cbe4 refactor(ChatLayout): expose emoji and sticker popup properties and signals
Prior to this change `ChatLayout` exposed `chatView` which let other
components access it, its properties and signals.

This is problematic as we need to be able to swap out the `ChatView`
with the `JoinCommunityView` for token gated communities, in which case
there won't be an instance of `chatView`.

This commit ensures that we rely purely on inputs and outputs of the
component, without exposing the component instance itself.
2023-03-07 18:16:42 +01:00
Sale Djenic d5cddbf79a feat(@desktop/keycard): no `pcsc` service error screen
Closes: #9116
2023-03-07 18:02:10 +01:00
Sale Djenic 21a5b10fab fix(@desktop/keycard): few small fixes applied
- 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
2023-03-07 18:02:10 +01:00
Dario Gabriel Lipicar eed98809d1 feat(@dekstop/wallet): support collectibles in activity tab
Fixes #8811
2023-03-07 11:07:04 -03:00
Noelia 02cf07044d feat(MintToken): Created Preview collectible page
- Added navigation between pages.
- Added main layout and properties (some backend integration still pending).
- Added holders model with mocked data.
- Added mint tokens footer component.

Closes #8734 and #8737
2023-03-07 13:24:45 +01:00
mprakhov cb924053c6 fix(@desktop/channels): allow capitals in channel name 2023-03-07 13:16:00 +01:00
Ivan Belyakov 601d3dd0f1 fix(@desktop/wallet): Fix tests for saved addresses.
Minor fixes

Updates: #8599
2023-03-07 15:00:46 +03:00
Ivan Belyakov e27f2ec667 feat(@desktop/wallet): update saved addresses list
Fixes #8599
2023-03-07 15:00:46 +03:00
Lukáš Tinkl 1a96700bb8 fix(ProfileHeader): Settings/Profile/avatar design updates
- correct margins, spacing, position for the avatar image
- action button in the top right corner
- fixup the context menu

Fixes #9682
2023-03-07 11:27:03 +01:00
Michal Iskierko 5722f67964 fix(@desktop/communities): Handling community token image
Handle image correctly and show in testing UI.
Improve fees for deployment.
Handle CommunityTokenMetadata in community structure.
2023-03-07 10:04:12 +01:00
Patryk Osmaczko 2429673b8d chore(communities/portal): rename section (popular -> all)
closes: #9728
2023-03-06 21:35:32 +01:00
Michał Cieślak a2a1da801c chore(CommunityPermissions): Use key role name for referencing channels 2023-03-06 17:36:36 +01:00
Michał Cieślak 480c249ee0 chore(CommunityPermissions): Refactor channels handling
Community permissions model refers to channels by id instead of
taking/serving all details. UI fetches necessary metadata form
appropriate channels model.

Closes: #9588
2023-03-06 17:36:36 +01:00
Jonathan Rainville 40a157a5af fix(test): fix create category test 2023-03-03 16:14:38 -05:00
Michał Cieślak 702d355e89 chore(InDropdown): Adapt to flattened model for channels
Closes: #9591
2023-03-03 16:51:45 +01:00
Pascal Precht e4b8814bfa feat(Communities): allow for creating community permissions
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
2023-03-03 10:22:32 +01:00
Stefan a0170a3fda feat(wallet) propagate multi-transaction ID to Nim
Bump status-go to include the propagation of multi-transaction ID for status-go APIs

Also

- Add leftover fix from SendModal layout

Updates: #7663
2023-03-02 14:25:53 +04:00
Sale Djenic bf9b709cc8 feat(@desktop/keycard): recover an account fetching previously backed up data from waku
Closes: #8920
2023-03-01 13:20:14 +01:00
Stefan 16ed8739e8 fix(wallet) fix Add Account Modal and wallet tests
- 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
2023-03-01 15:36:06 +04:00
Jonathan Rainville e9f4426e61 refactor(devices): make loading devices lazy load and async
Fixes #9439
2023-02-28 17:06:16 -05:00
Jonathan Rainville 5352ba8c6f refactor(chat-model): simplify chat model and put category as an Item
Fixes #9494
2023-02-28 11:58:40 -05:00
Noelia db3be56d42 feat(MintTokens): Create new collectible screen
Created new form screen for minting collectibles.

Closes #8733
2023-02-28 14:17:47 +01:00
Noelia 83bdc7f104 feat(Wallet/NetworkFilter): Extended component API
Extends API to allow single UI selection network into `NetworkFilter` and `NetworkSelectPopup` updated.
2023-02-28 14:17:47 +01:00
Sale Djenic c83794470b chore(keycard): sync keycard with the current app state updated
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.
2023-02-27 17:02:47 +01:00
Pascal Precht cf5271cfea refactor(communities): load curated communities asynchronously
This makes loading of curated communities asynchronous as the task
can take quite a while.

Closes #9341
2023-02-27 10:24:32 -05:00
Dario Gabriel Lipicar ed1a0d04a0 fix(@desktop/wallet): avoid storing CurrencyAmount objects in QML 2023-02-27 08:22:41 -03:00
Michal Iskierko 147288b47b feat(@desktop/community): Saving community tokens in database
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
2023-02-27 11:01:35 +01:00
Alexandra Betouni 7c87bc8987 fix(scrollview instances): fixed dropdown&popup height
Fixes InDropdown & OutgoingContactVerificationRequestPopup
2023-02-23 20:52:29 +02:00
Khushboo Mehta 2dbf2d4635 fix(@desktop/wallet): Remove the 'Load More' button from the Activity view and replace with automatic loading when the user scrolls down using a skeleton loading state
fixes #8987
2023-02-23 18:04:08 +01:00
Anthony Laibe d9ed23b2d6 fix(@wallet): trim tx data 2023-02-23 14:53:45 +01:00
Lukáš Tinkl abd1672e90 fix: provide correct content/implicit sizes
- fixes a regression from a recent StatusScrollView where the progress
dialog contents would no longer be visible due to broken height
calculation

- do it so in a way that no longer produces binding loop warnings (should
help with error items being truncated on first opening)

Fixes: #8129
2023-02-23 15:05:31 +02:00
Lukáš Tinkl 8097d640eb chore: remove unusued imports 2023-02-23 15:05:31 +02:00
Michał Cieślak ad006cf105 fix(CommunityTokenPermissionsPopup): required models provided, storybook page fixed 2023-02-23 11:51:30 +01:00
Michał Cieślak e352dcfc11 chore(CommunityPermission): Use typed properties for CommunitiesStore
Additionally, pass assets/collectibles models to HoldingsDropdown
directly instead of store to reduce dependency.
2023-02-23 11:51:30 +01:00
Michał Cieślak 9693e19ba5 fix(CommunityPermissions): Adjust store API to not take models as parameters, move conversion to the caller
Closes: #9611
2023-02-22 18:27:19 +01:00
Michał Cieślak 34676d0ec7 fix(CommunityPermissions): clean warnings by preventing assigning when some roles doesn't exist
Closes: #9608
2023-02-22 14:43:40 +01:00
Michał Cieślak 1e7e2084a7 fix(CommunityNewPermissionView): Use only key/amount to compare holdings when tracking duplicates 2023-02-22 14:43:40 +01:00
Lukáš Tinkl 79645b53ce fix: truncation of channel description and pinned message text
The chat title/subtitle no longer bleed into the action buttons

- handle long texts in chat description, elide them and show the whole
text in a tooltip
- minor UI fixes in ChatHeaderContentView and StatusToolBar
- adjust Sandbox' Controls page

Fixes #9583
2023-02-21 16:53:06 +02:00
Noelia 852a826126 fix(CommunityPermissions): Update initial page dark mode image
Closes #8497
2023-02-21 08:46:52 +01:00
Michał Cieślak e2811fa290 feat(CommunityPermissions): Handle update/remove by permission's key instead of index 2023-02-20 22:54:43 +01:00
Michał Cieślak 03e1636cff feat(StatusQ): Add cpp model utils to allow handling ListModel and generic QAbstractItemModel uniformly
Closes: #9562
2023-02-20 22:25:56 +01:00
Michał Cieślak c23f4e173e fix(CommunityPermissions): Typos corrected 2023-02-20 18:40:59 +01:00
Michał Cieślak f6ac937dfd fix(CommunityPermissions): Warning regarding color assignment fixed 2023-02-20 18:40:59 +01:00
Michał Cieślak d025f17e2a feat(CommunityPermissions): Check if form filled completely when
updating

Closes: #9388
2023-02-20 18:40:59 +01:00
Michał Cieślak a97c8a720e feat(CommunityPermissions): Implement duplication checking
Moreover:
- adapt flow to the design
- introduce ModelChangeTracker utility component

Closes: #9048
2023-02-20 18:40:59 +01:00
Michał Cieślak c78eaef2b6 chore(CommunityPermissions): Permissions model and backend API simplified, separation of concerns improved 2023-02-20 18:40:59 +01:00
Michał Cieślak 9757002c7d chore(CommunityPermissions): Permissions model & backend API simplified, dirty state handling simplified
Additionally, permission types metadata excluded to PermissionTypes
singleton component, PermissionsDropdown simplified by using inline
components.
2023-02-20 18:40:59 +01:00
Michał Cieślak 7388bbfef3 chore(CommunityPermissionsView): component api unified and simplified 2023-02-20 18:40:59 +01:00
Michał Cieślak 0af9c27910 chore(CommunityNewPermissionView): simplified by introducing ModelsComparator component for tracking dirty state
Closes: #8830
2023-02-20 18:40:59 +01:00
Michał Cieślak 9f884605cb chore(CommunityNewPermissionView): Operations on models excluded to ModelUtils singleton 2023-02-20 18:40:59 +01:00
Michał Cieślak fb19385438 chore(CommunityNewPermissionView): refactor to improve separation of concerns, create/save actions moved up 2023-02-20 18:40:59 +01:00
Michał Cieślak 3a3d1657f0 chore(CommunityNewPermissionView): exclude subcomponent HidePermissionPanel 2023-02-20 18:40:59 +01:00
Michał Cieślak 9a0c682ca4 chore(CommunityNewPermissionView): Simplify dirty values handling, extend Storybook page 2023-02-20 18:40:59 +01:00
Michał Cieślak 411c2a0aab chore(CommunityNewPermissionView): refactor save/reset changes handlers 2023-02-20 18:40:59 +01:00
Lukáš Tinkl b8f6cbcfa1 fix(i18n): properly format floating point numbers
- the percentage/changes were left untreated
2023-02-20 12:44:36 +01:00
Noelia c1e3050d06 feat(MintingTokens): Created welcome view
- Created minting tokens welcome view.
- Added basic navigations.

Closes #8732
2023-02-20 12:06:22 +01:00
Noelia 8e9ae308d5 fix(qmlWarnings): Fixed minting module related warnings
Fixed minting module related warnings
2023-02-20 12:06:22 +01:00
Noelia 17fc999ca0 feat(CommunitySettings): Created base welcome settings view
- Component parametrised and renamed to `CommunityWelcomeSettingsView`. It will be the base class for some of the community settings functionalities.
- Updated `CommunityPermissionsSettingsPanel` to use the new welcome screen class.
2023-02-20 12:06:22 +01:00
MishkaRogachev b70e1f0fb4 feat(ActivityCenter): Add indication for visited/unvisited AC state
Close #347
2023-02-17 16:13:43 +04:00
Sale Djenic 8cc80694e2 fix(@desktop/general): qml warnings caused by undefined context props handled 2023-02-17 12:25:44 +01:00
Lukáš Tinkl 31be818e0e fix: Pinning messages - tweaks to UI and interactions
... to help align with original design intent

- dropped date breaks before msg groups
- show full date/timestamp in the msg header
- floating "Unpin" button on mouse hover
- no padding/spacing between messages
- some smaller code cleanups and dead code removals

Fixes #9396
2023-02-17 11:22:21 +01:00
Noelia fe5abb60da feat(TokensPermissionsPoupup): Created new popup
- Created new dialog.
- Created storybook page for that.
- Model properties renames.

Closes #9433
2023-02-17 11:13:51 +02:00
Alex Jbanca 009861c7b4 fix(SplashScreen): Add Did You Know Splash screen
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.
2023-02-16 16:06:50 +02:00
Michał Cieślak c05334c327 chore(CommunityPermissions): Use enum for token category, keep string labels in UI only
Closes: #9556
2023-02-16 13:39:55 +01:00
Stefan 3bb667bb7a feat(Wallet) cache fetched balance history to DB for efficiency
- 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
2023-02-15 18:52:37 +04:00
Alex Jbanca f9f860a215 fix(LinksMessageView): Refactor LinksMessageView to remove business logic from qml
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.
2023-02-14 08:55:24 +02:00
Lukáš Tinkl 32dc26cba7 fix(ENS): For a ENS name the wrong release date is shown
`int` is not enough for a timestamp

Fixes #9381
2023-02-13 19:39:40 +01:00
Michal Iskierko b6f5c558a9 feat(@desktop:communities): Minting functionality with dummy data
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
2023-02-13 13:42:29 +01:00
Sale Djenic a12e599be2 feat(@desktop/wallet): adding wallet derivation path updates
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
2023-02-13 10:41:53 +01:00
Noelia 2c809a56e6 feat(JoinCommunity): Integrated join community popup into the new view `JoinCommunityView`
- Integrated join community popup into the new view `JoinCommunityView`.
- Added support in storybook related page.

Closes #9268
2023-02-10 18:03:05 +02:00
Lukáš Tinkl eafee302d8 fix: pasting a user's profile link in the ad-hoc chat search
... doesn't work in the community section

Extract the `Chat.RootStore` as a toplevel/shared property and pass it
down to ChatLayouts, instead of cross referencing it between different
components. This was also problematic since the ChatLayouts now live
inside a Loader, so it's more appropriate to refer to the
`Chat.RootStore` directly, instead of
`personalChatLayoutLoader.item.rootStore`, since the
`personalChatLayoutLoader.item` might not be visible (due to it being
inside a Loader and a StackLayout) or it might even be a different
component (`loadingStateComponent` or `errorStateComponent`).

This also caused similar problems for other components, such as
ActivityCenterPopup or StatusStickersPopup.

Fixes #9513
2023-02-10 11:23:26 +01:00
Noelia 8e45d6c50e feat(JoinCommunity): Created `JoinCommunityView` page
Created new view to be used when a community needs permissions to join:
- Left panel blur layout created.
- Header panel blur layout created.
- Central panel blur layout created.
- Join permission overlay panel integrated.

Closes #9267
2023-02-10 10:45:38 +02:00
Noelia ec8b03be6e feat(JoinCommunity): Created join permission overlay panel
Created needed components to display permission requirements to join a community.

Part of #9267
2023-02-10 10:45:38 +02:00
Noelia 842c90a31e feat(Community): Create `CommunityColumnHeaderPanel` component
- `CommunityColumnHeaderPanel` created.
- Added corresponding `storybook` page.
- Modified `CommunityColumnView` to use new component `CommunityColumnHeaderPanel` instead.
2023-02-10 10:45:38 +02:00
Lukáš Tinkl f5d6c538c2 chore: consolidate & refactor popup handling
- all remaining global popup components moved into a separate Popups
entity
- removed some static objects from the Global singleton (appMain,
pinnedMessagesPopup, communityProfilePopup, sounds); rationale:
singletons should not contain any state
- fixed support for popups in storybook
- fixed some warnings (most of them broke the popups in one way or the other)
2023-02-09 15:01:57 +01:00
mprakhov 36dc3e4c53 fix(@desktop/chats): Scroll chat to the bottom or last unread msg when chat is first time opening 2023-02-09 13:54:08 +02:00
Lukáš Tinkl 4dc97dde1a chore: unbreak bad merge
utils is imported twice
2023-02-09 12:02:35 +01:00
Jonathan Rainville f8ecd9dbce refactor(chat): make getChats async to speed up start time
Fixes #9340
2023-02-08 16:18:44 -05:00
Stefan 9b7c2b15c0 fix(wallet): add wallet account - enable advanced section all the time
Closes: #9357
2023-02-08 19:53:09 +01:00
Alexandra Betouni aa2e6386a2 fix(statusApp): resolving qml errors/warnings pt2.1
Relates to #8864
2023-02-08 18:43:51 +02:00
Alexandra Betouni d553934b45 fix(popups): set scrollview sizing 2023-02-08 18:43:51 +02:00
Lukáš Tinkl 6f9149428d fix: changing password with wrong current one fails
do not break/overwrite the Submit button's `enabled` property binding

Fixes #9465
2023-02-08 16:26:12 +02:00
Anthony Laibe 8ba10ce6b0 fix(@wallet): display network short name for collectible
fixes #8850
2023-02-08 09:26:59 +01:00
Khushboo Mehta 9e23f78180 feat(@desktop/wallet): Implement loading state for collectibles
fixes #9106
2023-02-08 09:25:04 +01:00
Anthony Laibe bc353a1ccc chores(@wallet): remove revert reason
It is never being used + couldn't get it from our node
2023-02-07 09:09:35 +01:00
Sale Djenic 3f52df4f87 fix(@desktop/wallet): opening add account popup causes the app to crash
Fixes: #9412
2023-02-03 12:57:39 +01:00
Sale Djenic 224fd3f42d fix(@desktop/general): invalid pin saved to keychain when enabling biometrics on account using keycard
Fixes: #7729
2023-02-03 10:55:22 +01:00
Lukáš Tinkl 78f4560a54 Nothing happens after clicking on a pinned message
implement jumping to message on a simple click

Fixes #9365
2023-02-02 18:33:19 +02:00
Lukáš Tinkl edc94c9d8d fix: unbreak community options layout
got broken with the recent scroll view fixes
2023-02-02 18:27:22 +02:00
Michał Cieślak dc3bcd7da1 feat(Community Permissions): Integrate In section with permission creation/editing
Closes: #8855
2023-02-02 16:36:46 +01:00