Commit Graph

271 Commits

Author SHA1 Message Date
Pascal Precht 87ea584b62 refactor: move `Timer` to ui/shared/controls 2021-10-14 12:51:27 -04:00
Pascal Precht e598df1d1e refactor: move `TextWithLabel` to ui/shared/panels 2021-10-14 12:51:27 -04:00
Pascal Precht e6df5c8b12 refactor: move `StyledTextEdit` to ui/shared/controls 2021-10-14 12:51:27 -04:00
Pascal Precht 61ccf9c757 refactor: move `StyledText` to ui/shared/panels 2021-10-14 12:51:27 -04:00
Pascal Precht ed73651db8 refactor: move `SplitViewHandle` and `StatusTabButton` to ui/shared/panels|controls respectively 2021-10-14 12:51:27 -04:00
Pascal Precht 4bb4708528 refactor: move `SearchBox` to ui/shared/controls 2021-10-14 12:51:27 -04:00
Pascal Precht 322a071aa3 refactor: move `SVGImage` to ui/shared/panels 2021-10-14 12:51:27 -04:00
Pascal Precht 4003f30d68 refactor: move `RoundedImage to ui/shared/panels 2021-10-14 12:51:27 -04:00
Pascal Precht fa3adb30e4 refactor: move `PopupMenu` to ui/shared/popups 2021-10-14 12:51:27 -04:00
Pascal Precht cbfe90947e refactor: move `ModalPopup` to ui/shared/popups 2021-10-14 12:51:27 -04:00
Pascal Precht bdc7c799d2 refactor: move `Input` to ui/shared/controls 2021-10-14 12:51:27 -04:00
Pascal Precht 5d05b415ba refactor: move view and panels components into controls if they belong there 2021-10-14 12:51:27 -04:00
Pascal Precht 00a61daabd refactor: move `Address` into ui/shared/panels 2021-10-14 12:51:27 -04:00
Pascal Precht 2d47223e1c refactor: move `AccountSelector` into ui/shared/panels 2021-10-14 12:51:27 -04:00
Pascal Precht 4e8f2303e6 refactor(@desktop/profile): introduce new QML and store structure in profile section
Closes #3712
2021-10-14 09:29:05 -04:00
Khushboo Mehta 80de3f75eb fix(@desktop/wallet): move QML Wallet section to new architecture
fixes #3714
2021-10-13 13:53:01 -04:00
¨Anthony e0c5e9b9b0 fix(@desktop/wallet): gas error position 2021-09-28 15:36:11 -04:00
Alexandra Betouni 4ee21ada05 feat(desktop) Added image function in Style
Introduced Style.svg() Style.png() Style.emoji() and
Style.icon() in Style.qml. Those should be used to
set the source in Images instead of using relative
paths. Usage:
Image {
   source: Style.svg("check)
   ....

Also moved all Singletons inside a new "utils"
folder and made it a QML module, to use
import utils 1.0 instead of relative paths

Closes #3678
2021-09-28 15:28:00 -04:00
Anthony Laibe 712c75f051 fix(@desktop/wallet): Fix backup warning
Also prevent backup warning to be double when we switch wallet 2 to 1
2021-09-20 12:18:16 -04:00
Richard Ramos 285f54dab6 EIP1559 2021-09-10 13:42:19 -04:00
Richard Ramos db3b7ecfd9 feat: Version Updating
Fixes #1290
2021-08-24 16:56:55 -04:00
Anthony Laibe c5d841f68d fix(@desktop/wallet): view in 'collectible' close modal
fixes #2644
2021-08-16 14:33:09 -04:00
Khushboo Mehta 09fb1a173c fix(@desktop/wallet) Truncate long wallet amount
Added logic to convert large amounts to Millions and Billions

fixes #2667
2021-08-13 15:03:24 +02:00
Anthony Laibe 08e3b330e5 fix(@desktop/wallet): correct position of not enough gas error
fixes #2714

Increase height of the modal and position the validator to below the previous
item
2021-07-28 16:03:10 -04:00
Andrei Smirnov a3979511e2 fix(@desktop/wallet): modal is not being closed when clicking Add Account 2021-07-20 10:05:52 -04:00
Anthony Laibe 4269b51ea6 feat(@desktop/wallet): display confirmation block count
fixes #2715
2021-07-19 13:33:32 -04:00
Sale Djenic 1acbc76cc9 chore(@desktop/general): run translation script
All untranslated properties are translated now using translation scripts.
2021-07-19 12:27:45 -04:00
Richard Ramos 065bd26786 fix: code review 2021-07-06 11:58:47 -04:00
Richard Ramos 5f7f899c3b refactor: separate slots for sending eth and tokens 2021-07-06 11:58:47 -04:00
Eric Mastro 77e501c478 fix(wallet): QML error when loading history
Fixes: #2725.

When clicking on the History tab for a wallet account, there was a QML error for `qrc:/app/AppLayouts/Wallet/WalletLayout.qml:113: TypeError: Property 'checkIfHistoryIsBeingFetched' of object HistoryTab_QMLTYPE_503(0x7fed35da2710) is not a function`. This must have been reintroduced when StatusQ objects were introduced. It has now been removed.

chore: change log level to warn for non-archival node
Previously, there was an error being logged for non-archival infura nodes being used (typically in dev). This log level has been reduced to a warning as the application still functions with non-archival nodes.
2021-07-06 11:28:00 -04:00
Pascal Precht 88ca3b9bbf refactor(WalletLayout): use StatusQ two panel layout 2021-06-30 15:08:26 +02:00
Jonathan Rainville b720a611c4 fix(wallet): fix loading of initial balances 2021-06-29 07:55:26 -04:00
Jonathan Rainville eb726a315c fix(hisotry): fix load more history button
Fixes #2754
2021-06-29 07:55:26 -04:00
Iuri Matias 6bcdb9ca54 refactor wallet views
add getSettings methods to src/status

fix issue with calling getSettings; document issue

remove most direct references to libstatus; document some common issues

remove most references to libstatus wallet

add mailserver layer to status lib; remove references to libstatus mailservers

remove libstatus accounts references

move types out of libstatus; remove libstatus types references

remove libstatus browser references

refactor libstatus utils references

remove more references to libstatus stickers

remove references to libstatus constants from src/app

remove more libstatus references from src/app

refactor token_list usage of libstatus

refactor stickers usage of libstatus

refactor chat usage of libstatus

remove libstatus references from the wallet view

remove logic from ens manager view

fix issue with import & namespace conflict

remove unnecessary imports

refactor provider view to not depend on libstatus

refactor provider view

refactor: move accounts specific code to its own section

fix account selection

move collectibles to their own module

update references to wallet transactions

refactor: move gas methods to their own file

refactor: extract tokens into their own file

refactor: extract ens to its own file

refactor: extract dappbrowser code to its own file

refactor: extract history related code to its own file

refactor: extract balance to its own file

refactor: extract utils to its own file

clean up wallet imports

fix: identicon for transaction commands
Fixes #2533
2021-06-17 16:11:01 -04:00
Eric Mastro 0b0a542828 fix: loading of wallet history, display of tx datetime
Fixes: #2539.

Transaction history is now correctly being fetched from status-go as per mobile. Firstly, when accounts are added (ie as watch accounts), `wallet_checkRecentHistory` must be called first so that the status-go db is populated. After that, `wallet_getTransfersByAddress` can be called. On app load, when we run the `initBalance` logic, we are calling `wallet_getTransfersByAddress`, asking for the last 20 transactions with the `loadMore` parameter set to false. When the user navigates to the Wallet > History tab, they can then click “Load More” to fetch more transactions from status-go. Once the number of transactions returns false below the expected amount, the remaining transactions to fetch have been exhausted and the “Load More” button is disabled.

feat: add non-archival node warning to the UI to indicate to the user that they may not have complete results

feat: set active account to the added account
Once an account is added to the wallet, that newly added account is selected as the active account.

1. The “load more” button is active when new transactions that aren’t already displayed are returned from `wallet_getTransfersByAddress`. This is the only way to enable or disable the “Load more” button as status-go is not able to return information regarding whether or not there are more transactions to be fetched. The downside to this is that lets say the last page of transactions is returned, but there are no more pages left. These returned txs are not currently displayed, so the “load more” button will still be enabled. However, the next click of the button will return 0 results, thus disabling it. It’s effectively an extra click to get to the disabled state.
2. For more information on how the `toBlock` parameter operates for the `wallet_getTransfersForAddress` RPC call, see https://notes.status.im/XmENTrVRRaqhwE4gK0m8Mg?view.
2021-06-10 10:47:03 +10:00
Jonathan Rainville bee54e628f feat(Activity center): add placeholder activity center
Fixes #2608
2021-05-31 15:54:18 -04:00
Richard Ramos 19d4279237 use new wallet api to receive wallet signals 2021-05-18 15:24:05 -04:00
Eric Mastro ee1287b71d fix: prevent crash on generate account wrong password
Fixes #2448.

Currently, if a wrong password is entered when generating a wallet account, the app will crash due to attempting to decode a `GeneratedAccount ` from an rpc response containing only an error.

With this PR, we are detecting if an error is returned in the response, and if so, raising a StatusGoException. This exception is caught in the call chain, and translated in to a `StatusGoError` which is serialised and sent to the QML view, where it is parsed and displayed as an invalid password error in the input box.

refactor: remove string return values as error messages in wallet model
In the wallet model, we were passing back empty strings for no error, or an error as a string. This is not only confusing, but does not benefit from leaning on the compiler and strong types. One has to read the entire code to understand if a string result is returned when there is no error instead of implicitly being able to understand there is no return type.

To alleviate this, account creation fundtions that do not need to return a value have been changed to a void return type, and raise `StatusGoException` if there is an error encountered. This can be caught in the call chain and used as necessary (ie to pass to QML).

refactor: move invalid password string detection to Utils
Currently, we are reading returned view model values and checking to see if they include a known string from Status Go that means there was an invalid password used. This string was placed in the codebased in mulitple locations.

This PR moves the string check to a Utils function and updates all the references to use the function in Utils.
2021-05-14 10:27:37 -04:00
Eric Mastro daabef3a3c fix: do not show watch-only accounts as “from address”
Fixes: #2257.

If a user had selected a watch-only address in the wallet, the backend `walletModel.currentAccount` property would also change. When loading a transaction modal, this property was used to set the `selectedAccount` value for the “from” `AccountSelector`, regardless if the account was a watch-only address.

This PR updates the logic for `selectedAccount` such that it will only allow the account to be selected if it is not a watch-only account.
2021-04-29 12:36:39 -04:00
Pascal Precht aa8d9a7f48 feat: introduce StatusLoadingIndicator component
A `StatusIcon` that rotates infinitely and can be used for indicating
pending states.

Usage:

```
StatusLoadingIndicator {
    width: 24 // default: 17
    height: 24 // default: 17
    color: "red" // default: loading asset color
}
```

This also removes `LoadingImage` component from `ui/shared`.

Closes #2360
2021-04-27 14:56:09 -04:00
Eric Mastro 58e292e9ab fix: Add close button to seed backup warning
Fixes: #2248.

Add a close button to the seed backup warning banner in the wallet. The banner will reappear upon application restart as long as the seed hasn’t already been backed up (`profileModel.mnemonic.isBackedUp`).

A new .svg with a white outline needed to be added as well because the original “close.svg” had a purple outline, which would show up when the ColorOverlay applied to the close button had an opacity less than 1.0.
2021-04-21 17:59:27 -04:00
Pascal Precht aeedc87368 feat: introduce global settings
This commit introces global settings that apply across accounts used
inside the application. This is useful when settings like the selected
locale should b the same across all accounts.

Closes #2144
2021-04-19 13:53:14 +02:00
Jonathan Rainville dae0d60684 feat: extract seed textArea to shared component and use it in wallet 2021-04-15 16:50:57 -04:00
Pascal Precht 63bc6f0e53 chore: remove unnecessary splitview props 2021-04-15 10:12:50 +02:00
Pascal Precht 153d37a7dc fix(Wallet): use correct theme colors for wallet icons in receive modal 2021-04-14 17:00:37 +02:00
Pascal Precht f2524db882 fix(Wallet): introduce hover effect for wallet accounts 2021-04-14 17:00:37 +02:00
Jonathan Rainville 8607251a6e fix: fix qml warnings 2021-04-13 17:49:43 -04:00
Pascal Precht 0b5a51177f core: update token icon assets
Closes #2019
2021-04-13 15:12:12 -04:00
Jonathan Rainville 6c0fce5b0c fix: menu dropdowns not closing on button click and position 2021-04-01 16:59:43 -04:00
Jonathan Rainville de307276c1 fix: wallet left tab button colors 2021-03-26 15:28:06 -04:00