Commit Graph

377 Commits (9cabc0565a3b33220c50e86c235da919568119b9)

Author SHA1 Message Date
Severiano Jaramillo 9cabc0565a Avoid crash due to unsupported currency locale.
- Avoided a crash in ConnectedActivity when trying to obtain the Locale's associated currency, when a Locale does not have a currency.
- Standardized the process to obtain the coingecko supported currency, which will first try to use the current locale's currency and fallback to USD in case the first is not supported.
2019-12-25 17:15:19 -06:00
Severiano Jaramillo 766d42386a Migrate to the new graphenej version.
- Migrated the whole app to the new graphenej version, which removes the usage of the Android Service, enabling to aim for a better and simpler architecture.
- Did a good number of modifications to keep the same or better functionality in all parts of the app that use the NetworkService.
2019-12-19 16:37:45 -06:00
Nelson R. Perez 50ed47c797 Setting the fee asset to always be BTS 2019-11-11 14:20:47 -05:00
Nelson R. Perez 208238c7ed Merge branch 'develop' of github.com:Agorise/bitsy-wallet into develop 2019-11-07 16:39:35 -05:00
Nelson R. Perez f8b7a11ba9 Introducing a supported currencies cache for the equivalent values feature
- In case the device is without connectivity, we cannot check in real time what the list of supported currencies is from the coingecko API. For this special corner cases we store a cache of this currency list.
2019-11-07 16:36:49 -05:00
Nelson R. Perez 2ef589526d Optimization change
- Spawning a new thread only when actually purging the database
2019-11-07 15:37:32 -05:00
Severiano Jaramillo 0092f2b225 Merge branch 'develop' of github.com:Agorise/bitsy-wallet into develop 2019-11-06 21:36:57 -06:00
Severiano Jaramillo b9bb333c7c Animate Share icon in Receive and eReceipt.
- Created a Share icon animation using the ObjectAnimator API and used it in both eReceipt and Receive Transaction screens.
2019-11-06 21:34:20 -06:00
Nelson R. Perez 8f70b3965d Fixing wrong database entries & making the equivalent value currency dynamic
- Purging invalid entries of the 'equivalent_values' table
- Displaying whathever currency the user happen to have selected *at the moment*. The previous implementation had a flaw that would have made the currency that was used to calculate the equivalent values in first stick, even if the user changed to another locale settings later.
2019-11-06 16:53:39 -05:00
Severiano Jaramillo 710ba72875 Increase QR code margin in receive screen.
- Increased the margin of the QR codes generated in the Receive Transaction screen, so that they are easier to read using low end devices, specially when the app is in night mode.
2019-11-05 20:13:13 -06:00
Nelson R. Perez 1422ed699e Fixes to the equivalent values
- Only inserting an equivalent value into the database in case the value is equal non-negative (negative values are a result of errors)
- Using USD as fallback equivalent value currency
2019-11-05 12:58:43 -05:00
Severiano Jaramillo 67b70e3df2 Limit the memo length to 100 in the Send screen.
- For some reason if we use a memo longer than 107 chars we get an error, to avoid that error we are limiting the memo length to 100 chars using TextInputLayout's counter options to show the current char count and the max char count. If the current char count exceeds the max the TextInputLayout turns to red and the Send button is disabled.
2019-10-31 15:17:18 -06:00
Severiano Jaramillo 36c9c5928e Disable Agorise fees on debug builds. 2019-10-31 14:09:09 -06:00
Severiano Jaramillo be205ea765 Increase Receive QRCode margin.
Increased the margin of the QR codes shown in the Receive screen, to make it easier for other phones to scan the QRs when the app is in night mode.
2019-10-31 12:59:53 -06:00
Severiano Jaramillo 218b5952ac Fetch all tellers from the webservice.
- Modified the method that fetches the tellers from the webservice to keep requesting the tellers list until nothing is returned, to make sure the whole list of tellers is obtained.
2019-10-31 12:26:57 -06:00
Severiano Jaramillo 0ae587a7aa Fetch all merchants from the webservice.
- Modified the method that fetches the merchants from the webservice to keep requesting the merchants list until nothing is returned, to make sure the whole list of merchants is obtained.
- Modified the time the app waits to update the merchants and tellers list from 24 hours to just 3 hours.
2019-10-31 12:13:27 -06:00
Severiano Jaramillo d14c10c672 Avoid crash in SendTransactionFragment.
- The crash was happening because the dialog that verifies the automatic time was being created in onResume, so if the user leaved the application while the fragment was showing and returned to it later another multiple dialogs would be created. The first one to be accepted correctly navigates the user back, but the second creates a crash because references a no longer existing fragment. The dialog creation was moved to onViewCreated instead, so that only one dialog is created.
2019-10-30 18:19:36 -06:00
Severiano Jaramillo f8ff73f45c Verify time sync is enabled.
- Trying to send a transaction in SendTransactionFragment can fail if the date/time is not correctly synced. A Time Sync Error dialog was created to warn the user about that situation so that they can take action and be able to correctly send transactions from bitsy.
- Translated the strings used in the Time Sync Error dialog to all supported languages, and hand corrected the Spanish version.
2019-10-02 10:06:28 -05:00
Severiano Jaramillo 27f54e798e Log exception in SendTransaction to Crashlytics.
- A user is having issues with its active private key, but we have not enugh information to solve the problem. A possible exception causing this issue will be logged to Crashlytics so that we can understand what is going on and solve it.
2019-10-01 17:38:50 -05:00
Severiano Jaramillo 5c6c727b00 Update PDF generation library.
- Added the PDFjet library as a Java Library module to the project and moved all the logic to create the transactions PDF in the TransactionsFragment to use the new PDF lib instead of the old one.
- Fixed the time formatter that was being used to format the transaction's times in exported PDF/CSV files, it was printing months in the place of minutes.
2019-10-01 16:39:35 -05:00
Severiano Jaramillo ed5cdb6d49 Avoid crash in NodeRepository.
- The crash was happening due to an unhandled exception, the problem was that the statement that was raising an exception was out of the try/catch block.
2019-09-27 17:50:32 -05:00
Severiano Jaramillo eecc28bb06 Fix comma issue in SendTransactionFragment.
- The amount field in the SendTransactionsFragment wasn't prepared to deal with Locales where the decimal separator is a comma. In order to deal with that internally, the commas in the amount are first converted to points before trying to convert the amount string to a double.
2019-09-25 22:23:22 -05:00
Severiano Jaramillo f6d00053db Update a bunch of libraries.
- Updated a bunch of libraries, fixed a couple of issues, and tested everything else worked correctly.
- Updated both compileSdkVersion and targetSdkVersion to 29 (Android 10).
2019-09-10 18:37:21 -05:00
Severiano Jaramillo a1c494266c Fix string templates.
- Fixed the string templates created with Vin's tool. Some of the languages mess up with the templates and need to be fixed by hand.
2019-09-04 16:01:39 -05:00
Severiano Jaramillo bad25f57fc Scroll up when new transactions are found.
- Added a mechanism to automatically scroll to the top in the TransactionsFragment when the difference between the old and new list of transactions is 1, which most probably means that a new transaction was detected.
2019-09-04 12:37:25 -05:00
Severiano Jaramillo fa8d6cb85f Add account ID to crashlytics reports.
- Added the account ID to the crashlytics reports so that we can verify if a crash can be related to an account specific situation.
2019-09-04 11:49:00 -05:00
Severiano Jaramillo b10d9e0196 Default request QR code to BTS.
- In ReceiveTransactionFragment, default the QR code to BTS in case the user has no balances so that he can easily show that QR to others and ask for funds.
2019-09-03 16:25:08 -05:00
Severiano Jaramillo 48f6304fd3 Fix create account validation.
- The create account transaction is paid by our faucet, for that reason we won't let users register premium account names for now. A couple of validations were added to make sure the account the user wants to create is not premium: account length has to be greater than 2 chars, account name has to start with a letter, and restrictions like having at least one dash, number or no vowels.
2019-09-03 14:31:09 -05:00
Severiano Jaramillo 544b79321b Add the Remove Account functionality.
- Created the functionality to completely remove the current user account and its corresponding data from the database and the shared preferences, which will restart the whole application avoiding showing the License again.
2019-09-02 19:22:10 -05:00
Severiano Jaramillo e2008e5bcd Show remove account confirmation.
- Created a Remove Account confirmation Dialog that appears when the user taps the REMOVE button. If the user has a PIN/Pattern selected, he must enter it successfully before showing the confirmation Dialog.
2019-09-02 11:45:05 -05:00
Severiano Jaramillo 70d5e3d4d2 Remove a couple of not needed TODOs. 2019-08-30 19:52:23 -05:00
Severiano Jaramillo 232d81baa8 Stay at top in the Nodes Dialog.
- Add a method to the Nodes Dialog in the Settings, so that the list of nodes always stays at the top and shows the best nodes.
2019-08-29 12:15:31 -05:00
Severiano Jaramillo 3c0d2091d8 Update material-dialogs library.
- Updated the material-dialogs library, and its usages to reflect the new code style 100% focused on Kotlin.
2019-08-29 12:09:34 -05:00
Severiano Jaramillo a42736b738 Improved Nodes Dialog.
- Made a couple of improvements to the Nodes Dialog in the Settings, so that it complies with the Nodes Dialog in PalmPay.
2019-08-29 11:46:22 -05:00
Severiano Jaramillo e2637ddfa4 Keep the app connected to the best node.
- Added a recurrent method that verifies every minute that the app is connected to the best node, and if that is not the case then it requests a reconnection.
2019-08-29 11:06:17 -05:00
Severiano Jaramillo 855f47e793 Generate QR in background thread.
- Moved the logic to generate the QR Code image from ReceiveTransactionFragment to its ViewModel (ReceiveTransactionViewModel), and used coroutines to send that process to a background thread to make sure this does not freeze the UI.
2019-08-27 13:47:25 -05:00
Severiano Jaramillo 2a88821710 Create ReceiveTransactionViewModel.
- The ReceiveTransactionFragment was using two ViewModels, which is not recommended. According to Google's MVVM guidelines, each activity/fragment should have only one ViewModel and that ViewModel should be coupled to only one activity/fragment. For that reason the methods used in the two ViewModels in ReceiveTransactionFragment were merged into ReceiveTransactionViewModel.
2019-08-27 11:21:26 -05:00
Severiano Jaramillo 7603546424 Fix NetworkService connection issue.
- The NetworkServiceManager expects a call to onActivityResumed after it has been configured to start the connection with the NetworkManager. But because we are using a single activity architecture, the call to onActivityResumed the first time the app starts is called before configuring the NetworkServiceManager thus leaving the NetworkService disconnected until another onResume activity lifecycle event is received. A fake call to onActivityResumed in NetworkServiceManager was added right after it has been configured in BitsyApplication to address this issue.
2019-08-26 11:44:08 -05:00
Severiano Jaramillo 765ed13a6a Add the nodes WS to Bitsy.
- Renamed the MerchantsWebservice to BitsyWebservice because it is now going to serve as a source of information of more than just merchants and tellers, but also the nodes the app is gonna connect to.
- Created new NodeRepository which will be in charge of accessing and updating the nodes database table with the information obtained from the webservice.
- Bitsy is now going to try to obtain the list of nodes it is going to try to connect to from the dabatase and use a hardcoded list as a fallback. The list of nodes in the database is updated regularly as well as their respective latency, so that in future app's startups it can use those latencies to immediately connect to the best node in the last app session.
2019-08-23 14:41:00 -05:00
Severiano Jaramillo b077de95ac Create nodes database table.
- Added the library dependency to use Kotlin Coroutines with Room.
- Created the Node Room Entity, which will create the nodes database table.
- Created NodeDao, which will be responsible to access the Room entity (nodes database table).
- Created a Room database migration, to create the nodes database table in existing instalations updating to the new version.
2019-08-23 12:48:58 -05:00
Severiano Jaramillo 1abbe95083 Add Kotlin's Parcelize to FilterOptions.
- Enabled Kotlin's Parcelize annotation and used it to easily make FilterOptions Parcelable.
- Converted the ServiceGenerator class to Kotlin. This is a helper class that generates instances of Retrofit Services.
2019-08-22 11:41:05 -05:00
Severiano Jaramillo 2b4b520c5d Update a bunch of libraries.
- The project had been stale for a couple of months, so a lot of libraries were outdated. I updated most of the outdated libraries and verified everything kept working correctly.
- Simplified the ServiceGenerator, removing some stuff that is not used.
2019-08-22 11:02:09 -05:00
Severiano Jaramillo 1e75e369dc Avoid crash in Transactions' FilterOptionsDialog.
- This crash was being caused when the user tried to filter the transactions in the Transactions screen, but the user has no balances (existent or downloaded). The app was not prepared to handle that case.
2019-08-21 17:48:51 -05:00
Severiano Jaramillo 31073e2acf Fix crash in BalancesFragment.
- The crash was happening in a very weird scenario, but it was good because it forced us to search an alternative to update the BalancesFragment when the user navigates back to the HomeFragment. The solution was to use the childFragmentManager instead of the fragmentManager to create the PagerAdapter used in the ViewPager that displays the BalancesFragment. Basically, because we are using nested fragments we need to use the childFragmentManager instead of just the fragmentManager, to use the correct LyfeCycle events.
2019-08-21 15:09:59 -05:00
Severiano Jaramillo 6482b31971 Avoid crash in TransferDetailsAdapter.
- This is the adapter that populates the list of transactions in the TransactionsFragment, the crash was happening when the user tapped two or more items in the list at the same time. When that happens only the first item tapped opens its corresponding eReceipt correctly but the remaining ones throw an excpeption which was not being handled correctly and causing a crash.
2019-08-21 14:40:38 -05:00
Severiano Jaramillo 39a3e6b7d4 Avoid crash in SettingsFragment
- Avoided crash in SettingsFragment when trying to decrypt the WIF, but logged the exception to Crashlytics in case we find out this problem persists.
2019-08-21 14:05:11 -05:00
Severiano Jaramillo ae3498e103 Avoid crash in SendTransactionFragment
- Avoided crash in SendTransactionFragment when trying to decrypt the WIF, but logged the exception to Crashlytics in case we find out this problem persists.
2019-08-21 13:56:16 -05:00
Severiano Jaramillo 54c8bbce19 Fix Crashlytics proguard rules.
- Fixed crashlytics Retrofit models proguard rules.
- Updated the Gradle plugin version.
- Improved readability of Asset and TransferDetail DAOs (Database Data Access Objects).
2019-08-21 13:34:49 -05:00
Severiano Jaramillo 6df56b068b Improved transactions filtering algorithm in TransactionsFragment, to include the memo when searching with a text query. 2019-05-06 13:28:28 -05:00
Severiano Jaramillo 1528960bed Added a node to the list of nodes the app can connect to. 2019-04-26 16:53:06 -05:00