Removed the buttons that allowed navigation between the two screens, which has the nice benefit of removing the second way that the user could enter the Send flow. Lastly, split the address back into 8 parts and did other UI cleanup on the receive screen.
Most of these changes center around managing addresses. We might want to further compose the MainActivity and allow another object to handle these capabilities but for now they live in a place that's central for all fragments.
Since we do not want to pester users most of our dialogs, going forward, will prompt the user select a setting not to see them again. This commit also gets rid of two separate approaches for sharedPreferences and settles on a second instance of lockbox. Our current lockbox is used for keys so we create another that contains no cryptographic info and use it for settings. This will use the device's secure element, when present and do the most secure thing falling back to our minSDK.
which automatically handles some of the more complex state management. Without this change, the recyclerview would lose its scroll position after viewing tx details. Now it handles it perfectly due to setting transactionAdapter.stateRestorationPolicy =
RecyclerView.Adapter.StateRestorationPolicy.PREVENT_WHEN_EMPTY
If a crash occurs before feedback is started then attempting to report that crash will, itself, crash because the lateinit feedback instance is not initialized. The result is a black screen on launch! This fixes that by catching everything while trying to report an error.
After a transaction was sent, the old value would linger. That's fine in the case of a failure so the user can try again but it is not okay after completing a transaction. The issue was that the fragment was staying in memory and it's UiModel was still available. The fix is to let the SendViewModel be the source of truth about what amount the user has entered.
Previously, it would chop off the last transaction which happens to be what users are most interested in seeing. This was happening because the scroll was being called before the list contents were fully loaded from the database so we were scrolling to the top of an empty list.
This is important because sync times are getting longer, every day. If users can see and input a more accurate birthday, then they will have dramatically improved sync times.
Addresses #183 but still allows the UI to show things as it did, before. We removed the aggressive address parsing because it is not necessary and might lead to vulnerabilities.
Avoids shell injection by verifying that the supplied value is a file. Also allows for spaces in the file path, which probably fixes certaind devices that were crashing when trying to open logs.
Whenever something is scanned that is not a proper address for the given network, the user will be presented with that value and an error message. This requires a bit of additional support in the SDK but, for now, a workaround is enough.
Replaced doBeforeTextChanged and doAfterTextChanged calls with a TextWatcher
Moved the limitDecimalPlaces code to the EditText ext
Implemented uniform currency formatter functions
Hugely simplified limitDecimalPlaces code
This fixes all cases related to the user's locale
Adds a zero in front of the amount if dot is entered on the send screen
Prevents and removes odd leading zeroes in the address text input on the send screen