Commit Graph

14 Commits

Author SHA1 Message Date
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
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
Jonathan Rainville 2716abf096 fix(wallet): make it possible to send a 0 tx with a warning
Fixes #2652
2021-07-12 17:11:41 -04:00
Sale Djenic a9fd4513aa fix(wallet): Clicking Request Address when sending -1 STT crashes the app
Validation check is updated, so user cannot enter zero or less than zero value in amount input field.
Also in utils.nim a crash prevention check is added so if we try to convert a less than zero float number to an unsigned number, app won't crash any more, but that casting will return a zero as unsigned int number.

Fixes: #2755
2021-07-06 10:45:25 -04:00
emizzle e0e1487643 refactor: replace transaction modal `reset` functionality
The transaction component's `reset` functionality was meant ot reset a form when the modal was closed. It was difficult to manage and added extra overhead for each additional transaction modal created.

Instead of using reset functions, we can use Loaders to load and destroy the modal's as they are opened and closed. We do not need to keep them in memory and then also reset their functions. It creates a smaller memory footprint to destroy the object and reload on open.

feat: load gas prediction prices asynchronously
2020-11-26 11:17:24 -05:00
emizzle bc1525f513 feat: 1-on-1 chat command ENS flow
1-on-1 chat command to send and request a transaction to/from a contact with ENS enabled.
2020-11-05 11:25:45 -05: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
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
Jonathan Rainville 0c686c3fcf chore: run qstrConverter script 2020-08-27 17:09:37 -04:00
Pascal Precht 84481ff308 fix(AssetAndAmountSelector): correct function name 2020-08-20 14:22:26 -04:00
emizzle 3dac87df3d feat/tx-comps: Add TransactionPreview component
Adds a TransactionPreview component as per the spec https://www.notion.so/emizzle/Wallet-transaction-components-2003b78a8d0d41c4ab3d21eb2496fb20

- update ReceiveModal dropdown to match design
- long alias and account name support
- long name support in account selector
- strip all trailing zeros from displayed balances
2020-08-19 14:38:45 -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
Pascal Precht 56568f68c8 feat: introduce AssetAndAmountInput component
Closes #673
2020-08-10 09:32:01 -04:00