From e993dc064760a7e6f3d16f456bead3c3ea246a95 Mon Sep 17 00:00:00 2001 From: Tangem Date: Thu, 1 Dec 2022 14:40:31 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .idea/codeStyles/Project.xml | 3 +- .idea/codeStyles/codeStyleConfig.xml | 2 +- .idea/inspectionProfiles/Project_Default.xml | 4 +- app/build.gradle.kts | 1 + app/src/main/AndroidManifest.xml | 6 +- app/src/main/assets/tangem-app-config | 2 +- .../com/tangem/tap/LockUserWalletsTimer.kt | 115 +++++ .../main/java/com/tangem/tap/MainActivity.kt | 19 +- .../java/com/tangem/tap/TapApplication.kt | 46 +- .../com/tangem/tap/common/extensions/Store.kt | 5 +- .../com/tangem/tap/common/redux/AppState.kt | 5 +- .../redux/LockUserWalletsTimerMiddleware.kt | 15 + .../common/redux/global/GlobalMidlleware.kt | 6 +- .../com/tangem/tap/domain/TangemSdkManager.kt | 54 ++- .../com/tangem/tap/domain/TapWalletManager.kt | 74 ++- .../configurable/config/ConfigManager.kt | 2 +- .../com/tangem/tap/domain/model/UserWallet.kt | 2 + .../tap/domain/model/WalletDataModel.kt | 6 + .../tap/domain/model/WalletStoreModel.kt | 4 +- .../model/builders/WalletStoreBuilder.kt | 77 ++++ .../tap/domain/scanCard/ScanCardProcessor.kt | 4 +- .../tasks/product/CreateProductWalletTask.kt | 2 + .../domain/tasks/product/ScanProductTask.kt | 3 + .../tap/domain/twins/TwinCardsManager.kt | 20 +- .../userWalletList/UserWalletListError.kt | 40 ++ .../di/UserWalletsListManagerProvider.kt | 68 ++- .../BiometricUserWalletsListManager.kt | 303 +++++++++++++ .../model/UserWalletEncryptionKey.kt | 33 ++ .../model/UserWalletInformation.kt | 20 + .../SelectedUserWalletRepository.kt | 8 + .../repository/UserWalletsKeysRepository.kt | 12 + .../UserWalletsPublicInformationRepository.kt | 15 + ...erWalletsSensitiveInformationRepository.kt | 16 + .../BiometricUserWalletsKeysRepository.kt | 106 +++++ .../DefaultSelectedUserWalletRepository.kt | 30 ++ ...tUserWalletsPublicInformationRepository.kt | 84 ++++ ...erWalletsSensitiveInformationRepository.kt | 142 ++++++ .../utils/ByteArrayListExtensions.kt | 9 + .../tap/domain/userWalletList/utils/Mapper.kt | 58 +++ .../utils/json/ByteArrayKeyAdapter.kt | 29 ++ .../utils/json/CardBackupStatusAdapter.kt | 57 +++ .../json/ExtendedPublicKeysMapAdapter.kt | 57 +++ .../json/ScanResponseDerivedKeysMapAdapter.kt | 52 +++ .../utils/json/WalletDerivedKeysMapAdapter.kt | 56 +++ .../WalletCurrenciesManager.kt | 30 ++ .../di/WalletCurrenciesManagerProvider.kt | 25 + .../DefaultWalletCurrenciesManager.kt | 205 +++++++++ .../domain/walletStores/WalletStoresError.kt | 39 ++ .../di/WalletsStoresManagerProvider.kt | 22 + .../DefaultWalletStoresManager.kt | 174 +++++++ .../utils/CompletitionsResultOperations.kt | 27 ++ .../repository/WalletAmountsRepository.kt | 26 ++ .../repository/WalletManagersRepository.kt | 25 + .../repository/WalletStoresRepository.kt | 30 ++ .../repository/di/RepositoryProvider.kt | 26 ++ .../DefaultWalletAmountsRepository.kt | 427 ++++++++++++++++++ .../DefaultWalletManagersRepository.kt | 192 ++++++++ .../DefaultWalletStoresRepository.kt | 91 ++++ .../utils/WalletDataOperations.kt | 181 ++++++++ .../utils/WalletStoreOperations.kt | 93 ++++ .../storage/WalletManagerStorage.kt | 36 ++ .../storage/WalletStoresStorage.kt | 51 +++ .../features/details/redux/DetailsAction.kt | 16 +- .../details/redux/DetailsMiddleware.kt | 161 ++++++- .../features/details/redux/DetailsReducer.kt | 19 +- .../features/details/redux/DetailsState.kt | 2 + .../ui/appsettings/AppSettingsScreen.kt | 29 +- .../ui/appsettings/AppSettingsScreenState.kt | 6 +- .../ui/appsettings/AppSettingsViewModel.kt | 13 + .../details/ui/details/DetailsScreenState.kt | 4 + .../details/ui/details/DetailsViewModel.kt | 6 +- .../tangem/tap/features/home/HomeFragment.kt | 10 +- .../tap/features/home/redux/HomeMiddleware.kt | 207 ++------- .../features/onboarding/OnboardingHelper.kt | 47 ++ .../note/redux/OnboardingNoteMiddleware.kt | 9 +- .../redux/OnboardingOtherCardsMiddleware.kt | 9 +- .../products/twins/redux/TwinCardsAction.kt | 5 +- .../twins/redux/TwinCardsMiddleware.kt | 36 +- .../products/twins/redux/TwinCardsState.kt | 17 +- .../products/twins/ui/TwinsCardsFragment.kt | 11 +- .../redux/OnboardingWalletMiddleware.kt | 12 +- .../saveWallet/redux/SaveWalletAction.kt | 2 +- .../saveWallet/redux/SaveWalletMiddleware.kt | 51 ++- .../saveWallet/redux/SaveWalletReducer.kt | 8 +- .../saveWallet/redux/SaveWalletState.kt | 4 +- .../ui/SaveWalletBottomSheetFragment.kt | 8 +- .../send/redux/middlewares/SendMiddleware.kt | 47 +- .../tap/features/send/ui/SendFragment.kt | 30 +- .../features/tokens/redux/TokensMiddleware.kt | 137 +++--- .../tap/features/wallet/redux/WalletAction.kt | 38 +- .../tap/features/wallet/redux/WalletState.kt | 16 +- .../middlewares/AppCurrencyMiddleware.kt | 14 +- .../middlewares/MultiWalletMiddleware.kt | 68 ++- .../redux/middlewares/WalletMiddleware.kt | 125 +++-- .../redux/middlewares/WarningsMiddleware.kt | 14 +- .../redux/reducers/MultiWalletReducer.kt | 20 +- .../wallet/redux/reducers/WalletReducer.kt | 189 +++++++- .../tap/features/wallet/ui/BalanceWidget.kt | 2 +- .../wallet/ui/WalletDetailsFragment.kt | 45 +- .../tap/features/wallet/ui/WalletFragment.kt | 24 +- .../tap/features/wallet/ui/WalletViewModel.kt | 39 ++ .../wallet/ui/adapters/WalletAdapter.kt | 25 +- .../wallet/ui/images/CurrencyIconView.kt | 2 + .../wallet/ui/wallet/MultiWalletView.kt | 16 +- .../wallet/ui/wallet/SingleWalletView.kt | 12 +- .../features/welcome/ui/WelcomeFragment.kt | 8 +- app/src/main/res/drawable/ic_tap_card_24.xml | 27 ++ .../drawable/shape_rectangle_rounded_100.xml | 2 +- .../res/layout/card_total_balance_shimmer.xml | 12 +- .../res/layout/layout_card_total_balance.xml | 132 +++--- app/src/main/res/values/styles.xml | 9 + buildSrc/src/main/java/Versions.kt | 2 +- .../com/tangem/core/ui/res/TangemShapes.kt | 5 +- .../res/values-it/strings_plurals_final.xml | 2 + .../src/main/res/values-ru/strings_final.xml | 2 + core/ui/src/main/res/values/strings_final.xml | 1 + .../java/com/tangem/domain/common/CardInfo.kt | 14 + .../domain/common/util/CardExtensions.kt | 20 +- .../tangem/domain/common/util/UserWalletId.kt | 6 + 119 files changed, 4449 insertions(+), 720 deletions(-) create mode 100644 app/src/main/java/com/tangem/tap/LockUserWalletsTimer.kt create mode 100644 app/src/main/java/com/tangem/tap/common/redux/LockUserWalletsTimerMiddleware.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/model/builders/WalletStoreBuilder.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/UserWalletListError.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/implementation/BiometricUserWalletsListManager.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/model/UserWalletEncryptionKey.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/model/UserWalletInformation.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/repository/SelectedUserWalletRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/repository/UserWalletsKeysRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/repository/UserWalletsPublicInformationRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/repository/UserWalletsSensitiveInformationRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/repository/implementation/BiometricUserWalletsKeysRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/repository/implementation/DefaultSelectedUserWalletRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/repository/implementation/DefaultUserWalletsPublicInformationRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/repository/implementation/DefaultUserWalletsSensitiveInformationRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/utils/ByteArrayListExtensions.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/utils/Mapper.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/utils/json/ByteArrayKeyAdapter.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/utils/json/CardBackupStatusAdapter.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/utils/json/ExtendedPublicKeysMapAdapter.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/utils/json/ScanResponseDerivedKeysMapAdapter.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/userWalletList/utils/json/WalletDerivedKeysMapAdapter.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletCurrencies/WalletCurrenciesManager.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletCurrencies/di/WalletCurrenciesManagerProvider.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletCurrencies/implementation/DefaultWalletCurrenciesManager.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/WalletStoresError.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/implementation/DefaultWalletStoresManager.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/implementation/utils/CompletitionsResultOperations.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/repository/WalletAmountsRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/repository/WalletManagersRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/repository/WalletStoresRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/repository/di/RepositoryProvider.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/repository/implementation/DefaultWalletAmountsRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/repository/implementation/DefaultWalletManagersRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/repository/implementation/DefaultWalletStoresRepository.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/repository/implementation/utils/WalletDataOperations.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/repository/implementation/utils/WalletStoreOperations.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/storage/WalletManagerStorage.kt create mode 100644 app/src/main/java/com/tangem/tap/domain/walletStores/storage/WalletStoresStorage.kt create mode 100644 app/src/main/java/com/tangem/tap/features/wallet/ui/WalletViewModel.kt create mode 100644 app/src/main/res/drawable/ic_tap_card_24.xml create mode 100644 domain/src/main/java/com/tangem/domain/common/CardInfo.kt diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 76a59bafa3..6527894333 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -12,6 +12,7 @@