From 542fa7c68092620ba6250a4090207e066924f6a5 Mon Sep 17 00:00:00 2001 From: "a.petrushin" Date: Fri, 17 May 2024 22:05:07 +0300 Subject: [PATCH 1/6] squash --- .idea/.name | 2 +- .idea/gradle.xml | 1 + .idea/misc.xml | 1 + .../wallet/data/account/legacy/Debug.kt | 2 +- apps/wallet/data/stonfi/.gitignore | 1 + apps/wallet/data/stonfi/build.gradle.kts | 35 ++ .../data/stonfi/src/main/AndroidManifest.xml | 1 + .../com/tonapps/wallet/data/stonfi/Module.kt | 7 + .../wallet/data/stonfi/StonfiRepository.kt | 33 ++ .../wallet/data/stonfi/api/StonfiApi.kt | 73 +++ .../data/stonfi/entities/StonfiAsset.kt | 46 ++ .../data/stonfi/entities/StonfiAssetKind.kt | 11 + .../stonfi/entities/StonfiAssetResponse.kt | 9 + .../stonfi/entities/StonfiPairResponse.kt | 8 + .../data/stonfi/entities/StonfiSimulate.kt | 32 ++ apps/wallet/instance/build.gradle.kts | 2 + .../main/java/com/tonapps/tonkeeper/App.kt | 14 +- .../tonapps/tonkeeper/extensions/Numbers.kt | 10 + .../tonapps/tonkeeper/extensions/String.kt | 14 +- .../tonkeeper/fragment/pager/PagerAdapter.kt | 23 + .../tonkeeper/fragment/pager/PagerScreen.kt | 46 ++ .../fragment/send/amount/AmountScreen.kt | 32 +- .../fragment/send/confirm/ConfirmScreen.kt | 1 - .../fragment/send/pager/PagerScreen.kt | 4 +- .../send/recipient/RecipientScreen.kt | 1 - .../tonkeeper/fragment/swap/SlippageScreen.kt | 107 +++++ .../fragment/swap/SlippageViewModel.kt | 22 + .../tonkeeper/fragment/swap/SwapScreen.kt | 244 ++++++++++ .../fragment/swap/SwapScreenConfirm.kt | 123 +++++ .../tonkeeper/fragment/swap/SwapViewModel.kt | 427 ++++++++++++++++++ .../fragment/swap/assets/AssetsListAdapter.kt | 22 + .../fragment/swap/assets/AssetsScreen.kt | 87 ++++ .../swap/assets/holder/AssetItemHolder.kt | 54 +++ .../swap/assets/holder/AssetLabelHolder.kt | 30 ++ .../swap/assets/holder/AssetSuggestsHolder.kt | 16 + .../fragment/swap/assets/item/AssetItem.kt | 35 ++ .../tonkeeper/fragment/swap/model/Simulate.kt | 15 + .../tonkeeper/fragment/swap/model/Slippage.kt | 12 + .../fragment/swap/model/SwapButtonState.kt | 53 +++ .../fragment/swap/model/SwapConfirmArgs.kt | 14 + .../fragment/swap/model/SwapState.kt | 41 ++ .../fragment/swap/model/SwapTarget.kt | 9 + .../com/tonapps/tonkeeper/koin/KoinModule.kt | 3 + .../component/KeyboardInsetFrameLayout.kt} | 4 +- .../ui/component/swap/BaseSwapView.kt | 56 +++ .../ui/component/swap/ReceiveSwapView.kt | 180 ++++++++ .../ui/component/swap/SearchInputView.kt | 61 +++ .../ui/component/swap/SendSwapView.kt | 62 +++ .../ui/component/swap/SwapButtonView.kt | 84 ++++ .../tonkeeper/ui/component/swap/SwapView.kt | 54 +++ .../ui/component/swap/TokenButtonView.kt | 53 +++ .../screen/browser/main/BrowserMainScreen.kt | 2 +- .../{StonfiBridge2.kt => StonfiBridge.kt} | 3 +- .../tonkeeper/ui/screen/swap/SwapScreen.kt | 5 +- .../wallet/list/holder/ActionsHolder.kt | 3 +- .../src/main/res/layout/fragment_assets.xml | 60 +++ .../main/res/layout/fragment_send_amount.xml | 3 +- .../res/layout/fragment_slippage_settings.xml | 96 ++++ .../src/main/res/layout/fragment_swap.xml | 95 +++- .../main/res/layout/fragment_swap_confirm.xml | 74 +++ .../src/main/res/layout/fragment_swap_web.xml | 11 + .../src/main/res/layout/shimmer_swap.xml | 92 ++++ .../src/main/res/layout/view_cell_asset.xml | 85 ++++ .../res/layout/view_search_input_simple.xml | 27 ++ .../src/main/res/layout/view_swap.xml | 42 ++ .../src/main/res/layout/view_swap_button.xml | 28 ++ .../src/main/res/layout/view_swap_receive.xml | 186 ++++++++ .../src/main/res/layout/view_swap_send.xml | 126 ++++++ .../src/main/res/layout/view_token_button.xml | 31 ++ .../instance/src/main/res/values/dimen.xml | 4 + .../instance/src/main/res/values/ids.xml | 4 + .../src/main/res/values/styleable.xml | 12 + .../src/main/res/values-ru/strings.xml | 8 + .../src/main/res/values/strings.xml | 30 ++ buildSrc/src/main/kotlin/Dependence.kt | 12 +- settings.gradle.kts | 1 + ui/uikit/core/build.gradle.kts | 2 + ui/uikit/core/src/main/assets/main.js | 2 + ui/uikit/core/src/main/assets/stonfi.html | 29 ++ .../src/main/java/uikit/base/BaseFragment.kt | 6 +- .../java/uikit/drawable/InputAutoDrawable.kt | 149 ++++++ .../uikit/drawable/SelectButtonDrawable.kt | 124 +++++ .../main/java/uikit/drawable/TagDrawable.kt | 65 +++ .../main/java/uikit/extensions/Animation.kt | 15 + .../src/main/java/uikit/extensions/Dimens.kt | 13 +- .../java/uikit/extensions/SpannableString.kt | 12 + .../main/java/uikit/extensions/TextPaint.kt | 23 + .../src/main/java/uikit/extensions/View.kt | 12 + .../main/java/uikit/navigation/Navigation.kt | 2 + .../uikit/navigation/NavigationActivity.kt | 18 +- .../src/main/java/uikit/spannable/SpanTag.kt | 77 ++++ .../main/java/uikit/widget}/AmountInput.kt | 25 +- .../java/uikit/widget/BottomSheetLayout.kt | 1 + .../main/java/uikit/widget/DescriptionView.kt | 45 ++ .../uikit/widget/DetailDescriptionView.kt | 64 +++ .../java/uikit/widget/DetailLoadingView.kt | 72 +++ .../src/main/java/uikit/widget/FrescoView.kt | 4 +- .../src/main/java/uikit/widget/HeaderView.kt | 22 +- .../java/uikit/widget/InputRoundedView.kt | 110 +++++ .../src/main/java/uikit/widget/LabelView.kt | 30 ++ .../main/java/uikit/widget/PreferenceView.kt | 67 +++ .../java/uikit/widget/SelectButtonView.kt | 30 ++ .../widget/webview/bridge/BridgeWebView.kt | 4 +- .../widget/webview/bridge/StonfiWebView.kt | 44 ++ .../res/drawable/bg_button_content_16.xml | 9 + .../main/res/drawable/bg_content_tint_4.xml | 6 + .../res/drawable/bg_oval_button_tertiary.xml | 5 +- .../src/main/res/drawable/bg_tertiary_16.xml | 6 + .../res/drawable/ic_information_circle.xml | 5 + .../src/main/res/layout/view_description.xml | 24 + .../res/layout/view_detail_description.xml | 42 ++ .../main/res/layout/view_detail_loading.xml | 28 ++ .../core/src/main/res/layout/view_header.xml | 2 + .../main/res/layout/view_percent_input.xml | 39 ++ .../src/main/res/layout/view_preference.xml | 43 ++ ui/uikit/core/src/main/res/values/dimens.xml | 9 + .../core/src/main/res/values/styleable.xml | 28 ++ .../src/main/res/drawable/ic_sliders_16.xml | 7 + .../main/res/drawable/ic_swap_vertical_16.xml | 16 + .../res/drawable/ic_swap_vertical_down_16.xml | 12 + .../res/drawable/ic_swap_vertical_up_16.xml | 12 + 121 files changed, 4584 insertions(+), 93 deletions(-) create mode 100644 apps/wallet/data/stonfi/.gitignore create mode 100644 apps/wallet/data/stonfi/build.gradle.kts create mode 100644 apps/wallet/data/stonfi/src/main/AndroidManifest.xml create mode 100644 apps/wallet/data/stonfi/src/main/java/com/tonapps/wallet/data/stonfi/Module.kt create mode 100644 apps/wallet/data/stonfi/src/main/java/com/tonapps/wallet/data/stonfi/StonfiRepository.kt create mode 100644 apps/wallet/data/stonfi/src/main/java/com/tonapps/wallet/data/stonfi/api/StonfiApi.kt create mode 100644 apps/wallet/data/stonfi/src/main/java/com/tonapps/wallet/data/stonfi/entities/StonfiAsset.kt create mode 100644 apps/wallet/data/stonfi/src/main/java/com/tonapps/wallet/data/stonfi/entities/StonfiAssetKind.kt create mode 100644 apps/wallet/data/stonfi/src/main/java/com/tonapps/wallet/data/stonfi/entities/StonfiAssetResponse.kt create mode 100644 apps/wallet/data/stonfi/src/main/java/com/tonapps/wallet/data/stonfi/entities/StonfiPairResponse.kt create mode 100644 apps/wallet/data/stonfi/src/main/java/com/tonapps/wallet/data/stonfi/entities/StonfiSimulate.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/extensions/Numbers.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/pager/PagerAdapter.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/pager/PagerScreen.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/SlippageScreen.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/SlippageViewModel.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/SwapScreen.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/SwapScreenConfirm.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/SwapViewModel.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/assets/AssetsListAdapter.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/assets/AssetsScreen.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/assets/holder/AssetItemHolder.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/assets/holder/AssetLabelHolder.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/assets/holder/AssetSuggestsHolder.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/assets/item/AssetItem.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/model/Simulate.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/model/Slippage.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/model/SwapButtonState.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/model/SwapConfirmArgs.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/model/SwapState.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/swap/model/SwapTarget.kt rename apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/{fragment/send/view/SendFrameLayout.kt => ui/component/KeyboardInsetFrameLayout.kt} (87%) create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/ui/component/swap/BaseSwapView.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/ui/component/swap/ReceiveSwapView.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/ui/component/swap/SearchInputView.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/ui/component/swap/SendSwapView.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/ui/component/swap/SwapButtonView.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/ui/component/swap/SwapView.kt create mode 100644 apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/ui/component/swap/TokenButtonView.kt rename apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/ui/screen/swap/{StonfiBridge2.kt => StonfiBridge.kt} (95%) create mode 100644 apps/wallet/instance/src/main/res/layout/fragment_assets.xml create mode 100644 apps/wallet/instance/src/main/res/layout/fragment_slippage_settings.xml create mode 100644 apps/wallet/instance/src/main/res/layout/fragment_swap_confirm.xml create mode 100644 apps/wallet/instance/src/main/res/layout/fragment_swap_web.xml create mode 100644 apps/wallet/instance/src/main/res/layout/shimmer_swap.xml create mode 100644 apps/wallet/instance/src/main/res/layout/view_cell_asset.xml create mode 100644 apps/wallet/instance/src/main/res/layout/view_search_input_simple.xml create mode 100644 apps/wallet/instance/src/main/res/layout/view_swap.xml create mode 100644 apps/wallet/instance/src/main/res/layout/view_swap_button.xml create mode 100644 apps/wallet/instance/src/main/res/layout/view_swap_receive.xml create mode 100644 apps/wallet/instance/src/main/res/layout/view_swap_send.xml create mode 100644 apps/wallet/instance/src/main/res/layout/view_token_button.xml create mode 100644 apps/wallet/instance/src/main/res/values/dimen.xml create mode 100644 apps/wallet/instance/src/main/res/values/ids.xml create mode 100644 ui/uikit/core/src/main/assets/main.js create mode 100644 ui/uikit/core/src/main/assets/stonfi.html create mode 100644 ui/uikit/core/src/main/java/uikit/drawable/InputAutoDrawable.kt create mode 100644 ui/uikit/core/src/main/java/uikit/drawable/SelectButtonDrawable.kt create mode 100644 ui/uikit/core/src/main/java/uikit/drawable/TagDrawable.kt create mode 100644 ui/uikit/core/src/main/java/uikit/extensions/TextPaint.kt create mode 100644 ui/uikit/core/src/main/java/uikit/spannable/SpanTag.kt rename {apps/wallet/instance/src/main/java/com/tonapps/tonkeeper/fragment/send/view => ui/uikit/core/src/main/java/uikit/widget}/AmountInput.kt (82%) create mode 100644 ui/uikit/core/src/main/java/uikit/widget/DescriptionView.kt create mode 100644 ui/uikit/core/src/main/java/uikit/widget/DetailDescriptionView.kt create mode 100644 ui/uikit/core/src/main/java/uikit/widget/DetailLoadingView.kt create mode 100644 ui/uikit/core/src/main/java/uikit/widget/InputRoundedView.kt create mode 100644 ui/uikit/core/src/main/java/uikit/widget/LabelView.kt create mode 100644 ui/uikit/core/src/main/java/uikit/widget/PreferenceView.kt create mode 100644 ui/uikit/core/src/main/java/uikit/widget/SelectButtonView.kt create mode 100644 ui/uikit/core/src/main/java/uikit/widget/webview/bridge/StonfiWebView.kt create mode 100644 ui/uikit/core/src/main/res/drawable/bg_button_content_16.xml create mode 100644 ui/uikit/core/src/main/res/drawable/bg_content_tint_4.xml create mode 100644 ui/uikit/core/src/main/res/drawable/bg_tertiary_16.xml create mode 100644 ui/uikit/core/src/main/res/drawable/ic_information_circle.xml create mode 100644 ui/uikit/core/src/main/res/layout/view_description.xml create mode 100644 ui/uikit/core/src/main/res/layout/view_detail_description.xml create mode 100644 ui/uikit/core/src/main/res/layout/view_detail_loading.xml create mode 100644 ui/uikit/core/src/main/res/layout/view_percent_input.xml create mode 100644 ui/uikit/core/src/main/res/layout/view_preference.xml create mode 100644 ui/uikit/icon/src/main/res/drawable/ic_sliders_16.xml create mode 100644 ui/uikit/icon/src/main/res/drawable/ic_swap_vertical_16.xml create mode 100644 ui/uikit/icon/src/main/res/drawable/ic_swap_vertical_down_16.xml create mode 100644 ui/uikit/icon/src/main/res/drawable/ic_swap_vertical_up_16.xml diff --git a/.idea/.name b/.idea/.name index d0206d0f3..72af3841f 100644 --- a/.idea/.name +++ b/.idea/.name @@ -1 +1 @@ -Tonkeeper R \ No newline at end of file +TON Apps \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 35747859e..6adb9d45f 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -33,6 +33,7 @@