-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time: time.Local is always UTC on Android #20455
Comments
CL https://golang.org/cl/43754 mentions this issue. |
Same issue on iOS, should I create a separate issue ? |
Yes, create a separate issue and reference this one. |
Since I wasn't able to write a patch to fix this in golang, I ended up calling this from func fixTimezone() {
out, err := exec.Command("/system/bin/getprop", "persist.sys.timezone").Output()
if err != nil {
return
}
z, err := time.LoadLocation(strings.TrimSpace(string(out)))
if err != nil {
return
}
time.Local = z
} |
I found out there's a C api available for fetching properties, which should make it much simpler to support Android timezones from golang directly (via cgo): My previous attempt in CL43754 was abandoned because it was too hard to call |
Good catch. If you mail a CL before the end of this month, it should be eligible for Go 1.11. |
I don't plan to submit any CLs, but others should feel free to do so. You will need to first get a decision one way or another about whether the time package is allowed to depend on cgo, as originally proposed in #20797 |
Do we have progress on this? |
zoneinfo_android.go at line 24 appears to show this is still a problem. It took me a while to understand this was the problem I encountered. I found a way to work around it. In case anyone else is interested I set |
CL 43754 previously proposed as a fix for this issue also ran getprop. If you're feeling adventurous, you could attempt to fix that CL by converting calls to os/exec with calls to syscall as suggested in the comments for the change. |
It is till a problem when I run hugo in Termux on my android device, any progress? |
sun is a nice little application for making small notes. The timezone patch makes sure the time is reported in the local timezone, see golang/go#20455.
On Android, due to a bug in Go (golang/go#20455), the local timezone is not correct. It is always UTC. As a result, when restoring a backup on the BitBox02, the BitBox02 displays the current time in UTC instead of the local time. This commit contains a workaround to fix the timezone on Android. Alternative considered: getting the timezone offset in native Android code and sending it to Go-land via backend.Environment. I did not pursue this as a quick search didn't turn up an easy way to get the timezone offset on Android which takes into account daylight-savings etc.
On Android, due to a bug in Go (golang/go#20455), the local timezone is not correct. It is always UTC. As a result, when restoring a backup on the BitBox02, the BitBox02 displays the current time in UTC instead of the local time. This commit contains a workaround to fix the timezone on Android. Alternative considered: getting the timezone offset in native Android code and sending it to Go-land via backend.Environment. I did not pursue this as a quick search didn't turn up an easy way to get the timezone offset on Android which takes into account daylight-savings etc.
sun is a nice little application for making small notes. The timezone patch makes sure the time is reported in the local timezone, see golang/go#20455.
commit a1046cd Merge: 9fcac2d 7199fec Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:36:19 2022 +0200 Merge branch 'color_variables_patch' of https://github.com/jadzeidan/bitbox-wallet-app into color_variables_patch commit 7199fec Merge: c95a1ee 6e4e2a7 Author: Jad <42831937+jadzeidan@users.noreply.github.com> Date: Fri Oct 28 17:34:59 2022 +0200 Merge branch 'digitalbitbox:master' into color_variables_patch commit 9fcac2d Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Mon Oct 3 21:09:12 2022 +0200 frontends: color variables refactoring Seperated text and background colors into their own variables. This makes colors easier to maintain because now it's possible to change text and background colors without affecting each other. Also some text used --color-softblack instead of a designated /* font colors */ variable. Changed this text to --color-default so it is consistant with the other text colors. changed text using color-grey to color-secondary commit c95a1ee Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:32:43 2022 +0200 changed text using color-grey to color-secondary commit 6e4e2a7 Merge: c535485 13f2c0b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Oct 27 12:43:24 2022 +0200 Merge branch 'bb02-sats' commit 13f2c0b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 09:55:27 2022 +0200 backend/bitbox02: format BTC as sats if the setting is turned on Also bitbox02-api-go is updated to make use of the new protobuf messages: go get github.com/digitalbitbox/bitbox02-api-go@8c31f23 go mod vendor go mod tidy commit c535485 Merge: a634dd4 0fe0d16 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Oct 27 12:22:54 2022 +0200 Merge remote-tracking branch 'benma/cansend' commit a634dd4 Merge: 55e2b7e 09741c6 Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 27 10:48:45 2022 +0200 Merge branch 'frontend-sats-guide' commit 09741c6 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 14:47:03 2022 +0200 frontend: update label and add guide entry for sats Added 'What is a Satoshi' guide entry on the settings page, as not all users might know what it is. Also reordered settings entry and moved which exchange rates up as second entry. commit 0fe0d16 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 15:58:52 2022 +0200 frontend/account: fix CanSend and Buy call to action Since recently, BTC amounts are returned with trailing zeroes, so the `'0'` string comparison stopped working to check if there is a balance. Similar to `hasAvailable`, the backend should deliver the information. commit 55e2b7e Merge: c7a1d22 8e2add6 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 14:00:56 2022 +0200 Merge remote-tracking branch 'benma/btcunit' commit c7a1d22 Merge: 0f9a4f0 771366b Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 13:48:43 2022 +0200 Merge branch 'frontend-translation-feedback' commit 8e2add6 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 11:14:17 2022 +0200 ci: remove gocyclo linter It has not really forced us to refactor big functions, we kept bumping the min-complexity. Of course we should refactor where reasonable, but the linter wasn't so useful. commit 630dd1b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 10:56:06 2022 +0200 backend: add a BtcUnit type and use it everywhere to format sats Instead of 'BTC' | 'sat', we use 'default' | 'sat', to avoid confusion with BTC coin units which also include 'TBTC' for testnet. This helps with readability of the code, as the type and possible values are clear at every step. commit 0f9a4f0 Merge: d45103a 2cdd792 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 13:24:23 2022 +0200 Merge branch 'attestation-nil' commit 2cdd792 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 11:46:20 2022 +0200 frontend/bitbox02/settings: handle attestation==null The backend can in theory return nil/null in the attestation endpoint, if the endpoint is called before the device.Init() function has finished, where the attesation check is performed. The bb02 init is a bit messy, in the above state probably most/all other bb02 calls would be broken too. For now, we simply adjust the return type of `verifyAttestation()` to match the backend. commit d45103a Merge: 7268244 593aedc Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 11:09:44 2022 +0200 Merge branch 'frontend-txoverview-styling' commit 593aedc Author: thisconnect <this@shiftcrypto.ch> Date: Mon Oct 3 13:36:40 2022 +0200 frontend: fix coin and unit styling in tx overview Sometimes the unit breaks onto a separate line, this happens with large amounts or coins with lots of decimal for example with ETH. Changed styling so that very large amounts are cut off with "…", but only visually so that copy/paste contains takes the whole amount. This should also fix the issue with large amounts on small screen, in extreme cases the fiat amount should squeeze the coin amount together. Also added "font-variant: tabular-nums" definition for the amount so that all numbers take equal space, without using a monospace font. commit 771366b Author: thisconnect <this@shiftcrypto.ch> Date: Thu Sep 29 09:33:37 2022 +0200 frontend: add translation feedback link As we are continuously adding and updating translations, we should have a way to give feedback for the translations to help us catch translation errors. Added a mailto link at the bottom of the guide and allow mailto links to be opened by the backend. Keeping the translation feedback english-only for now, as it is better if we get feedback in english than in the native language. commit 7268244 Merge: c147a51 9107a09 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 25 17:59:26 2022 +0200 Merge branch 'app-version' commit 9107a09 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 28 17:58:13 2022 +0200 frontend: add available updates check in settings This adds a new `Info` section in settings, which states the current version of the App and, in case of available updates, offers a download link. commit c147a51 Merge: 9976026 fdc9da2 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 16:37:00 2022 +0200 Merge branch 'frontend-nicer-pairing' commit fdc9da2 Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 20 18:03:57 2022 +0200 frontend: show point-to-device graphic on pairing step Before there was a disabled grayed out continue button on the pairing step when the user should focus on the device and confirm the code. Changed so that the is a point-to-device graphic without a disabled button. Once the pairing is confirmed it changes to a continue button. commit 9976026 Merge: dd390f9 f5a2a82 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 25 15:22:38 2022 +0200 Merge branch 'sats-coin' commit dd390f9 Merge: 169be46 bc63d73 Author: shonsirsha <seangeekpro@gmail.com> Date: Tue Oct 25 12:38:35 2022 +0200 Merge branch 'frontend-refactor-sdcardcheck' commit bc63d73 Author: shonsirsha <seangeekpro@gmail.com> Date: Mon Oct 24 16:03:46 2022 +0200 frontend: converted SDCardCheck to a functional component as a part of the refactoring process and to follow the latest conventions in the frontend, class components need to be converted into functional components whenever possible. commit 169be46 Merge: 47620fb 2880f90 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 25 11:32:48 2022 +0200 Merge remote-tracking branch 'benma/electrum-tsx' commit 47620fb Merge: b49cb73 b8d81a7 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 10:53:09 2022 +0200 Merge branch 'frontend-generic-continuebtn' commit f5a2a82 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Sep 20 17:18:07 2022 +0200 frontend: enable sats unit option for bitcoin accounts The main unit displayed in the app for bitcoin accounts is Bitcoin (BTC), but sometimes it can be easier to think in terms of Satoshi (sat), especially for lower amounts. This allows the user to choose the preferred unit using a switch in the expert settings section of the frontend. commit 2880f90 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:11:36 2022 +0200 frontend/electrum: convert electrum-servers to a FunctionalComponent commit a6f9cc4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 12:21:57 2022 +0200 frontend/electrum: use api functions instead of apiGet/apiPost commit 95eddbd Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 12:08:09 2022 +0200 frontend/electrum: convert to TypeScript and FunctionalComponent commit b49cb73 Merge: bd70f6c eb761c9 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 10:38:52 2022 +0200 Merge branch 'frontend-eslint-commaspacing' commit b8d81a7 Author: thisconnect <this@shiftcrypto.ch> Date: Mon Oct 24 16:02:08 2022 +0200 frontend: use generic continue translation The same translation for 'Continue' is used in various components, changed to use the same generic text everywhere instead of custom translation key. commit eb761c9 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 08:41:30 2022 +0200 frontend: enable comma-spacing Ensure space after comma, e.g. `fn(a, b)` for better readability and consistency. Updated code with `make webfix`. commit bd70f6c Merge: ff6fada c2a7e1d Author: Marko Bencun <marko@shiftcrypto.ch> Date: Mon Oct 24 10:02:01 2022 +0200 Merge remote-tracking branch 'benma/bb02abort' commit ff6fada Merge: dd1cabb 2fbc8f0 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:58 2022 +0200 Merge remote-tracking branch 'benma/qttransport' commit dd1cabb Merge: 37c5587 d008aeb Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:40 2022 +0200 Merge remote-tracking branch 'benma/functional-entry' commit 37c5587 Merge: 1e1e2c6 d739c60 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:19 2022 +0200 Merge remote-tracking branch 'benma/rem-envvar' commit d739c60 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 14:02:58 2022 +0200 qt: remove unused QT_BITBOX_ALLOW_EXTERNAL_URLS Introduced in 8a27bfe to enable the in-app lociz editor, which was removed again in 29a0764. commit d008aeb Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:55:55 2022 +0200 frontend/guide/entry: convert to FunctionalComponent The entry property was also changed from `EntryProp | string` to `EntryProp`, as the locize in-app editor (`cimode`) does not exist anymore (removed in 29a0764). commit fdbcbf2 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:42:12 2022 +0200 frontend/guide/entry: remove unused property 'highlighted' commit a4b75af Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 11:48:01 2022 +0200 frontend/settings: split electrum.jsx into one file per component Easier to convert to typescript piece by piece. commit 2fbc8f0 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 11:04:06 2022 +0200 frontend/qttransport: fully initialize channel before returning it I didn't observe a bug, but it is probably good to fully initialize the channel before returning it. commit 2475d8e Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 10:39:58 2022 +0200 frontend/qttransport: make initTransport more readable Use async/wait instead of Promises for greater readability. This also removes the need for using the `cache` variable, which was only used to indicate that we were waiting for the webchannel to be initialized. commit 1e1e2c6 Merge: 4e4e78d cf5b493 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 11 08:13:25 2022 +0200 Merge branch 'android-link' commit c2a7e1d Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Sep 8 14:18:55 2022 +0200 frontend/bitbox02: abort SetPassword when the user aborts Before, the error was always assumed to be the password mismatch error, and the SetPassword workflow was invoked again immediately. Now we go back to the initial screen if the user aborts. The BitBox02 only returns the user abot error from this API endpoint from v9.13.0, before the two types of errors can not be distinguished. commit 4e4e78d Merge: b453ea3 bf91c80 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 11 01:02:33 2022 +0200 Merge remote-tracking branch 'benma/android-zimezone' commit b453ea3 Merge: 93eee08 3d361b4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 11 00:49:46 2022 +0200 Merge remote-tracking branch 'benma/android-31' commit cf5b493 Author: beerosagos <luca@shiftcrypto.ch> Date: Mon Oct 10 15:03:46 2022 +0200 android: add external link queries for Android 11 permissions With Android 11 the visibility of the installed packages has been filtered to offer a higher privacy level to the user. This commit add to AndroidManifest.xml the `queries` elements needed to open external links for web pages and `mailto` urls. Queries support is not granted in all Gradle versions. For this reason, the latter has been updated to v3.5.4. commit 93eee08 Merge: 64d1fe5 071e65b Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 6 16:17:25 2022 +0200 Merge branch 'frontend-type-transports' commit 071e65b Author: thisconnect <this@shiftcrypto.ch> Date: Mon Sep 19 13:01:31 2022 +0200 frontend: type qt and android transport - updated global qt definition - added global definitions related to android - removed some unnecessary @ts-ignore related global android - moved common types to transport.common.ts to be able to share it (same types in qttransport.ts and androidtransport.ts) - typed request.ts but exact return type has to be defined in api, request just returns Promise<any> for now - the common types currently contains TMsgCallback, that is a call back type containing the payload pushed from the backend, temp. set to any but will be typed in the next PR with both legacy and new events commit 64d1fe5 Merge: addf34b 4359eb5 Author: beerosagos <luca@shiftcrypto.ch> Date: Thu Oct 6 14:53:32 2022 +0200 Merge branch 'android-build' commit 4359eb5 Author: beerosagos <luca@shiftcrypto.ch> Date: Thu Oct 6 09:39:20 2022 +0200 docs/BUILD.md: update instructions for Android build and deploy Updated BUILD.md with up to date instructions for Android build and deploy. commit addf34b Merge: 0ba090e aacd2d3 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 15:54:52 2022 +0200 Merge branch 'btc-formatting' commit aacd2d3 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 21 12:11:50 2022 +0200 frontend: adding trailing zeroes to BTC and LTC formatting Added trailing zeroes when displaying BTC/LTC amounts in the frontend, with the exception of the balances displayed in the header of account and accountsummary views. commit 0ba090e Merge: 69a1d52 762add1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 13:29:49 2022 +0200 Merge branch 'eth-testnet' commit 762add1 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 4 16:22:21 2022 +0200 vendor: update bitbox02-api-go dependency ``` go get github.com/digitalbitbox/bitbox02-api-go@2c29561c5a4ca7f943f9d40b5ecd4e28da10fb17 go mod tidy go mod vendor ``` commit ff44918 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Sep 27 09:42:42 2022 +0200 backend: add Goerli ETH testnet network ETH merge happened recently, and Ropsten and Rinkeby testnets will soon be deprecated from Etherscan. This add support for the new Goerli testnet. commit 69a1d52 Merge: c9674d4 32387d1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 13:15:54 2022 +0200 Merge branch 'rates-error' commit c9674d4 Merge: cae608e 6cd7d12 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 5 12:40:34 2022 +0200 Merge branch 'frontend-refactor-account-III' commit 32387d1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 12:18:36 2022 +0200 backend/conversions: fix nil conversions when rates not available Unexpected errors from coingecko service were causing the backend to send amounts with nil conversions field, which caused runtime errors on the frontend. With this update, a != nil conversions field should always be available even when coingecko errors accour, allowing the frontend to handle the situation without blocks. commit 6cd7d12 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 5 12:00:34 2022 +0200 frontend: remove old account type information This was used before unified accounts were introduced. Removing. commit f28a897 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Jul 27 09:29:49 2022 +0200 frontend: refactor account to functional component Ongoing effort to rewrite all class based components to functional components so we can use hooks. - typed check-sdcard api - typed buy-supported api - remove load decorator and load config directly commit cae608e Merge: 1b6370c e730b19 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 11:28:32 2022 +0200 Merge branch 'fiat-historical' commit e730b19 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 21 15:07:25 2022 +0200 frontend: modify fiat historical value placeholder in tx Fiat historical value is shown in tx detail. If the transaction is recent the value could be not available. The placeholder we used was '---' which led to poorly readable results for incoming/outgoing txs ('+---' or '----'). Now, if the amount is not available the placeholder is shown without the sign, which should be more readable. In the future it would be nice to refactor the FiatConversion component and limit the `sign` prop to '+' | '-'. commit bf91c80 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 4 21:20:40 2022 +0200 android: fix timezone so the BitBox02 shows the correct time On Android, due to a bug in Go (golang/go#20455), the local timezone is not correct. It is always UTC. As a result, when restoring a backup on the BitBox02, the BitBox02 displays the current time in UTC instead of the local time. This commit contains a workaround to fix the timezone on Android. Alternative considered: getting the timezone offset in native Android code and sending it to Go-land via backend.Environment. I did not pursue this as a quick search didn't turn up an easy way to get the timezone offset on Android which takes into account daylight-savings etc. commit 1b6370c Merge: 6054a36 47810e4 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 4 16:23:09 2022 +0200 Merge branch 'frontend-account-guide' commit 47810e4 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 4 16:00:32 2022 +0200 frontend: remove old split account specific guide entries These were used in the settings page when we used to have separate accounts per script type, with toggles for each one. this is also all gone now with unified accounts and the multi-accounts feature. Also: there is now a script type guide in the receive screen. commit b1a2e72 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Jul 26 17:36:29 2022 +0200 frontend: move account guide to its own component Moved isBTCScriptType to utils and the account guide to its own component so that account.tsx is slightly simpler and easier to refactor. commit 3d361b4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 4 10:51:02 2022 +0200 android: target api level 31, enforced by Google Play According to https://support.google.com/googleplay/android-developer/answer/11926878, the requirements as of now is that updating an app requires API level 31 (Android 12) by November 1st 2022. The exported attribute is set according to https://developer.android.com/about/versions/12/behavior-changes-12#exported: > If your app targets Android 12 or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components. commit 094abeb Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Mon Oct 3 21:09:12 2022 +0200 frontends: color variables refactoring Seperated text and background colors into their own variables. This makes colors easier to maintain because now it's possible to change text and background colors without affecting each other. Also some text used --color-softblack instead of a designated /* font colors */ variable. Changed this text to --color-default so it is consistant with the other text colors.
commit f373513 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:56:19 2022 +0200 Update radio.module.css commit 67fe966 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:54:28 2022 +0200 Update checkbox.module.css commit 3767399 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:50:37 2022 +0200 deleted redundant rules commit acd0fb0 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:40:38 2022 +0200 Squashed commit of the following: commit a1046cd Merge: 9fcac2d 7199fec Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:36:19 2022 +0200 Merge branch 'color_variables_patch' of https://github.com/jadzeidan/bitbox-wallet-app into color_variables_patch commit 7199fec Merge: c95a1ee 6e4e2a7 Author: Jad <42831937+jadzeidan@users.noreply.github.com> Date: Fri Oct 28 17:34:59 2022 +0200 Merge branch 'digitalbitbox:master' into color_variables_patch commit 9fcac2d Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Mon Oct 3 21:09:12 2022 +0200 frontends: color variables refactoring Seperated text and background colors into their own variables. This makes colors easier to maintain because now it's possible to change text and background colors without affecting each other. Also some text used --color-softblack instead of a designated /* font colors */ variable. Changed this text to --color-default so it is consistant with the other text colors. changed text using color-grey to color-secondary commit c95a1ee Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:32:43 2022 +0200 changed text using color-grey to color-secondary commit 6e4e2a7 Merge: c535485 13f2c0b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Oct 27 12:43:24 2022 +0200 Merge branch 'bb02-sats' commit 13f2c0b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 09:55:27 2022 +0200 backend/bitbox02: format BTC as sats if the setting is turned on Also bitbox02-api-go is updated to make use of the new protobuf messages: go get github.com/digitalbitbox/bitbox02-api-go@8c31f23 go mod vendor go mod tidy commit c535485 Merge: a634dd4 0fe0d16 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Oct 27 12:22:54 2022 +0200 Merge remote-tracking branch 'benma/cansend' commit a634dd4 Merge: 55e2b7e 09741c6 Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 27 10:48:45 2022 +0200 Merge branch 'frontend-sats-guide' commit 09741c6 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 14:47:03 2022 +0200 frontend: update label and add guide entry for sats Added 'What is a Satoshi' guide entry on the settings page, as not all users might know what it is. Also reordered settings entry and moved which exchange rates up as second entry. commit 0fe0d16 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 15:58:52 2022 +0200 frontend/account: fix CanSend and Buy call to action Since recently, BTC amounts are returned with trailing zeroes, so the `'0'` string comparison stopped working to check if there is a balance. Similar to `hasAvailable`, the backend should deliver the information. commit 55e2b7e Merge: c7a1d22 8e2add6 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 14:00:56 2022 +0200 Merge remote-tracking branch 'benma/btcunit' commit c7a1d22 Merge: 0f9a4f0 771366b Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 13:48:43 2022 +0200 Merge branch 'frontend-translation-feedback' commit 8e2add6 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 11:14:17 2022 +0200 ci: remove gocyclo linter It has not really forced us to refactor big functions, we kept bumping the min-complexity. Of course we should refactor where reasonable, but the linter wasn't so useful. commit 630dd1b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 10:56:06 2022 +0200 backend: add a BtcUnit type and use it everywhere to format sats Instead of 'BTC' | 'sat', we use 'default' | 'sat', to avoid confusion with BTC coin units which also include 'TBTC' for testnet. This helps with readability of the code, as the type and possible values are clear at every step. commit 0f9a4f0 Merge: d45103a 2cdd792 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 13:24:23 2022 +0200 Merge branch 'attestation-nil' commit 2cdd792 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 11:46:20 2022 +0200 frontend/bitbox02/settings: handle attestation==null The backend can in theory return nil/null in the attestation endpoint, if the endpoint is called before the device.Init() function has finished, where the attesation check is performed. The bb02 init is a bit messy, in the above state probably most/all other bb02 calls would be broken too. For now, we simply adjust the return type of `verifyAttestation()` to match the backend. commit d45103a Merge: 7268244 593aedc Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 11:09:44 2022 +0200 Merge branch 'frontend-txoverview-styling' commit 593aedc Author: thisconnect <this@shiftcrypto.ch> Date: Mon Oct 3 13:36:40 2022 +0200 frontend: fix coin and unit styling in tx overview Sometimes the unit breaks onto a separate line, this happens with large amounts or coins with lots of decimal for example with ETH. Changed styling so that very large amounts are cut off with "…", but only visually so that copy/paste contains takes the whole amount. This should also fix the issue with large amounts on small screen, in extreme cases the fiat amount should squeeze the coin amount together. Also added "font-variant: tabular-nums" definition for the amount so that all numbers take equal space, without using a monospace font. commit 771366b Author: thisconnect <this@shiftcrypto.ch> Date: Thu Sep 29 09:33:37 2022 +0200 frontend: add translation feedback link As we are continuously adding and updating translations, we should have a way to give feedback for the translations to help us catch translation errors. Added a mailto link at the bottom of the guide and allow mailto links to be opened by the backend. Keeping the translation feedback english-only for now, as it is better if we get feedback in english than in the native language. commit 7268244 Merge: c147a51 9107a09 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 25 17:59:26 2022 +0200 Merge branch 'app-version' commit 9107a09 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 28 17:58:13 2022 +0200 frontend: add available updates check in settings This adds a new `Info` section in settings, which states the current version of the App and, in case of available updates, offers a download link. commit c147a51 Merge: 9976026 fdc9da2 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 16:37:00 2022 +0200 Merge branch 'frontend-nicer-pairing' commit fdc9da2 Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 20 18:03:57 2022 +0200 frontend: show point-to-device graphic on pairing step Before there was a disabled grayed out continue button on the pairing step when the user should focus on the device and confirm the code. Changed so that the is a point-to-device graphic without a disabled button. Once the pairing is confirmed it changes to a continue button. commit 9976026 Merge: dd390f9 f5a2a82 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 25 15:22:38 2022 +0200 Merge branch 'sats-coin' commit dd390f9 Merge: 169be46 bc63d73 Author: shonsirsha <seangeekpro@gmail.com> Date: Tue Oct 25 12:38:35 2022 +0200 Merge branch 'frontend-refactor-sdcardcheck' commit bc63d73 Author: shonsirsha <seangeekpro@gmail.com> Date: Mon Oct 24 16:03:46 2022 +0200 frontend: converted SDCardCheck to a functional component as a part of the refactoring process and to follow the latest conventions in the frontend, class components need to be converted into functional components whenever possible. commit 169be46 Merge: 47620fb 2880f90 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 25 11:32:48 2022 +0200 Merge remote-tracking branch 'benma/electrum-tsx' commit 47620fb Merge: b49cb73 b8d81a7 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 10:53:09 2022 +0200 Merge branch 'frontend-generic-continuebtn' commit f5a2a82 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Sep 20 17:18:07 2022 +0200 frontend: enable sats unit option for bitcoin accounts The main unit displayed in the app for bitcoin accounts is Bitcoin (BTC), but sometimes it can be easier to think in terms of Satoshi (sat), especially for lower amounts. This allows the user to choose the preferred unit using a switch in the expert settings section of the frontend. commit 2880f90 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:11:36 2022 +0200 frontend/electrum: convert electrum-servers to a FunctionalComponent commit a6f9cc4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 12:21:57 2022 +0200 frontend/electrum: use api functions instead of apiGet/apiPost commit 95eddbd Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 12:08:09 2022 +0200 frontend/electrum: convert to TypeScript and FunctionalComponent commit b49cb73 Merge: bd70f6c eb761c9 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 10:38:52 2022 +0200 Merge branch 'frontend-eslint-commaspacing' commit b8d81a7 Author: thisconnect <this@shiftcrypto.ch> Date: Mon Oct 24 16:02:08 2022 +0200 frontend: use generic continue translation The same translation for 'Continue' is used in various components, changed to use the same generic text everywhere instead of custom translation key. commit eb761c9 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 08:41:30 2022 +0200 frontend: enable comma-spacing Ensure space after comma, e.g. `fn(a, b)` for better readability and consistency. Updated code with `make webfix`. commit bd70f6c Merge: ff6fada c2a7e1d Author: Marko Bencun <marko@shiftcrypto.ch> Date: Mon Oct 24 10:02:01 2022 +0200 Merge remote-tracking branch 'benma/bb02abort' commit ff6fada Merge: dd1cabb 2fbc8f0 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:58 2022 +0200 Merge remote-tracking branch 'benma/qttransport' commit dd1cabb Merge: 37c5587 d008aeb Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:40 2022 +0200 Merge remote-tracking branch 'benma/functional-entry' commit 37c5587 Merge: 1e1e2c6 d739c60 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:19 2022 +0200 Merge remote-tracking branch 'benma/rem-envvar' commit d739c60 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 14:02:58 2022 +0200 qt: remove unused QT_BITBOX_ALLOW_EXTERNAL_URLS Introduced in 8a27bfe to enable the in-app lociz editor, which was removed again in 29a0764. commit d008aeb Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:55:55 2022 +0200 frontend/guide/entry: convert to FunctionalComponent The entry property was also changed from `EntryProp | string` to `EntryProp`, as the locize in-app editor (`cimode`) does not exist anymore (removed in 29a0764). commit fdbcbf2 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:42:12 2022 +0200 frontend/guide/entry: remove unused property 'highlighted' commit a4b75af Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 11:48:01 2022 +0200 frontend/settings: split electrum.jsx into one file per component Easier to convert to typescript piece by piece. commit 2fbc8f0 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 11:04:06 2022 +0200 frontend/qttransport: fully initialize channel before returning it I didn't observe a bug, but it is probably good to fully initialize the channel before returning it. commit 2475d8e Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 10:39:58 2022 +0200 frontend/qttransport: make initTransport more readable Use async/wait instead of Promises for greater readability. This also removes the need for using the `cache` variable, which was only used to indicate that we were waiting for the webchannel to be initialized. commit 1e1e2c6 Merge: 4e4e78d cf5b493 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 11 08:13:25 2022 +0200 Merge branch 'android-link' commit c2a7e1d Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Sep 8 14:18:55 2022 +0200 frontend/bitbox02: abort SetPassword when the user aborts Before, the error was always assumed to be the password mismatch error, and the SetPassword workflow was invoked again immediately. Now we go back to the initial screen if the user aborts. The BitBox02 only returns the user abot error from this API endpoint from v9.13.0, before the two types of errors can not be distinguished. commit 4e4e78d Merge: b453ea3 bf91c80 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 11 01:02:33 2022 +0200 Merge remote-tracking branch 'benma/android-zimezone' commit b453ea3 Merge: 93eee08 3d361b4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 11 00:49:46 2022 +0200 Merge remote-tracking branch 'benma/android-31' commit cf5b493 Author: beerosagos <luca@shiftcrypto.ch> Date: Mon Oct 10 15:03:46 2022 +0200 android: add external link queries for Android 11 permissions With Android 11 the visibility of the installed packages has been filtered to offer a higher privacy level to the user. This commit add to AndroidManifest.xml the `queries` elements needed to open external links for web pages and `mailto` urls. Queries support is not granted in all Gradle versions. For this reason, the latter has been updated to v3.5.4. commit 93eee08 Merge: 64d1fe5 071e65b Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 6 16:17:25 2022 +0200 Merge branch 'frontend-type-transports' commit 071e65b Author: thisconnect <this@shiftcrypto.ch> Date: Mon Sep 19 13:01:31 2022 +0200 frontend: type qt and android transport - updated global qt definition - added global definitions related to android - removed some unnecessary @ts-ignore related global android - moved common types to transport.common.ts to be able to share it (same types in qttransport.ts and androidtransport.ts) - typed request.ts but exact return type has to be defined in api, request just returns Promise<any> for now - the common types currently contains TMsgCallback, that is a call back type containing the payload pushed from the backend, temp. set to any but will be typed in the next PR with both legacy and new events commit 64d1fe5 Merge: addf34b 4359eb5 Author: beerosagos <luca@shiftcrypto.ch> Date: Thu Oct 6 14:53:32 2022 +0200 Merge branch 'android-build' commit 4359eb5 Author: beerosagos <luca@shiftcrypto.ch> Date: Thu Oct 6 09:39:20 2022 +0200 docs/BUILD.md: update instructions for Android build and deploy Updated BUILD.md with up to date instructions for Android build and deploy. commit addf34b Merge: 0ba090e aacd2d3 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 15:54:52 2022 +0200 Merge branch 'btc-formatting' commit aacd2d3 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 21 12:11:50 2022 +0200 frontend: adding trailing zeroes to BTC and LTC formatting Added trailing zeroes when displaying BTC/LTC amounts in the frontend, with the exception of the balances displayed in the header of account and accountsummary views. commit 0ba090e Merge: 69a1d52 762add1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 13:29:49 2022 +0200 Merge branch 'eth-testnet' commit 762add1 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 4 16:22:21 2022 +0200 vendor: update bitbox02-api-go dependency ``` go get github.com/digitalbitbox/bitbox02-api-go@2c29561c5a4ca7f943f9d40b5ecd4e28da10fb17 go mod tidy go mod vendor ``` commit ff44918 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Sep 27 09:42:42 2022 +0200 backend: add Goerli ETH testnet network ETH merge happened recently, and Ropsten and Rinkeby testnets will soon be deprecated from Etherscan. This add support for the new Goerli testnet. commit 69a1d52 Merge: c9674d4 32387d1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 13:15:54 2022 +0200 Merge branch 'rates-error' commit c9674d4 Merge: cae608e 6cd7d12 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 5 12:40:34 2022 +0200 Merge branch 'frontend-refactor-account-III' commit 32387d1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 12:18:36 2022 +0200 backend/conversions: fix nil conversions when rates not available Unexpected errors from coingecko service were causing the backend to send amounts with nil conversions field, which caused runtime errors on the frontend. With this update, a != nil conversions field should always be available even when coingecko errors accour, allowing the frontend to handle the situation without blocks. commit 6cd7d12 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 5 12:00:34 2022 +0200 frontend: remove old account type information This was used before unified accounts were introduced. Removing. commit f28a897 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Jul 27 09:29:49 2022 +0200 frontend: refactor account to functional component Ongoing effort to rewrite all class based components to functional components so we can use hooks. - typed check-sdcard api - typed buy-supported api - remove load decorator and load config directly commit cae608e Merge: 1b6370c e730b19 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 11:28:32 2022 +0200 Merge branch 'fiat-historical' commit e730b19 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 21 15:07:25 2022 +0200 frontend: modify fiat historical value placeholder in tx Fiat historical value is shown in tx detail. If the transaction is recent the value could be not available. The placeholder we used was '---' which led to poorly readable results for incoming/outgoing txs ('+---' or '----'). Now, if the amount is not available the placeholder is shown without the sign, which should be more readable. In the future it would be nice to refactor the FiatConversion component and limit the `sign` prop to '+' | '-'. commit bf91c80 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 4 21:20:40 2022 +0200 android: fix timezone so the BitBox02 shows the correct time On Android, due to a bug in Go (golang/go#20455), the local timezone is not correct. It is always UTC. As a result, when restoring a backup on the BitBox02, the BitBox02 displays the current time in UTC instead of the local time. This commit contains a workaround to fix the timezone on Android. Alternative considered: getting the timezone offset in native Android code and sending it to Go-land via backend.Environment. I did not pursue this as a quick search didn't turn up an easy way to get the timezone offset on Android which takes into account daylight-savings etc. commit 1b6370c Merge: 6054a36 47810e4 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 4 16:23:09 2022 +0200 Merge branch 'frontend-account-guide' commit 47810e4 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 4 16:00:32 2022 +0200 frontend: remove old split account specific guide entries These were used in the settings page when we used to have separate accounts per script type, with toggles for each one. this is also all gone now with unified accounts and the multi-accounts feature. Also: there is now a script type guide in the receive screen. commit b1a2e72 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Jul 26 17:36:29 2022 +0200 frontend: move account guide to its own component Moved isBTCScriptType to utils and the account guide to its own component so that account.tsx is slightly simpler and easier to refactor. commit 3d361b4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 4 10:51:02 2022 +0200 android: target api level 31, enforced by Google Play According to https://support.google.com/googleplay/android-developer/answer/11926878, the requirements as of now is that updating an app requires API level 31 (Android 12) by November 1st 2022. The exported attribute is set according to https://developer.android.com/about/versions/12/behavior-changes-12#exported: > If your app targets Android 12 or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components. commit 094abeb Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Mon Oct 3 21:09:12 2022 +0200 frontends: color variables refactoring Seperated text and background colors into their own variables. This makes colors easier to maintain because now it's possible to change text and background colors without affecting each other. Also some text used --color-softblack instead of a designated /* font colors */ variable. Changed this text to --color-default so it is consistant with the other text colors.
commit 7ae463e Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Tue Nov 1 12:01:49 2022 +0100 Created new font and background variables Created --color-tertiary and --background-tertiary that use --color-gray-alt commit 3c316f5 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Tue Nov 1 11:41:33 2022 +0100 removed .settings.disabled removed .settings.disabled since it doesn't seem to be used anywhere. commit 4a7a38b Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Tue Nov 1 11:01:42 2022 +0100 Update transactions.module.css commit be651a3 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 20:53:44 2022 +0200 Squashed commit of the following: commit f373513 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:56:19 2022 +0200 Update radio.module.css commit 67fe966 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:54:28 2022 +0200 Update checkbox.module.css commit 3767399 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:50:37 2022 +0200 deleted redundant rules commit acd0fb0 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:40:38 2022 +0200 Squashed commit of the following: commit a1046cd Merge: 9fcac2d 7199fec Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:36:19 2022 +0200 Merge branch 'color_variables_patch' of https://github.com/jadzeidan/bitbox-wallet-app into color_variables_patch commit 7199fec Merge: c95a1ee 6e4e2a7 Author: Jad <42831937+jadzeidan@users.noreply.github.com> Date: Fri Oct 28 17:34:59 2022 +0200 Merge branch 'digitalbitbox:master' into color_variables_patch commit 9fcac2d Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Mon Oct 3 21:09:12 2022 +0200 frontends: color variables refactoring Seperated text and background colors into their own variables. This makes colors easier to maintain because now it's possible to change text and background colors without affecting each other. Also some text used --color-softblack instead of a designated /* font colors */ variable. Changed this text to --color-default so it is consistant with the other text colors. changed text using color-grey to color-secondary commit c95a1ee Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:32:43 2022 +0200 changed text using color-grey to color-secondary commit 6e4e2a7 Merge: c535485 13f2c0b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Oct 27 12:43:24 2022 +0200 Merge branch 'bb02-sats' commit 13f2c0b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 09:55:27 2022 +0200 backend/bitbox02: format BTC as sats if the setting is turned on Also bitbox02-api-go is updated to make use of the new protobuf messages: go get github.com/digitalbitbox/bitbox02-api-go@8c31f23 go mod vendor go mod tidy commit c535485 Merge: a634dd4 0fe0d16 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Oct 27 12:22:54 2022 +0200 Merge remote-tracking branch 'benma/cansend' commit a634dd4 Merge: 55e2b7e 09741c6 Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 27 10:48:45 2022 +0200 Merge branch 'frontend-sats-guide' commit 09741c6 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 14:47:03 2022 +0200 frontend: update label and add guide entry for sats Added 'What is a Satoshi' guide entry on the settings page, as not all users might know what it is. Also reordered settings entry and moved which exchange rates up as second entry. commit 0fe0d16 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 15:58:52 2022 +0200 frontend/account: fix CanSend and Buy call to action Since recently, BTC amounts are returned with trailing zeroes, so the `'0'` string comparison stopped working to check if there is a balance. Similar to `hasAvailable`, the backend should deliver the information. commit 55e2b7e Merge: c7a1d22 8e2add6 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 14:00:56 2022 +0200 Merge remote-tracking branch 'benma/btcunit' commit c7a1d22 Merge: 0f9a4f0 771366b Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 13:48:43 2022 +0200 Merge branch 'frontend-translation-feedback' commit 8e2add6 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 11:14:17 2022 +0200 ci: remove gocyclo linter It has not really forced us to refactor big functions, we kept bumping the min-complexity. Of course we should refactor where reasonable, but the linter wasn't so useful. commit 630dd1b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 10:56:06 2022 +0200 backend: add a BtcUnit type and use it everywhere to format sats Instead of 'BTC' | 'sat', we use 'default' | 'sat', to avoid confusion with BTC coin units which also include 'TBTC' for testnet. This helps with readability of the code, as the type and possible values are clear at every step. commit 0f9a4f0 Merge: d45103a 2cdd792 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 13:24:23 2022 +0200 Merge branch 'attestation-nil' commit 2cdd792 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 11:46:20 2022 +0200 frontend/bitbox02/settings: handle attestation==null The backend can in theory return nil/null in the attestation endpoint, if the endpoint is called before the device.Init() function has finished, where the attesation check is performed. The bb02 init is a bit messy, in the above state probably most/all other bb02 calls would be broken too. For now, we simply adjust the return type of `verifyAttestation()` to match the backend. commit d45103a Merge: 7268244 593aedc Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 11:09:44 2022 +0200 Merge branch 'frontend-txoverview-styling' commit 593aedc Author: thisconnect <this@shiftcrypto.ch> Date: Mon Oct 3 13:36:40 2022 +0200 frontend: fix coin and unit styling in tx overview Sometimes the unit breaks onto a separate line, this happens with large amounts or coins with lots of decimal for example with ETH. Changed styling so that very large amounts are cut off with "…", but only visually so that copy/paste contains takes the whole amount. This should also fix the issue with large amounts on small screen, in extreme cases the fiat amount should squeeze the coin amount together. Also added "font-variant: tabular-nums" definition for the amount so that all numbers take equal space, without using a monospace font. commit 771366b Author: thisconnect <this@shiftcrypto.ch> Date: Thu Sep 29 09:33:37 2022 +0200 frontend: add translation feedback link As we are continuously adding and updating translations, we should have a way to give feedback for the translations to help us catch translation errors. Added a mailto link at the bottom of the guide and allow mailto links to be opened by the backend. Keeping the translation feedback english-only for now, as it is better if we get feedback in english than in the native language. commit 7268244 Merge: c147a51 9107a09 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 25 17:59:26 2022 +0200 Merge branch 'app-version' commit 9107a09 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 28 17:58:13 2022 +0200 frontend: add available updates check in settings This adds a new `Info` section in settings, which states the current version of the App and, in case of available updates, offers a download link. commit c147a51 Merge: 9976026 fdc9da2 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 16:37:00 2022 +0200 Merge branch 'frontend-nicer-pairing' commit fdc9da2 Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 20 18:03:57 2022 +0200 frontend: show point-to-device graphic on pairing step Before there was a disabled grayed out continue button on the pairing step when the user should focus on the device and confirm the code. Changed so that the is a point-to-device graphic without a disabled button. Once the pairing is confirmed it changes to a continue button. commit 9976026 Merge: dd390f9 f5a2a82 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 25 15:22:38 2022 +0200 Merge branch 'sats-coin' commit dd390f9 Merge: 169be46 bc63d73 Author: shonsirsha <seangeekpro@gmail.com> Date: Tue Oct 25 12:38:35 2022 +0200 Merge branch 'frontend-refactor-sdcardcheck' commit bc63d73 Author: shonsirsha <seangeekpro@gmail.com> Date: Mon Oct 24 16:03:46 2022 +0200 frontend: converted SDCardCheck to a functional component as a part of the refactoring process and to follow the latest conventions in the frontend, class components need to be converted into functional components whenever possible. commit 169be46 Merge: 47620fb 2880f90 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 25 11:32:48 2022 +0200 Merge remote-tracking branch 'benma/electrum-tsx' commit 47620fb Merge: b49cb73 b8d81a7 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 10:53:09 2022 +0200 Merge branch 'frontend-generic-continuebtn' commit f5a2a82 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Sep 20 17:18:07 2022 +0200 frontend: enable sats unit option for bitcoin accounts The main unit displayed in the app for bitcoin accounts is Bitcoin (BTC), but sometimes it can be easier to think in terms of Satoshi (sat), especially for lower amounts. This allows the user to choose the preferred unit using a switch in the expert settings section of the frontend. commit 2880f90 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:11:36 2022 +0200 frontend/electrum: convert electrum-servers to a FunctionalComponent commit a6f9cc4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 12:21:57 2022 +0200 frontend/electrum: use api functions instead of apiGet/apiPost commit 95eddbd Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 12:08:09 2022 +0200 frontend/electrum: convert to TypeScript and FunctionalComponent commit b49cb73 Merge: bd70f6c eb761c9 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 10:38:52 2022 +0200 Merge branch 'frontend-eslint-commaspacing' commit b8d81a7 Author: thisconnect <this@shiftcrypto.ch> Date: Mon Oct 24 16:02:08 2022 +0200 frontend: use generic continue translation The same translation for 'Continue' is used in various components, changed to use the same generic text everywhere instead of custom translation key. commit eb761c9 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 08:41:30 2022 +0200 frontend: enable comma-spacing Ensure space after comma, e.g. `fn(a, b)` for better readability and consistency. Updated code with `make webfix`. commit bd70f6c Merge: ff6fada c2a7e1d Author: Marko Bencun <marko@shiftcrypto.ch> Date: Mon Oct 24 10:02:01 2022 +0200 Merge remote-tracking branch 'benma/bb02abort' commit ff6fada Merge: dd1cabb 2fbc8f0 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:58 2022 +0200 Merge remote-tracking branch 'benma/qttransport' commit dd1cabb Merge: 37c5587 d008aeb Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:40 2022 +0200 Merge remote-tracking branch 'benma/functional-entry' commit 37c5587 Merge: 1e1e2c6 d739c60 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:19 2022 +0200 Merge remote-tracking branch 'benma/rem-envvar' commit d739c60 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 14:02:58 2022 +0200 qt: remove unused QT_BITBOX_ALLOW_EXTERNAL_URLS Introduced in 8a27bfe to enable the in-app lociz editor, which was removed again in 29a0764. commit d008aeb Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:55:55 2022 +0200 frontend/guide/entry: convert to FunctionalComponent The entry property was also changed from `EntryProp | string` to `EntryProp`, as the locize in-app editor (`cimode`) does not exist anymore (removed in 29a0764). commit fdbcbf2 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:42:12 2022 +0200 frontend/guide/entry: remove unused property 'highlighted' commit a4b75af Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 11:48:01 2022 +0200 frontend/settings: split electrum.jsx into one file per component Easier to convert to typescript piece by piece. commit 2fbc8f0 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 11:04:06 2022 +0200 frontend/qttransport: fully initialize channel before returning it I didn't observe a bug, but it is probably good to fully initialize the channel before returning it. commit 2475d8e Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 10:39:58 2022 +0200 frontend/qttransport: make initTransport more readable Use async/wait instead of Promises for greater readability. This also removes the need for using the `cache` variable, which was only used to indicate that we were waiting for the webchannel to be initialized. commit 1e1e2c6 Merge: 4e4e78d cf5b493 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 11 08:13:25 2022 +0200 Merge branch 'android-link' commit c2a7e1d Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Sep 8 14:18:55 2022 +0200 frontend/bitbox02: abort SetPassword when the user aborts Before, the error was always assumed to be the password mismatch error, and the SetPassword workflow was invoked again immediately. Now we go back to the initial screen if the user aborts. The BitBox02 only returns the user abot error from this API endpoint from v9.13.0, before the two types of errors can not be distinguished. commit 4e4e78d Merge: b453ea3 bf91c80 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 11 01:02:33 2022 +0200 Merge remote-tracking branch 'benma/android-zimezone' commit b453ea3 Merge: 93eee08 3d361b4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 11 00:49:46 2022 +0200 Merge remote-tracking branch 'benma/android-31' commit cf5b493 Author: beerosagos <luca@shiftcrypto.ch> Date: Mon Oct 10 15:03:46 2022 +0200 android: add external link queries for Android 11 permissions With Android 11 the visibility of the installed packages has been filtered to offer a higher privacy level to the user. This commit add to AndroidManifest.xml the `queries` elements needed to open external links for web pages and `mailto` urls. Queries support is not granted in all Gradle versions. For this reason, the latter has been updated to v3.5.4. commit 93eee08 Merge: 64d1fe5 071e65b Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 6 16:17:25 2022 +0200 Merge branch 'frontend-type-transports' commit 071e65b Author: thisconnect <this@shiftcrypto.ch> Date: Mon Sep 19 13:01:31 2022 +0200 frontend: type qt and android transport - updated global qt definition - added global definitions related to android - removed some unnecessary @ts-ignore related global android - moved common types to transport.common.ts to be able to share it (same types in qttransport.ts and androidtransport.ts) - typed request.ts but exact return type has to be defined in api, request just returns Promise<any> for now - the common types currently contains TMsgCallback, that is a call back type containing the payload pushed from the backend, temp. set to any but will be typed in the next PR with both legacy and new events commit 64d1fe5 Merge: addf34b 4359eb5 Author: beerosagos <luca@shiftcrypto.ch> Date: Thu Oct 6 14:53:32 2022 +0200 Merge branch 'android-build' commit 4359eb5 Author: beerosagos <luca@shiftcrypto.ch> Date: Thu Oct 6 09:39:20 2022 +0200 docs/BUILD.md: update instructions for Android build and deploy Updated BUILD.md with up to date instructions for Android build and deploy. commit addf34b Merge: 0ba090e aacd2d3 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 15:54:52 2022 +0200 Merge branch 'btc-formatting' commit aacd2d3 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 21 12:11:50 2022 +0200 frontend: adding trailing zeroes to BTC and LTC formatting Added trailing zeroes when displaying BTC/LTC amounts in the frontend, with the exception of the balances displayed in the header of account and accountsummary views. commit 0ba090e Merge: 69a1d52 762add1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 13:29:49 2022 +0200 Merge branch 'eth-testnet' commit 762add1 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 4 16:22:21 2022 +0200 vendor: update bitbox02-api-go dependency ``` go get github.com/digitalbitbox/bitbox02-api-go@2c29561c5a4ca7f943f9d40b5ecd4e28da10fb17 go mod tidy go mod vendor ``` commit ff44918 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Sep 27 09:42:42 2022 +0200 backend: add Goerli ETH testnet network ETH merge happened recently, and Ropsten and Rinkeby testnets will soon be deprecated from Etherscan. This add support for the new Goerli testnet. commit 69a1d52 Merge: c9674d4 32387d1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 13:15:54 2022 +0200 Merge branch 'rates-error' commit c9674d4 Merge: cae608e 6cd7d12 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 5 12:40:34 2022 +0200 Merge branch 'frontend-refactor-account-III' commit 32387d1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 12:18:36 2022 +0200 backend/conversions: fix nil conversions when rates not available Unexpected errors from coingecko service were causing the backend to send amounts with nil conversions field, which caused runtime errors on the frontend. With this update, a != nil conversions field should always be available even when coingecko errors accour, allowing the frontend to handle the situation without blocks. commit 6cd7d12 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 5 12:00:34 2022 +0200 frontend: remove old account type information This was used before unified accounts were introduced. Removing. commit f28a897 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Jul 27 09:29:49 2022 +0200 frontend: refactor account to functional component Ongoing effort to rewrite all class based components to functional components so we can use hooks. - typed check-sdcard api - typed buy-supported api - remove load decorator and load config directly commit cae608e Merge: 1b6370c e730b19 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 11:28:32 2022 +0200 Merge branch 'fiat-historical' commit e730b19 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 21 15:07:25 2022 +0200 frontend: modify fiat historical value placeholder in tx Fiat historical value is shown in tx detail. If the transaction is recent the value could be not available. The placeholder we used was '---' which led to poorly readable results for incoming/outgoing txs ('+---' or '----'). Now, if the amount is not available the placeholder is shown without the sign, which should be more readable. In the future it would be nice to refactor the FiatConversion component and limit the `sign` prop to '+' | '-'. commit bf91c80 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 4 21:20:40 2022 +0200 android: fix timezone so the BitBox02 shows the correct time On Android, due to a bug in Go (golang/go#20455), the local timezone is not correct. It is always UTC. As a result, when restoring a backup on the BitBox02, the BitBox02 displays the current time in UTC instead of the local time. This commit contains a workaround to fix the timezone on Android. Alternative considered: getting the timezone offset in native Android code and sending it to Go-land via backend.Environment. I did not pursue this as a quick search didn't turn up an easy way to get the timezone offset on Android which takes into account daylight-savings etc. commit 1b6370c Merge: 6054a36 47810e4 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 4 16:23:09 2022 +0200 Merge branch 'frontend-account-guide' commit 47810e4 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 4 16:00:32 2022 +0200 frontend: remove old split account specific guide entries These were used in the settings page when we used to have separate accounts per script type, with toggles for each one. this is also all gone now with unified accounts and the multi-accounts feature. Also: there is now a script type guide in the receive screen. commit b1a2e72 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Jul 26 17:36:29 2022 +0200 frontend: move account guide to its own component Moved isBTCScriptType to utils and the account guide to its own component so that account.tsx is slightly simpler and easier to refactor. commit 3d361b4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 4 10:51:02 2022 +0200 android: target api level 31, enforced by Google Play According to https://support.google.com/googleplay/android-developer/answer/11926878, the requirements as of now is that updating an app requires API level 31 (Android 12) by November 1st 2022. The exported attribute is set according to https://developer.android.com/about/versions/12/behavior-changes-12#exported: > If your app targets Android 12 or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components. commit 094abeb Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Mon Oct 3 21:09:12 2022 +0200 frontends: color variables refactoring Seperated text and background colors into their own variables. This makes colors easier to maintain because now it's possible to change text and background colors without affecting each other. Also some text used --color-softblack instead of a designated /* font colors */ variable. Changed this text to --color-default so it is consistant with the other text colors.
commit 7ae463e Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Tue Nov 1 12:01:49 2022 +0100 Created new font and background variables Created --color-tertiary and --background-tertiary that use --color-gray-alt commit 3c316f5 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Tue Nov 1 11:41:33 2022 +0100 removed .settings.disabled removed .settings.disabled since it doesn't seem to be used anywhere. commit 4a7a38b Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Tue Nov 1 11:01:42 2022 +0100 Update transactions.module.css commit be651a3 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 20:53:44 2022 +0200 Squashed commit of the following: commit f373513 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:56:19 2022 +0200 Update radio.module.css commit 67fe966 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:54:28 2022 +0200 Update checkbox.module.css commit 3767399 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:50:37 2022 +0200 deleted redundant rules commit acd0fb0 Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:40:38 2022 +0200 Squashed commit of the following: commit a1046cd Merge: 9fcac2d 7199fec Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:36:19 2022 +0200 Merge branch 'color_variables_patch' of https://github.com/jadzeidan/bitbox-wallet-app into color_variables_patch commit 7199fec Merge: c95a1ee 6e4e2a7 Author: Jad <42831937+jadzeidan@users.noreply.github.com> Date: Fri Oct 28 17:34:59 2022 +0200 Merge branch 'digitalbitbox:master' into color_variables_patch commit 9fcac2d Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Mon Oct 3 21:09:12 2022 +0200 frontends: color variables refactoring Seperated text and background colors into their own variables. This makes colors easier to maintain because now it's possible to change text and background colors without affecting each other. Also some text used --color-softblack instead of a designated /* font colors */ variable. Changed this text to --color-default so it is consistant with the other text colors. changed text using color-grey to color-secondary commit c95a1ee Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Fri Oct 28 17:32:43 2022 +0200 changed text using color-grey to color-secondary commit 6e4e2a7 Merge: c535485 13f2c0b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Oct 27 12:43:24 2022 +0200 Merge branch 'bb02-sats' commit 13f2c0b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 09:55:27 2022 +0200 backend/bitbox02: format BTC as sats if the setting is turned on Also bitbox02-api-go is updated to make use of the new protobuf messages: go get github.com/digitalbitbox/bitbox02-api-go@8c31f23 go mod vendor go mod tidy commit c535485 Merge: a634dd4 0fe0d16 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Oct 27 12:22:54 2022 +0200 Merge remote-tracking branch 'benma/cansend' commit a634dd4 Merge: 55e2b7e 09741c6 Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 27 10:48:45 2022 +0200 Merge branch 'frontend-sats-guide' commit 09741c6 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 14:47:03 2022 +0200 frontend: update label and add guide entry for sats Added 'What is a Satoshi' guide entry on the settings page, as not all users might know what it is. Also reordered settings entry and moved which exchange rates up as second entry. commit 0fe0d16 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 15:58:52 2022 +0200 frontend/account: fix CanSend and Buy call to action Since recently, BTC amounts are returned with trailing zeroes, so the `'0'` string comparison stopped working to check if there is a balance. Similar to `hasAvailable`, the backend should deliver the information. commit 55e2b7e Merge: c7a1d22 8e2add6 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 14:00:56 2022 +0200 Merge remote-tracking branch 'benma/btcunit' commit c7a1d22 Merge: 0f9a4f0 771366b Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 13:48:43 2022 +0200 Merge branch 'frontend-translation-feedback' commit 8e2add6 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 11:14:17 2022 +0200 ci: remove gocyclo linter It has not really forced us to refactor big functions, we kept bumping the min-complexity. Of course we should refactor where reasonable, but the linter wasn't so useful. commit 630dd1b Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 10:56:06 2022 +0200 backend: add a BtcUnit type and use it everywhere to format sats Instead of 'BTC' | 'sat', we use 'default' | 'sat', to avoid confusion with BTC coin units which also include 'TBTC' for testnet. This helps with readability of the code, as the type and possible values are clear at every step. commit 0f9a4f0 Merge: d45103a 2cdd792 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 13:24:23 2022 +0200 Merge branch 'attestation-nil' commit 2cdd792 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 26 11:46:20 2022 +0200 frontend/bitbox02/settings: handle attestation==null The backend can in theory return nil/null in the attestation endpoint, if the endpoint is called before the device.Init() function has finished, where the attesation check is performed. The bb02 init is a bit messy, in the above state probably most/all other bb02 calls would be broken too. For now, we simply adjust the return type of `verifyAttestation()` to match the backend. commit d45103a Merge: 7268244 593aedc Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 26 11:09:44 2022 +0200 Merge branch 'frontend-txoverview-styling' commit 593aedc Author: thisconnect <this@shiftcrypto.ch> Date: Mon Oct 3 13:36:40 2022 +0200 frontend: fix coin and unit styling in tx overview Sometimes the unit breaks onto a separate line, this happens with large amounts or coins with lots of decimal for example with ETH. Changed styling so that very large amounts are cut off with "…", but only visually so that copy/paste contains takes the whole amount. This should also fix the issue with large amounts on small screen, in extreme cases the fiat amount should squeeze the coin amount together. Also added "font-variant: tabular-nums" definition for the amount so that all numbers take equal space, without using a monospace font. commit 771366b Author: thisconnect <this@shiftcrypto.ch> Date: Thu Sep 29 09:33:37 2022 +0200 frontend: add translation feedback link As we are continuously adding and updating translations, we should have a way to give feedback for the translations to help us catch translation errors. Added a mailto link at the bottom of the guide and allow mailto links to be opened by the backend. Keeping the translation feedback english-only for now, as it is better if we get feedback in english than in the native language. commit 7268244 Merge: c147a51 9107a09 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 25 17:59:26 2022 +0200 Merge branch 'app-version' commit 9107a09 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 28 17:58:13 2022 +0200 frontend: add available updates check in settings This adds a new `Info` section in settings, which states the current version of the App and, in case of available updates, offers a download link. commit c147a51 Merge: 9976026 fdc9da2 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 16:37:00 2022 +0200 Merge branch 'frontend-nicer-pairing' commit fdc9da2 Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 20 18:03:57 2022 +0200 frontend: show point-to-device graphic on pairing step Before there was a disabled grayed out continue button on the pairing step when the user should focus on the device and confirm the code. Changed so that the is a point-to-device graphic without a disabled button. Once the pairing is confirmed it changes to a continue button. commit 9976026 Merge: dd390f9 f5a2a82 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 25 15:22:38 2022 +0200 Merge branch 'sats-coin' commit dd390f9 Merge: 169be46 bc63d73 Author: shonsirsha <seangeekpro@gmail.com> Date: Tue Oct 25 12:38:35 2022 +0200 Merge branch 'frontend-refactor-sdcardcheck' commit bc63d73 Author: shonsirsha <seangeekpro@gmail.com> Date: Mon Oct 24 16:03:46 2022 +0200 frontend: converted SDCardCheck to a functional component as a part of the refactoring process and to follow the latest conventions in the frontend, class components need to be converted into functional components whenever possible. commit 169be46 Merge: 47620fb 2880f90 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 25 11:32:48 2022 +0200 Merge remote-tracking branch 'benma/electrum-tsx' commit 47620fb Merge: b49cb73 b8d81a7 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 10:53:09 2022 +0200 Merge branch 'frontend-generic-continuebtn' commit f5a2a82 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Sep 20 17:18:07 2022 +0200 frontend: enable sats unit option for bitcoin accounts The main unit displayed in the app for bitcoin accounts is Bitcoin (BTC), but sometimes it can be easier to think in terms of Satoshi (sat), especially for lower amounts. This allows the user to choose the preferred unit using a switch in the expert settings section of the frontend. commit 2880f90 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:11:36 2022 +0200 frontend/electrum: convert electrum-servers to a FunctionalComponent commit a6f9cc4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 12:21:57 2022 +0200 frontend/electrum: use api functions instead of apiGet/apiPost commit 95eddbd Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 12:08:09 2022 +0200 frontend/electrum: convert to TypeScript and FunctionalComponent commit b49cb73 Merge: bd70f6c eb761c9 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 10:38:52 2022 +0200 Merge branch 'frontend-eslint-commaspacing' commit b8d81a7 Author: thisconnect <this@shiftcrypto.ch> Date: Mon Oct 24 16:02:08 2022 +0200 frontend: use generic continue translation The same translation for 'Continue' is used in various components, changed to use the same generic text everywhere instead of custom translation key. commit eb761c9 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 25 08:41:30 2022 +0200 frontend: enable comma-spacing Ensure space after comma, e.g. `fn(a, b)` for better readability and consistency. Updated code with `make webfix`. commit bd70f6c Merge: ff6fada c2a7e1d Author: Marko Bencun <marko@shiftcrypto.ch> Date: Mon Oct 24 10:02:01 2022 +0200 Merge remote-tracking branch 'benma/bb02abort' commit ff6fada Merge: dd1cabb 2fbc8f0 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:58 2022 +0200 Merge remote-tracking branch 'benma/qttransport' commit dd1cabb Merge: 37c5587 d008aeb Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:40 2022 +0200 Merge remote-tracking branch 'benma/functional-entry' commit 37c5587 Merge: 1e1e2c6 d739c60 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 19 17:00:19 2022 +0200 Merge remote-tracking branch 'benma/rem-envvar' commit d739c60 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 14:02:58 2022 +0200 qt: remove unused QT_BITBOX_ALLOW_EXTERNAL_URLS Introduced in 8a27bfe to enable the in-app lociz editor, which was removed again in 29a0764. commit d008aeb Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:55:55 2022 +0200 frontend/guide/entry: convert to FunctionalComponent The entry property was also changed from `EntryProp | string` to `EntryProp`, as the locize in-app editor (`cimode`) does not exist anymore (removed in 29a0764). commit fdbcbf2 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 13:42:12 2022 +0200 frontend/guide/entry: remove unused property 'highlighted' commit a4b75af Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 11:48:01 2022 +0200 frontend/settings: split electrum.jsx into one file per component Easier to convert to typescript piece by piece. commit 2fbc8f0 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 11:04:06 2022 +0200 frontend/qttransport: fully initialize channel before returning it I didn't observe a bug, but it is probably good to fully initialize the channel before returning it. commit 2475d8e Author: Marko Bencun <marko@shiftcrypto.ch> Date: Wed Oct 12 10:39:58 2022 +0200 frontend/qttransport: make initTransport more readable Use async/wait instead of Promises for greater readability. This also removes the need for using the `cache` variable, which was only used to indicate that we were waiting for the webchannel to be initialized. commit 1e1e2c6 Merge: 4e4e78d cf5b493 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 11 08:13:25 2022 +0200 Merge branch 'android-link' commit c2a7e1d Author: Marko Bencun <marko@shiftcrypto.ch> Date: Thu Sep 8 14:18:55 2022 +0200 frontend/bitbox02: abort SetPassword when the user aborts Before, the error was always assumed to be the password mismatch error, and the SetPassword workflow was invoked again immediately. Now we go back to the initial screen if the user aborts. The BitBox02 only returns the user abot error from this API endpoint from v9.13.0, before the two types of errors can not be distinguished. commit 4e4e78d Merge: b453ea3 bf91c80 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 11 01:02:33 2022 +0200 Merge remote-tracking branch 'benma/android-zimezone' commit b453ea3 Merge: 93eee08 3d361b4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 11 00:49:46 2022 +0200 Merge remote-tracking branch 'benma/android-31' commit cf5b493 Author: beerosagos <luca@shiftcrypto.ch> Date: Mon Oct 10 15:03:46 2022 +0200 android: add external link queries for Android 11 permissions With Android 11 the visibility of the installed packages has been filtered to offer a higher privacy level to the user. This commit add to AndroidManifest.xml the `queries` elements needed to open external links for web pages and `mailto` urls. Queries support is not granted in all Gradle versions. For this reason, the latter has been updated to v3.5.4. commit 93eee08 Merge: 64d1fe5 071e65b Author: thisconnect <this@shiftcrypto.ch> Date: Thu Oct 6 16:17:25 2022 +0200 Merge branch 'frontend-type-transports' commit 071e65b Author: thisconnect <this@shiftcrypto.ch> Date: Mon Sep 19 13:01:31 2022 +0200 frontend: type qt and android transport - updated global qt definition - added global definitions related to android - removed some unnecessary @ts-ignore related global android - moved common types to transport.common.ts to be able to share it (same types in qttransport.ts and androidtransport.ts) - typed request.ts but exact return type has to be defined in api, request just returns Promise<any> for now - the common types currently contains TMsgCallback, that is a call back type containing the payload pushed from the backend, temp. set to any but will be typed in the next PR with both legacy and new events commit 64d1fe5 Merge: addf34b 4359eb5 Author: beerosagos <luca@shiftcrypto.ch> Date: Thu Oct 6 14:53:32 2022 +0200 Merge branch 'android-build' commit 4359eb5 Author: beerosagos <luca@shiftcrypto.ch> Date: Thu Oct 6 09:39:20 2022 +0200 docs/BUILD.md: update instructions for Android build and deploy Updated BUILD.md with up to date instructions for Android build and deploy. commit addf34b Merge: 0ba090e aacd2d3 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 15:54:52 2022 +0200 Merge branch 'btc-formatting' commit aacd2d3 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 21 12:11:50 2022 +0200 frontend: adding trailing zeroes to BTC and LTC formatting Added trailing zeroes when displaying BTC/LTC amounts in the frontend, with the exception of the balances displayed in the header of account and accountsummary views. commit 0ba090e Merge: 69a1d52 762add1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 13:29:49 2022 +0200 Merge branch 'eth-testnet' commit 762add1 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Oct 4 16:22:21 2022 +0200 vendor: update bitbox02-api-go dependency ``` go get github.com/digitalbitbox/bitbox02-api-go@2c29561c5a4ca7f943f9d40b5ecd4e28da10fb17 go mod tidy go mod vendor ``` commit ff44918 Author: beerosagos <luca@shiftcrypto.ch> Date: Tue Sep 27 09:42:42 2022 +0200 backend: add Goerli ETH testnet network ETH merge happened recently, and Ropsten and Rinkeby testnets will soon be deprecated from Etherscan. This add support for the new Goerli testnet. commit 69a1d52 Merge: c9674d4 32387d1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 13:15:54 2022 +0200 Merge branch 'rates-error' commit c9674d4 Merge: cae608e 6cd7d12 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 5 12:40:34 2022 +0200 Merge branch 'frontend-refactor-account-III' commit 32387d1 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 12:18:36 2022 +0200 backend/conversions: fix nil conversions when rates not available Unexpected errors from coingecko service were causing the backend to send amounts with nil conversions field, which caused runtime errors on the frontend. With this update, a != nil conversions field should always be available even when coingecko errors accour, allowing the frontend to handle the situation without blocks. commit 6cd7d12 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Oct 5 12:00:34 2022 +0200 frontend: remove old account type information This was used before unified accounts were introduced. Removing. commit f28a897 Author: thisconnect <this@shiftcrypto.ch> Date: Wed Jul 27 09:29:49 2022 +0200 frontend: refactor account to functional component Ongoing effort to rewrite all class based components to functional components so we can use hooks. - typed check-sdcard api - typed buy-supported api - remove load decorator and load config directly commit cae608e Merge: 1b6370c e730b19 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Oct 5 11:28:32 2022 +0200 Merge branch 'fiat-historical' commit e730b19 Author: beerosagos <luca@shiftcrypto.ch> Date: Wed Sep 21 15:07:25 2022 +0200 frontend: modify fiat historical value placeholder in tx Fiat historical value is shown in tx detail. If the transaction is recent the value could be not available. The placeholder we used was '---' which led to poorly readable results for incoming/outgoing txs ('+---' or '----'). Now, if the amount is not available the placeholder is shown without the sign, which should be more readable. In the future it would be nice to refactor the FiatConversion component and limit the `sign` prop to '+' | '-'. commit bf91c80 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 4 21:20:40 2022 +0200 android: fix timezone so the BitBox02 shows the correct time On Android, due to a bug in Go (golang/go#20455), the local timezone is not correct. It is always UTC. As a result, when restoring a backup on the BitBox02, the BitBox02 displays the current time in UTC instead of the local time. This commit contains a workaround to fix the timezone on Android. Alternative considered: getting the timezone offset in native Android code and sending it to Go-land via backend.Environment. I did not pursue this as a quick search didn't turn up an easy way to get the timezone offset on Android which takes into account daylight-savings etc. commit 1b6370c Merge: 6054a36 47810e4 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 4 16:23:09 2022 +0200 Merge branch 'frontend-account-guide' commit 47810e4 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Oct 4 16:00:32 2022 +0200 frontend: remove old split account specific guide entries These were used in the settings page when we used to have separate accounts per script type, with toggles for each one. this is also all gone now with unified accounts and the multi-accounts feature. Also: there is now a script type guide in the receive screen. commit b1a2e72 Author: thisconnect <this@shiftcrypto.ch> Date: Tue Jul 26 17:36:29 2022 +0200 frontend: move account guide to its own component Moved isBTCScriptType to utils and the account guide to its own component so that account.tsx is slightly simpler and easier to refactor. commit 3d361b4 Author: Marko Bencun <marko@shiftcrypto.ch> Date: Tue Oct 4 10:51:02 2022 +0200 android: target api level 31, enforced by Google Play According to https://support.google.com/googleplay/android-developer/answer/11926878, the requirements as of now is that updating an app requires API level 31 (Android 12) by November 1st 2022. The exported attribute is set according to https://developer.android.com/about/versions/12/behavior-changes-12#exported: > If your app targets Android 12 or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components. commit 094abeb Author: jadzeidan <jad.zeidan@shiftcrypto.ch> Date: Mon Oct 3 21:09:12 2022 +0200 frontends: color variables refactoring Seperated text and background colors into their own variables. This makes colors easier to maintain because now it's possible to change text and background colors without affecting each other. Also some text used --color-softblack instead of a designated /* font colors */ variable. Changed this text to --color-default so it is consistant with the other text colors.
initLocal() in zoneinfo_android.go is hard-coded to UTC:
go/src/time/zoneinfo_android.go
Lines 43 to 46 in bc495c5
x/mobile currently uses a hack to set time.Local for gomobile android apps (golang/mobile@730f563), but that predates the availability of tzdata on android (80b31c0).
cc @eliasnaur @crawshaw #13581 #10857
The text was updated successfully, but these errors were encountered: