Commit Graph

1429 Commits

Author SHA1 Message Date
tomFlowee 49a8a9ce34 Cleanup nice-address usage
A Payment object now has a user-typed address,
a formattedAddress which is a properly formatted cash-address
and last a 'niceAddress' which is the same cash-address but without the
chain prefix.

This cleans up the usage and removes some code from the GUI that did the
string manipulation there.
2023-05-31 15:47:14 +02:00
tomFlowee 752cc9b68a Respect amount of incoming payment request.
A payment request, for instance a QR code, which includes an amount to
be paid is expected to not change the to-be-paid amount, uses being
dropped
in the price editing UI is therefore a bit weird. Almost an
anti-pattern.

This honors that concept and when the price is included in the scanned
QR, we change the UI layout to removed the editing widgets and show
static display widgets instead.

This also adds a header menu item to edit the amount to be paid and
get back to the old UI.
Additionally, a new UI is added to show the address we are about to pay
to, likewise reachable from the header menu.
2023-05-31 15:20:11 +02:00
tomFlowee e75fb07d9c whitespace 2023-05-31 15:12:17 +02:00
tomFlowee 66ed55823d Tie instapay check to payment-address parsing.
The basic usecases of instapay is that the payment request is filled in
one go (from QR for instance) and thus we try to send.
If that fails (not enough funds or whatever), we disable instapay in
order to avoid 'magic happens' user experiences.
2023-05-31 11:14:12 +02:00
tomFlowee ce07ceb4c2 Rename WalletConfig -> AccountConfig
The account config is not owned by the wallet, which makes this naming
more logical and clear.
2023-05-31 10:42:05 +02:00
tomFlowee 98605711bf add and fix docs. 2023-05-31 10:32:44 +02:00
tomFlowee 00bcdfa796 Make GUI respond to entering a instapay limit. 2023-05-31 10:32:28 +02:00
tomFlowee 2fcf86a037 Translate months in history view
The headers and such items now get localized on the history pages.

We use static strings for the formats to avoid every call converting a c
string to a utf16 qstring, which takes an allocate and a conversion.
A tiny little amount of data kept in global memory to avoid a large
number of mallocs is a net gain, I'm pretty sure.
2023-05-30 22:03:53 +02:00
tomFlowee 3c3a166ef5 Support an extra special case 2023-05-30 20:35:12 +02:00
tomFlowee 5e40c6a312 Update translations from Crowdin 2023-05-30 20:35:12 +02:00
tomFlowee 3174b0706d Avoid notifications from 'private' accounts.
Send notifications via singleton and do not forward notitications from
private accounts when private mode is enabled.
2023-05-30 20:35:12 +02:00
tomFlowee 2724e2cd67 UX: make checkbox follow price indicator 2023-05-30 19:25:09 +02:00
tomFlowee 1e05c9f6ad Fix overlapping widgets issue 2023-05-30 19:19:57 +02:00
tomFlowee e2dacffc33 Increase version number 2023-05-30 17:06:22 +02:00
tomFlowee fbfb9941ea Fix address gap in light of multiple gaps
The design of HD wallets always has a gap, a number of addresses past
the last used one we optimistically also look at.

My code assumed that there would be only one gap, at the end while the
number of skipped addresses were near zero.
Some other wallet, however, had multiple large gaps which messed up the
algorithm.

Now we restart counting gap-addresses every time an address is used in
the sequence.

Fixes #12
2023-05-30 15:52:06 +02:00
tomFlowee 885bb593b9 Revisit the 'gap' question for the main derivation path
This should fix the problem of a certain established wallet not
importing properly.
That wallet has shown to jump 15 or 20 addresses over the gap, which
made me wonder if that actually is a privacy issue and the conclusion is
that, no, if there is no matching transaction on chain, there is no
privacy leakage from just sending the bloom filter and thus the gap has
been increased for main.
2023-05-29 23:50:06 +02:00
tomFlowee aea210270a Remove unneeded code.
This method is only called from two methods which do the locking
already, making locking it again recursively just wasting time.
2023-05-29 21:59:07 +02:00
tomFlowee 0991da4b36 Also cloak hd-main derivation addresses
Lets face it, listing loads of addresses is not readable. People can't
really get meaning out of that, its just 'data' after one or two.
Showing the hd-path-id (main or change) and an integer is going to be
much more useful for many UX situations, so we provide that information
for the UI to display that instead.

