Commit Graph

22 Commits

Author SHA1 Message Date
Richard Ramos 285f54dab6 EIP1559 2021-09-10 13:42:19 -04:00
Anthony Laibe 9e53c23596 fix(@desktop/wallet): Do not allow decimal number for gas limit
fixes #3048
2021-08-02 16:49:03 -04:00
Anthony Laibe 54570bce6e fix(@desktop/translation): update translation
fixes #2993
2021-07-23 16:35:23 -04:00
Richard Ramos 6564bd8497 fix: make gas selector visible in transaction modals
Fixes #2434.  Modals that were affected by this issue were
- RegisterENSModal (for registeing an ens username)
- SetPubKeyModal (for changing the contact code of an already owned ens)
- StatusStickerPackPurchaseModal (for acquiring a sticker pack)
2021-07-20 10:29:54 -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
Sale Djenic 6f55c51ff2 fix(wallet): Crash when enter -1 to Gas Selector
Validation check is updated, so user cannot enter zero or less than zero value for "gas amount limit" or "per-gas overall limit".
In gas.nim a crash prevention check is added.

Fixes: #2753
2021-07-06 10:46:07 -04:00
Jonathan Rainville f71870cb8f fix(wallet): fix gas price being 0 and add back validation
Fixes #2668
2021-06-29 07:54:53 -04:00
Jonathan Rainville 4a407d9204 fix: fix not enough ETH for gas validation error on open 2021-06-04 14:02:51 -04:00
Jonathan Rainville cbdbb6eb8b feat(wallet): redesign gas selector for new EIP
Fixes #2536
2021-06-04 14:02:51 -04:00
Jonathan Rainville 0e699cac65 chore: run translation scripts 2021-02-18 15:23:58 -05:00
Pascal Precht 62183fb414 refactor: replace StyledButton with StatusButton
There are some inconcistencies in the application when it comes to
button UI elements because we're using `StatusButton` in some places,
in other we use `StyledButton`. The latter is the original
component we've created when we started out building Status
Desktop, but is planned to be removed entirely in favour of
`StatusButton`.

This commit replaces the usages of `StyledButton` with `StatusButton`
2021-02-02 10:57:42 +01:00
emizzle 7e1d7be314 feat: load installed stickers while offline
When the network connection is changed, the sticker packs are cleared and then re-loaded (either loading the offline (installed) sticker packs, or all the sticker packs from the network).

Stickers can be sent while offline, though the sticker images do not load once offline (this is likely a side effect of the bug described below).

There is a known bug in QNetworkAccessManager (https://bugreports.qt.io/browse/QTBUG-55180) that was re-introduced in 5.14.1 that does not allow us to download resources if we go offline then come back online. The workaround employed in this PR manually sets the NetworkAccessible property of QNetworkAccessManager once we have been connected back online. The NetworkAccessible property is marked as obsolete and will be removed in Qt6, so it is something that we need to be aware of when we upgrade. However the hope is that the bug has been fixed.

Close StickersPopup when disconnected from network (so that re-loading of sticker packs doesn't look out of place).

fix: set network status correctly at load

feat: stickers gas estimate async

feat: When network re-connected, any http images that were not properly loaded in an ImageLoader component will automatically be reloaded.

fix: Sticker button loading icon

chore: Bump nimqml and dotherside

NOTE: This PR uses an updated nimqml and dotherside. The respective changes should be merged first, and the commit hash should be bumped in this PR prior to merging. Relevant PRs:

[https://github.com/status-im/dotherside/pull/20](https://github.com/status-im/dotherside/pull/20)

[https://github.com/status-im/nimqml/pull/17](https://github.com/status-im/nimqml/pull/17)
2020-12-28 14:29:38 -05: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
Pascal Precht c6cc426f22 chore: move StatusSlider into UI library 2020-09-17 15:16:40 -04:00
Pascal Precht e0adc3056e chore: update translations
Closes #801 #841
2020-09-17 15:16:09 -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
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
Jonathan Rainville d03e9807ef refactor: chnage GasSelector Input to use anchors instead of width 2020-08-19 14:49:19 -04:00
Pascal Precht c6d858d84a chore: improve GasSelector Component
This commit fine-tunes the layout of the advanced modal input controls.
It also adds validation so that only numeric values are accepted as
gas price and gas limit values
2020-08-19 14:49:19 -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
Pascal Precht 832518a0e1 feat(GasSelector): introduce GasSelector component
Closes #674
2020-08-17 14:08:28 -04:00