Commit Graph

499 Commits

Author SHA1 Message Date
Richard Ramos f2a56c70e1 fix: rebase gone wrong 2020-09-11 13:25:55 -04:00
Richard Ramos 2f1416e042 feat: check if a transaction is confirmed before installing a sticker pack 2020-09-11 12:46:13 -04:00
emizzle 80f0f9466b refactor: move stickers to own model
Remove from ChatModel and add StickerModel

# Conflicts:
#	src/app/chat/view.nim
#	src/status/chat.nim
#	src/status/libstatus/contracts.nim
2020-09-11 12:46:13 -04:00
emizzle 366fdc15a1 feat: show stickers purchased from non-main account
Fixes: #815

Previously, only stickers purchased from the main status account were shown. Now, stickers purchased from any of the accounts are shown.

Accounts include any accounts returned by `accounts_getAccounts` and are non-chat accounts.
2020-09-11 12:01:08 -04:00
emizzle 2a36bcc762 change dynamicbytes to be more dynamic
![more dynamicer](https://tenor.com/view/more-cowbell-cowbell-snl-reaction-mrw-gif-14076918.gif)
2020-09-11 12:01:08 -04:00
emizzle 2c7dd929ad feat: enable token transactions
Fixes #788.
Fixes #853.
Fixes #856.

refactor: gas estimation and transaction sends have been abstracted to  allow calling `estimateGas`, `send`, and `call` on the contract method (similar to the web3 API).

Moved sticker pack gas estimation and purchase tx over to the new API

*Sticker purchase:*
 - gas estimate is done using new API and debounced using a timer

*Wallet send transaction:*
 - tokens can now be sent
 - gas is estimated correctly for a token tx, and debounced using a timer

***NOTE***
1. If attempting to send tokens on testnet, you must use a custom token as the token addresses in the pre-built list are for mainnet and will not work on testnet.
2. The new API should support all existing gas estimates, send txs, and calls. The loading of sticker pack data, balance, count, purchased sticker packs, etc, can be moved over to the new API. Almost all of the `eth_sendTransaction`, `eth_gasEstimate`, and `eth_call` could be move over as well (that's the idea at least).
2020-09-11 12:01:08 -04:00
emizzle 4f0cdad8c7 refactor: move stickers to own model
Remove from ChatModel and add StickerModel
2020-09-11 12:01:08 -04:00
Pascal Precht 729a2781f0 feat(TransactionModal): introduce async validation for ENS names
This commit extends the AddressInput to perform ENS lookups when valid
ENS values are entered. The lookup happens asynchronously, so we show a loading
indicator as the request is happening.

Closes #790
2020-09-10 13:40:42 -04:00
Richard Ramos 24212a63e9 feat: testnet tokens 2020-09-09 16:35:51 -04:00
Richard Ramos 27abf30fc8 feat: list, toggle and remove custom tokens 2020-09-09 16:10:51 -04:00
Jonathan Rainville f3f27a5e59 fix: address more comments about the chat commands 2020-09-09 15:03:45 -04:00
Jonathan Rainville 348e0a9bdc fix: address review comments for the send forms 2020-09-09 15:03:45 -04:00
Jonathan Rainville 6b3cac31bc feat: enable sending chat requests 2020-09-09 15:03:45 -04:00
Jonathan Rainville 60492b4db1 feat: add chat command bubbles for received txs 2020-09-09 15:03:45 -04:00
Iuri Matias aeb8d2958d display first menu option; include channel id 2020-09-09 14:08:19 -04:00
Pascal Precht 4bea011417 uiux(Chat): show loading indicator when fetching more messages 2020-09-08 14:09:09 -04:00
Iuri Matias f573574d9a fix addresses of some tokens 2020-09-07 16:37:06 -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
Pascal Precht 1481f2648f feat: introduce "fetch more messages" button to request old messages
Closes #149
2020-09-07 10:20:17 -04:00
hydr063n 3ea3b618a0 change title from Nim Status Client to Status Desktop 2020-09-07 09:30:02 -04:00
Richard Ramos 057cdc08da feat: update balances when receiving a transaction 2020-09-04 17:21:40 -04:00
Richard Ramos d4e0ef6619 feat: receive wallet events and bump nim-status 2020-09-04 17:21:40 -04:00
Richard Ramos e52d287cf9 refactor: move signals to status and generate events 2020-09-04 16:42:26 -04:00
Richard Ramos 9ef82a2d7a fix: token decimals and returning no collectibles when there's no contract for a collectible on the current network
Fixes #773
2020-09-04 16:36:20 -04:00
emizzle d8b0145eb3 feat: Add Sticker purchase transaction modal
Add gas estimate for sticker pack purchase.

Update transaction for sticker pack purchase.

Add GasValidator component which validates gas is selected correctly and displays an error message if not. This component is not visible until it is not valid (at which point the valdiation error message is displayed).

In a future PR, need to:
1. estimate gas for token txfer (sendTransaction) via a normalised method for estimating gas for EthSend
2. move sticker pack purchase to use an EthSend object so gas can be estimated and tx sent
2020-09-04 16:13:33 -04:00
Richard Ramos 374da83cff feat: receive wallet events and bump nim-status 2020-09-04 15:57:29 -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
Pascal Precht addd1d9c3e chore(chat): request mailserver messages since last request
Prior to this commit, the app would request messages from the last
24 hours for all joined channels.
The changes made here ensure that messages since the *last* request
are requested. The last request for each topic/chat is stored in the
nodes mailserver topics.

When no channels are joined, the default is still 24 hours, however,
as soon as a channel is joined, the last request time will be updated
and honored in the next request.
2020-09-03 15:58:49 -04:00
Richard Ramos 782e89508c fix: escape html in messages 2020-09-03 15:47:05 -04:00
emizzle 1e020a203c feat(tx-comps): Send transaction modal
Fixes #669.

Composes all tx components to create a send transaction modal for the wallet.

1. Add a reusable TransactionStackView component that wraps a StackView component to show the screens of the Send Tx modal and handles back/forward/reset functionality.
2. Add a reusable TransactionStackGroup which holds tx components and allows modal header and button text to be defined and handles validation for all child components.
3. Add an isValid property to all tx comps for pristine validation state.
4. Reset all components in modal once modal is closed. This consists of a `resetInternal` function that each component should implement to reinstate its original starting state, and a `reset` function that parent components can use to reinstate the overridden properties.
5. Tx error handling to display either a StatusGo error message in the dialog, or wrong password in the TransactionSigner.
6. Fix ReceiveModal to allow for pre-selected account based on current wallet account.
7. Add focused border colour to Input component.
8. Fix issue with last TransactionStackGroup input not being able to obtain focus.
9. Fix fiatBalance not appearing on initial load on AccountSelector.
10. Fix selected asset updated properly when assets changed in the AssetSelector component.
11. AccountSelector is pre-populated with selected wallet account. Supporting work on the components has been done to suppor this.
12. Changing accounts in the "from account" updates the asset balances in the AssetAndAmountInput component.
13. Move validation from ContactSelector to the Select component.

1. Test sending of tokens. This requires that tokens contracts are setup on testnet. Right now, they are set up for contract addresses on mainnet.
2. Loading state once transaction is sent. Button in modal needs to move to a loading state and the "toast" messages in the wallet need to appear informaing user of tx progress.
3. Need to clarify (and implement?) support of ENS names in the AddressInput. It appears that ENS names could be resolved. This would be a long operation and require some kind of UI loading indication.
4. Wallet balances need to be updated on every block, so for example, sending funds between accounts I should be able to see the balance updated in real time.

1. Sending to a contact currently doesn't work because the ContactSelector component selects the Contact's whipser key, instead of his/her wallet address. May need to figure out how this is done in status-react. As it stands, attempting to send to a contact will crash the app.
2. Sending *from* an imported account does not work, with an error from StatusGo `cannot locate account for address: 0x123...`
2020-09-03 15:32:55 -04:00
Pascal Precht fb83886086 fix(Chat): ensure only mentions with leading whitespace are replaced 2020-09-01 11:54:44 +02:00
Richard Ramos 84df214f6f fix: handle message reactions for old messages not loaded 2020-08-28 13:38:54 -04:00
Richard Ramos d134ef8e45 fix: disable on testnet 2020-08-28 11:31:35 -04:00
Richard Ramos 8bf2e394c6 fix: update contract address on ropsten and use label instead of namehash 2020-08-28 11:31:35 -04:00
Richard Ramos 7d4c4ac4c7 feat: change pubkeys for already owned ens usernames 2020-08-28 11:31:35 -04:00
Richard Ramos 7df357dcf7 feat: show terms and conditions, add ens registry contract, and determine if you have enough SNT balance. 2020-08-28 11:31:35 -04:00
Richard Ramos 8f1f01b6a0 feat: register status ens usernames 2020-08-28 11:31:35 -04:00
Richard Ramos ce8cd4183f feat: show terms and conditions, add ens registry contract, and determine if you have enough SNT balance. 2020-08-28 11:06:12 -04:00
Jonathan Rainville fef2e6651d feat: add stickers to collectibles 2020-08-28 11:05:19 -04:00
Pascal Precht bdfdf263cc fix(Chat): Allow for case insensitive pubkey replacement
When entering a user name like `@Pascal` it wouldn't be properly replaced
with the pubKey of `pascal.stateofus.eth` since it was comparing to `@pascal`

This commit ensures simple user name mentions are properly matched against
their ens names regardles of their case.

Fixes part of #769
2020-08-27 17:38:32 -04:00
Jonathan Rainville d19f15bb84 fix: fix chat links in a couple of ways
- link color in compact mode
- channel links did not have a #
- clicking on a mention should show that profile
- The AddChat button image didn't reposition when closing
2020-08-27 17:09:04 -04:00
Pascal Precht f47fda6d68 fix(Chat): ensure new active channel messages are marked as seen
Also, selecting a channel with unread messages marks them as seen as well

Closes #738
2020-08-27 17:00:08 -04:00
Jonathan Rainville 22a86b939f refactor: do not cache the mnemonic in settings 2020-08-27 16:42:25 -04:00
Jonathan Rainville bd9e1619fa refactor: never save mnemonic in memory unless totally necessary
Necessary cases are:
- Onboarding to show the list of 5 accounts
- In QML when we show it to the user for the backup
  - Change it to a Loader, so the component and its memory is cleaned when closed
2020-08-27 16:42:25 -04:00
Jonathan Rainville 31699efc39 chore: remove forgotten log 2020-08-27 16:34:35 -04:00
Jonathan Rainville 5f119e1ead feat: enable removing emoji reactions from the context menu 2020-08-27 16:34:35 -04:00
Jonathan Rainville 99ca0e9e55 feat: enable adding reactions to chat messages from the menu 2020-08-27 16:34:35 -04:00
Jonathan Rainville 72af6adb69 feat: get and display emoji reactions in chat 2020-08-27 16:34:35 -04:00
Jonathan Rainville 273d565e9e fix: fix mailserver getting a random with a possible wrong index 2020-08-25 11:49:43 -04:00
Jonathan Rainville 898bb27b56 feat: save collectiblesList to WalletAccount 2020-08-25 11:49:11 -04:00
Jonathan Rainville 68a903e3f0 feat: add error management to the collectibles
plus reload button

(cherry picked from commit 718f806557ffb041263e035845a21c2f7126807c)
2020-08-25 11:49:11 -04:00
Jonathan Rainville 9d8fe87fd8 Revert "feat: add error management to the collectibles"
This reverts commit 9eaf0a2d90.
2020-08-25 09:19:28 -04:00
Jonathan Rainville 9eaf0a2d90 feat: add error management to the collectibles
plus reload button

(cherry picked from commit 718f806557ffb041263e035845a21c2f7126807c)
2020-08-25 09:18:50 -04:00
Jonathan Rainville 3219b0f5f4 refactor: refactor collectibles to be loaded individually 2020-08-25 09:15:01 -04:00
Jonathan Rainville 95f4bd8d09 fix: fix pixelated icon and add description and URL for kudos 2020-08-25 09:15:01 -04:00
Jonathan Rainville f083310193 feat: make all collectibles work and fix Cryptokitties 2020-08-20 14:21:20 -04:00
Pascal Precht b528e784c9 feat: introduce TransactionSigner UI component
Closes #676
2020-08-19 15:33:05 -04:00
Pascal Precht ef22fb348d feat: allow users to mute and unmute channels
Closes #152
2020-08-19 14:39:31 -04:00
Pascal Precht 832518a0e1 feat(GasSelector): introduce GasSelector component
Closes #674
2020-08-17 14:08:28 -04:00
emizzle 3ff93c26e6 fix/tx-comps: Update assets when tokens changed
When tokens are added/removed, the asset list in the AssetAndAmountInput is updated.

The selected asset can be specified by the parent component which is needed for things like sticker market where we need to set SNT as the fixed token.

Improved the validation for the component:
 - validate() can be called externally
 - validation display is handled internally and messages can be customised
 - validation error messages are handled by the Input component and validation UX is consistent with other tx components
2020-08-13 14:39:43 -04:00
emizzle d07daac377
feat/tx-comps: Add RecipientSelector component
Based on the spec in https://www.notion.so/emizzle/Wallet-transaction-components-2003b78a8d0d41c4ab3d21eb2496fb20, this component handles user input for a recipient address, which can be sourced from manual address input, ENS name, contact selection, or another of the user's wallet accounts.
2020-08-13 09:28:35 +02:00
Jonathan Rainville 9466714d90 change path to resources 2020-08-11 17:51:35 -04:00
Jonathan Rainville acc067d536 fix: make packaged translations work 2020-08-11 17:51:35 -04:00
Richard Ramos 9b35a01103 fix: group chat colors and adding nbsp; only when the message is from the current user 2020-08-11 14:35:03 -04:00
Richard Ramos 477f5aa460
feat: display empty state when user has no contacts 2020-08-11 08:39:10 -04:00
Richard Ramos edbb183242
fix: show ens and alias on profile popup header 2020-08-11 08:39:10 -04:00
Richard Ramos e96f3ed47f
fix: display ens names with correct format in all screens 2020-08-11 08:39:07 -04:00
Richard Ramos 71fee14add feat: show ENS username details 2020-08-10 10:27:56 -04:00
Richard Ramos 9d5c71fb4e feat: load stickerpacks async 2020-08-10 10:27:38 -04:00
Richard Ramos c53b2cc78a feat: select preferred ENS username 2020-08-10 09:47:25 -04:00
Jonathan Rainville 156aaba0aa feat: improve style of the notification box
Use the Channel box for that
2020-08-10 09:34:02 -04:00
Pascal Precht 441d58a4cb refactor: rename getFiatValue to convertValue 2020-08-10 09:32:01 -04:00
Pascal Precht 56568f68c8 feat: introduce AssetAndAmountInput component
Closes #673
2020-08-10 09:32:01 -04:00
Pascal Precht d62d8b3a92 refactor: rename Asset.fiatValue -> Asset.fiatBalanceDisplay
This is done because `fiatValue` included the currency symbol
2020-08-10 09:32:01 -04:00
emizzle b6884a5170 feat: encode contract calls 2020-08-10 09:25:44 -04:00
Richard Ramos e484c41291
fix: alignment of emojis
- Added an nsbp in front of paragraphs, otherwise the alignment property was ignored
- Enabled richformat for channel list to avoid emoji overlap in last message
2020-08-06 15:48:06 -04:00
Richard Ramos 40e8802218
feat: list preferred username, available ens names and send preferred username on new messages 2020-08-06 17:07:48 +02:00
Richard Ramos 43f4f8775b
feat: connect existing status ens username
- Show welcome page only when there are no ens names registered
- If you already have an ens username for the current account, connect and mark it as preferred name
- State machine navigation
2020-08-06 16:56:46 +02:00
Richard Ramos 5e7eefe553
feat: search ens names for registration 2020-08-06 16:03:11 +02:00
Jonathan Rainville 32b0e185db
feat: add channel list context menu 2020-08-06 15:49:54 +02:00
emizzle 9374be5857
feat: Send transaction component -- Account selector
Fixes #670.

Component spec based on https://www.notion.so/emizzle/Wallet-transaction-components-2003b78a8d0d41c4ab3d21eb2496fb20.

Changes the current Select shared component to a model databound component. This means we can bind directly to `QAbstractListModel`'s coming from Nim instead of needing manipulating the data in to javascript objects. The changes to the Select component will be used for the upcoming Asset selector shared component.
2020-08-05 16:38:49 +10:00
Richard Ramos cb92c1dc14
fix: incorrect mentions behavior when text contains emojies 2020-08-04 10:19:42 -04:00
Richard Ramos 459de8cd1c
fix: display emojis on input textarea 2020-08-04 10:14:57 -04:00
Richard Ramos d066b59f81
feat: load transaction history async 2020-07-31 11:48:41 -04:00
Richard Ramos 5ab1088f7c
feat: play audio messages 2020-07-30 13:49:50 -04:00
Richard Ramos 484c647f39
fix: get collectibles failure when using testnet 2020-07-30 12:24:01 -04:00
Richard Ramos 6e62df9109
feat: Load collectibles async 2020-07-29 17:43:10 -04:00
Richard Ramos 087bd1d20d
fix: generate wallet addresses 2020-07-29 17:29:24 -04:00
Jonathan Rainville edda9dba6e
fix: fix Windows not showing username because of missing cstring
(cherry picked from commit 52ab82f667ae5f003ab8da964f364e6aae3cebdc)
2020-07-29 16:41:52 -04:00
Richard Ramos b4a70d6aa4
fix: create copy of signal data 2020-07-29 16:13:33 -04:00
Richard Ramos 7fd1f9c468 fix: send emoji contentType 2020-07-28 15:35:06 -05:00
Richard Ramos e91cd9e610 fix: validate mnemonic format when importing a existing key 2020-07-28 22:22:50 +02:00
Richard Ramos b3fcd394de fix: show disconnected/connected banner on load 2020-07-24 11:42:58 -04:00
Richard Ramos 83d2e274ff fix: show disconnected/connected banner on load 2020-07-24 11:04:47 -04:00
Pascal Precht e18188514a feat(profile): implement contact management
This introduces the ability to:

- list search existing contacts
- block contacts
- unblock contacts
- list blocked contacts
- remove contacts
- search and add contacts

Closes #608
2020-07-24 09:37:32 -04:00
Jonathan Rainville 9604faff08 feat: add New messages box in chat when scrolling up 2020-07-23 17:01:04 -04:00
Jonathan Rainville c73da6accf fix: fix chat list scrolling down when user was looking up the chats 2020-07-23 17:00:41 -04:00
Richard Ramos 90236e89e9 fix: set initial disconnected status 2020-07-23 15:59:55 -04:00
Jonathan Rainville 145519719b fix: fix MyProfile not having the right data 2020-07-23 15:59:18 -04:00
Richard Ramos e8d08e08cc fix: mark messages as read only if there are unviewed messages 2020-07-23 15:55:26 -04:00