Commit Graph

27 Commits

Author SHA1 Message Date
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
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
Pascal Precht 0b5a51177f core: update token icon assets
Closes #2019
2021-04-13 15:12:12 -04:00
ace-smart 4c31a97db8 Fixed wrong color issue of the wallet layout. Fixes #1903 2021-02-25 15:43:14 -05:00
Richard Ramos f88a05e2f5 Various ui fixes on wallet
- Show scrollbars in asset list if needed
- Show scrollbars in account list if needed
- Fix margin between assets
- Add symbol to asset amounts
- Stop scrolling at element bounds
2020-12-01 13:29:12 -05:00
Jonathan Rainville 84ff2b21a9 fix: fix a couple of QML warnings 2020-10-27 10:23:40 -04:00
hydr063n 7a5060da32 feat: load more transactions with a button
use qstrid; trx width and heights; add positionViewEnd; fix some qt rules;

missing semi colons
2020-10-05 10:50:35 -04:00
hydr063n 3229fc06e6 feat: beautify the hex values in transaction history
beautify nonce too

ammend the code to call conversion functions from qt instead

move to utils

var to let
2020-10-05 10:46:00 -04:00
Pascal Precht f0939a01fe chore: update i18n 2020-09-18 17:23:35 -04:00
Jonathan Rainville 17aa8d274e fix: fix defaultTokenList use in QML 2020-09-14 14:54:17 -04:00
Richard Ramos 98aaa69e9d fix: transaction history handling
- Determine if the recent transaction history is being fetched or available before obtaining the first 20 transactions
- On account change, reset the selected tab to show the asset list
- Collectibles were kinda pixelated/blurry (not anymore)

Fixes #806
2020-09-07 12:54:59 -04:00
Richard Ramos 0b6643ac2d feat: show SNT by default in the token list, and STT in ropsten
fixes #805
2020-09-03 16:06:20 -04:00
Richard Ramos d066b59f81
feat: load transaction history async 2020-07-31 11:48:41 -04:00
decanus a0c5f8624c does some fixes in the history tab 2020-07-16 14:19:54 +02:00
Jonathan Rainville a529d729ea feat: change Theme to Style to enable changing Theme 2020-07-03 09:59:14 -04:00
Jonathan Rainville d90c9ba882 fix: use normal Inter for normal text and StatusInter for addresses 2020-07-02 10:51:57 -04:00
Pascal Precht 36ded19dff ui(Wallet): render asset icons in transaction list items
Closes #405
2020-06-25 10:28:23 -04:00
Michael Bradley, Jr ce7e6b8d51 chore: refactor Linux and macOS build/packaging steps
Replaces PR #105.

Implement a `pkg-macos` target that ultimately results in `Status.dmg` being
written to `pkg/`. Due to [limitations][limits] of the OpenSSL `.dylib`s in
`/usr/lib/` on macOS, `libssl.a` and `libcrypto.a` are statically linked into
`bin/nim_status_client` from a [Homebrew][brew] "bottle" that is compatible
with macOS 10.13 (the oldest macOS version compatible with Qt v5.14).

`pkg-macos` creates an `.app` bundle layout in `tmp/macos/dist` based partly on
information in a very helpful [StackOverflow answer][so-answer]. Note the part
of the answer (toward the end) that explains a problem with the working
directory and how to fix it. That's the reason for the `nim_status_client.sh`
script introduced in this commit (it gets copied into the bundle). It's also
the reason for having `Info.plist` copied into the bundle before `macdeployqt`
is run (see below) and then overwriting it with `Info.runner.plist` before
creating the `.dmg` file. The app icons file `status-icon.icns` was taken from
`deployment/macos/` in the [status-react][sr] repo.

The [`macdeployqt`][macdeployqt] tool is used to copy the needed portions of Qt
into the bundle; it automatically updates `rpath`, etc. so the
`nim_status_client` executable in the bundle can locate the libs within the
bundle.

`macdeployqt` is run twice, for the "outer" and "inner" `.app` bundles,
because of an apparent bug in `macdeployqt` that results in QtWebEngine related
resources not being processed correctly on the first pass. This results in some
bloat in the final bundle but it seems unavoidable at present.

The [create-dmg][cdmg] tool is used to package the bundle into a `.dmg`
file. There are two reasons for this:
1. It produces a nice looking icon for the `.dmg` that overlays the Status logo
on an external disk icon.
2. `Info.plist` needs to be overwritten after running `macdeployqt` (see
explanation above) but before creating the `.dmg` file. If we passed the `-dmg`
cli option to `macdeployqt` to have it generate the `.dmg` file then it
wouldn't be possible to overwrite `Info.plist`.

So there is a cosmetic reason and a practical reason for using another
tool. Probably the biggest downside is that `create-dmg` is implemented in
Node.js so it needs to be installed with `npm`; that's the reason this commit
introduces `package.json`, etc. Note that zero code from `node_modules` ends up
in the `.app` bundle or the `.dmg` file.

Code signing of the macOS `.app` bundle and `.dmg` is attempted if the
environment variable `MACOS_CODESIGN_IDENT` is defined. In that case, the
environment variable `MACOS_KEYCHAIN_OPT` may optionally be defined with the
path to a preferred keychain database file.

Refactor a number of sections in the Makefile for consistency's sake, e.g. the
`appimage` target becomes `pkg-linux` and ultimately results in
`NimStatusClient-x86_64.AppImage` being written to `pkg/`.

Make a number of changes to bring the Linux packaging steps up-to-date and use
the `-qmlimport` cli option of `linuxdeployqt` to simplify resolution of Qt
plugins.

Note that `make pkg` will correctly resolve to `make pkg-linux` or `make
pkg-macos` depending on the OS in use.

Consistently use lower-case "c" in the name of *components* directories and
imports.

[limits]: https://developer.apple.com/forums/thread/124782
[brew]: https://brew.sh/
[so-answer]: https://stackoverflow.com/a/3251285
[sr]: https://github.com/status-im/status-react/tree/develop/deployment/macos
[macdeployqt]: https://doc.qt.io/qt-5/macos-deployment.html
[cdmg]: https://github.com/sindresorhus/create-dmg
2020-06-22 10:53:57 -05:00
Jonathan Rainville 8755c901de fix: fix font loading issue and create a text component to use that font 2020-06-19 14:53:45 -04:00
Iuri Matias 0ad64cc5de update qml imports 2020-06-18 11:02:11 -04:00
Iuri Matias 365e5ab4c1 fix require for components folder 2020-06-17 18:58:39 -04:00
Pascal Precht b8ba44e982 feat: implement transaction detail modal
Closes #170
2020-06-17 13:14:38 -04:00
Pascal Precht 0f7e08075b feat(wallet): Introduce simple account transaction list
There's still some things that needs to be done (possibly in future commits):

[ ] Asset icons need to be determined so they can be displayed along the transaction
[ ] Transaction values need to be converted to decimal values
[ ] Date-time formatting
[ ] Grouping of transactions by days
2020-06-17 12:47:53 -04:00
Jonathan Rainville 3ce1883c0b feat: add files for the wallet tabs 2020-05-28 13:59:56 -04:00