Naturally, the actual address is still available for copy/pasting etc.
2023-05-29 21:57:52 +02:00
tomFlowee 8a9647551d Make BCH price popup show on bigger area
This now makes not just the bch balance but also the
fiat-balance clickable, all the way to the left border.
2023-05-29 12:19:39 +02:00
tomFlowee 311a788346 tie a signal to the allowInstaPay property
this may fire on no change, making it imperfect. It is better in that it
actually allows propery changes to have a visual effect.
2023-05-26 08:35:03 +02:00
tomFlowee fc3b31b864 minor fixes 2023-05-26 08:31:36 +02:00
tomFlowee 0ef5d2b0fc Re-think the interaction of the ReceiveTab
This solves the UX issue that the touch-screen keyboard would
overlap on our main content and that we could actally not input
a price properly on mobile at all.
2023-05-25 23:37:41 +02:00
tomFlowee 57daf60401 Add addressShort getter
This returns the address, but without the chain prefix.
2023-05-25 21:00:46 +02:00
tomFlowee 0eca2b680c have a default width 2023-05-25 21:00:39 +02:00
tomFlowee 5c2581c592 Add PaymentBackend helper class
This makes the PriceInputWidget free to invoke.
2023-05-25 21:00:24 +02:00
tomFlowee 914e4a5d55 Also allow InstaPay config from send-tab 2023-05-19 16:29:36 +02:00
tomFlowee eb23c947fe Be nicer to touch-screens and increase hit area.
The actual touch area was exactly the checkbox, which is really not that
big an area for a finger to touch.
This assumes that the layout has 10 pixels between components and thus
we eat 5 above and 5 below this component to increase the touch-area to
the max we can.
2023-05-19 15:58:36 +02:00
tomFlowee 97a4b74bfa Include our font.
We ship our own font to not have to depend on the host system's
installed fonts for 'special' characters like arrows and stars.

This is a font forked from the Gnu-free font people, only since that one
is 2MB this is a very much stripped down version with just all the fun
stuff left.
2023-05-19 15:47:02 +02:00
tomFlowee 9ab4e63de0 Small fixlets. 2023-05-19 11:30:57 +02:00
tomFlowee 7806914fc3 Various small fixes and UX improvements. 2023-05-18 21:52:51 +02:00
tomFlowee 280678457e Cleanup code and make behavior follow docs again 2023-05-18 17:44:49 +02:00
tomFlowee 68dcf6a42f Move logic to backend.
make the front-end simpler by having a new property on the
PortfolioDataProvider which shares all existing accounts to
be shown in this Page.
2023-05-18 17:06:33 +02:00
tomFlowee 913fdd63a7 Add InstantPay configuration page. 2023-05-17 23:42:07 +02:00
tomFlowee 452fbe3e44 Allow AccountSelectorWidget to be 1 line in some cases 2023-05-17 23:27:47 +02:00
tomFlowee 76ea56bb2f Cleanup 2023-05-17 23:27:08 +02:00
tomFlowee 4c96b5ee44 Make numerickeyboard have a static height for keys.
This makes the layout look more square and not so cramped.
Make sure that the layouts of the payment pages still fit at the same
time.
2023-05-17 23:26:54 +02:00
tomFlowee 9c5476d2cc Remove dead code.
Seems to have been forgotten on refactor.
2023-05-17 22:44:31 +02:00
tomFlowee 6d648dc6e7 Make new account pages follow our UX guidelines.
This redoes most of those pages to look much nicer and in-place.

This also disables the 'create' button when the derivation path is not
correctly entered.
2023-05-17 21:23:19 +02:00
tomFlowee 469045259e Use consistent background color.
This now uses the same background color as normal line edits.
2023-05-17 21:18:11 +02:00
tomFlowee 10360f9c7f Catch exceptions from parsing user input. 2023-05-17 20:58:02 +02:00
tomFlowee edc6e5b7be Fix hiding items based on how many wallets we have. 2023-05-17 18:47:54 +02:00
tomFlowee 55dbcdced1 Add the new screen for default wallet
This new screen allows one to quickly select which wallet is the
'default'. This is a nicer design than a checkbox on each wallet.
2023-05-17 15:43:25 +02:00
tomFlowee 02ea51ac73 Supply new feature to archive a wallet.
This now brings the functionality to archive a wallet to the mobile
interface.

Archived wallets don't show up in your main view, do not synchronize
with the network and any balance they may 'contain' is ignored.
2023-05-17 14:42:42 +02:00
tomFlowee df717aa967 Set minimum size of mobile wallet.
This really only is relevent on desktop, though.
2023-05-17 14:28:24 +02:00
tomFlowee 337d441781 Replace gear icon with pen icon for this
Editing a text field is better indicated with a pencil.
2023-05-16 22:40:05 +02:00
tomFlowee 747ff27a1f Various updates and UX features
This brings the new 'privacy mode' to use the standard widgets
and make the UX more smooth.

The swiping between pages / wallets is more visually satisfying.

We update the sync label to have a live counter of how long ago
the last block came in. (both front-ends)
2023-05-16 22:05:48 +02:00
tomFlowee 033cb5962d Add feature; private wallets
A wallet can permanently be labeled a 'private wallet' which is a simple
boolean.
Then when you may need to hand over your phone to a clerk, all you do is
quickly enable the 'private mode' which is sufficiently deep in the menu
to make it hidden.

The effect is that all wallets marked private will be hidden for the
duration of that feature being on.
2023-05-16 20:17:12 +02:00
tomFlowee 1636e1e6b1 Redesign AccountList page (wallets).
The simple 'wallet-information' page is now a general wallet
configuration page.
This has commented out the future archive / encrypt parts as well.
2023-05-16 20:16:59 +02:00
tomFlowee 26df1eba92 Move EditableLabel out to its own class for reuse
On mobile we should not just show a text edit on an otherwise
labels-only screen, because the edit takes focus and opens the
on-screen keyboard. Which makes the amount of usable space
significantly less.

So make the editing user-triggered.
2023-05-16 20:16:12 +02:00
tomFlowee b218f9f0d4 Fix inconsistent capitalization of toolTipText
Follow the Qt decided usage with 2 upper case characters.
2023-05-16 20:16:12 +02:00