Skip to content

Commit 2003062

Browse files
committed
feat: update on ramp provider list UI
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent 1f5815f commit 2003062

File tree

13 files changed

+130
-22
lines changed

13 files changed

+130
-22
lines changed

apps/flipcash/app/src/main/kotlin/com/flipcash/app/internal/ui/navigation/AppScreenContent.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ internal fun AppScreenContent(content: @Composable () -> Unit) {
168168
MyAccountScreen()
169169
}
170170

171+
register<AppRoute.Menu.Deposit> {
172+
DepositScreen()
173+
}
174+
171175
register<AppRoute.Menu.BackupKey> {
172176
BackupKeyScreen()
173177
}
@@ -176,10 +180,6 @@ internal fun AppScreenContent(content: @Composable () -> Unit) {
176180
AdvancedFeaturesScreen()
177181
}
178182

179-
register<AppRoute.Advanced.Deposit> {
180-
DepositScreen()
181-
}
182-
183183
register<AppRoute.Advanced.PoolList> {
184184
PoolListScreen()
185185
}

apps/flipcash/core/src/main/kotlin/com/flipcash/app/core/AppRoute.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ sealed interface AppRoute : ScreenProvider, Parcelable {
9797
@Parcelize
9898
sealed interface Menu: AppRoute {
9999
data object MyAccount : Menu
100+
data object Deposit : Menu
100101
data object BackupKey : Menu
101102
data object AppSettings : Menu
102103
data object AdvancedFeatures : Menu
@@ -106,6 +107,5 @@ sealed interface AppRoute : ScreenProvider, Parcelable {
106107
@Parcelize
107108
sealed interface Advanced: AppRoute {
108109
data object PoolList : Advanced
109-
data object Deposit : Transfers
110110
}
111111
}

apps/flipcash/core/src/main/kotlin/com/flipcash/app/core/transfers/TransferDirection.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sealed interface TransferDirection : Parcelable {
2727

2828
data object Incoming : TransferDirection {
2929
@IgnoredOnParcel
30-
override val nextScreen: AppRoute = AppRoute.Advanced.Deposit
30+
override val nextScreen: AppRoute = AppRoute.Menu.Deposit
3131
override val title: String
3232
@Composable get() = stringResource(R.string.title_depositUsdc)
3333
override val description: String
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:aapt="http://schemas.android.com/aapt"
3+
android:width="144dp"
4+
android:height="144dp"
5+
android:viewportWidth="144"
6+
android:viewportHeight="144">
7+
<path
8+
android:pathData="M65,128.29C100.55,128.29 129.15,99.69 129.15,64.15C129.15,28.6 100.55,0 65,0C29.45,0 0.85,28.6 0.85,64.15C0.85,99.69 29.45,128.29 65,128.29Z"
9+
android:fillColor="#2775CA"/>
10+
<path
11+
android:pathData="M77.3,20.05C77.56,18.98 78.63,18.44 79.7,18.98C94.4,23.79 106.16,35.28 110.98,50.52C119,75.91 105.1,102.9 79.7,110.92C79.43,111.19 78.9,111.19 78.63,111.19C77.56,110.92 77.03,110.12 77.03,109.05V105.31C77.03,103.97 77.56,103.17 78.63,102.63C89.59,98.62 98.41,90.07 102.42,78.85C110.17,58.27 99.48,35.01 78.63,27.53C77.83,26.99 77.03,25.93 77.03,24.86V21.11C77.03,20.58 77.03,20.31 77.3,20.05ZM51.37,18.71C52.44,18.98 52.97,19.78 52.97,20.85V24.59C52.97,25.93 52.44,26.73 51.37,27.26C40.41,31.27 31.59,39.82 27.58,51.05C19.83,71.63 30.52,94.88 51.37,102.37C52.17,102.9 52.97,103.97 52.97,104.77V108.51C52.97,109.05 52.97,109.32 52.7,109.58C52.44,110.65 51.37,111.19 50.3,110.65C35.33,105.84 23.83,94.35 19.02,79.38C11,53.99 24.9,26.99 50.3,18.98C50.57,18.71 51.1,18.71 51.37,18.71ZM66.87,32.61C68.21,32.88 69.01,33.68 69.01,34.75V41.16C75.16,41.7 79.97,46.24 81.04,52.12V52.39C81.04,53.46 80.24,54.26 79.17,54.26H74.89C74.09,54.26 73.29,53.72 73.02,52.92C71.68,48.91 69.01,47.31 64.2,47.31C58.85,47.31 56.18,49.71 56.18,53.46C56.18,57.2 57.78,59.34 65.8,60.41C77.03,61.74 82.64,64.95 82.64,74.3C82.64,81.52 77.3,87.13 69.28,88.47V94.89C69.01,96.22 68.21,97.02 67.14,97.02H63.13C61.79,96.76 60.99,95.95 60.99,94.89V88.47C52.17,87.13 47.89,82.32 46.82,75.64V75.37C46.82,74.3 47.63,73.5 48.69,73.5H53.24C54.04,73.5 54.84,74.04 55.11,75.11C55.91,79.12 58.32,82.06 65.27,82.06C70.35,82.06 74.09,79.12 74.09,74.84C74.09,70.56 71.68,68.96 64.2,67.62C52.97,66.29 47.63,62.81 47.63,53.99C47.63,47.31 52.7,41.96 60.72,40.9V34.75C60.99,33.41 61.79,32.61 62.86,32.61H66.87Z"
12+
android:fillColor="#ffffff"/>
13+
<path
14+
android:pathData="M118.55,119.01m-22.18,0a22.18,22.18 0,1 1,44.37 0a22.18,22.18 0,1 1,-44.37 0"
15+
android:strokeWidth="5.16914"
16+
android:fillColor="#ffffff">
17+
<aapt:attr name="android:strokeColor">
18+
<gradient
19+
android:startX="118.55"
20+
android:startY="99.41"
21+
android:endX="118.55"
22+
android:endY="138.61"
23+
android:type="linear">
24+
<item android:offset="0" android:color="#FF001A0C"/>
25+
<item android:offset="1" android:color="#FF001A0C"/>
26+
</gradient>
27+
</aapt:attr>
28+
</path>
29+
<path
30+
android:pathData="M129.45,123.45C129.78,123.45 129.95,123.85 129.71,124.08L126.16,127.64C126.02,127.77 125.83,127.85 125.64,127.85H107.64C107.57,127.85 107.5,127.83 107.43,127.79C107.37,127.75 107.33,127.69 107.3,127.62C107.27,127.56 107.26,127.48 107.28,127.41C107.29,127.34 107.33,127.27 107.38,127.22L110.93,123.67C111.07,123.53 111.26,123.45 111.46,123.45H129.45Z"
31+
android:fillColor="#001A0C"/>
32+
<path
33+
android:pathData="M125.64,116.77C125.83,116.77 126.02,116.85 126.16,116.99L129.71,120.54C129.95,120.78 129.78,121.17 129.45,121.17H111.46C111.26,121.17 111.07,121.09 110.93,120.96L107.38,117.4C107.33,117.35 107.29,117.28 107.28,117.21C107.26,117.14 107.27,117.07 107.3,117C107.33,116.93 107.37,116.87 107.43,116.83C107.5,116.79 107.57,116.77 107.64,116.77H125.64Z"
34+
android:fillColor="#001A0C"/>
35+
<path
36+
android:pathData="M129.45,110.18C129.78,110.18 129.95,110.57 129.71,110.81L126.16,114.36C126.02,114.5 125.83,114.58 125.64,114.58H107.64C107.57,114.58 107.5,114.56 107.43,114.51C107.37,114.47 107.33,114.42 107.3,114.35C107.27,114.28 107.26,114.21 107.28,114.14C107.29,114.07 107.33,114 107.38,113.95L110.93,110.39L110.93,110.39C111.07,110.25 111.26,110.18 111.46,110.18H129.45Z"
37+
android:fillColor="#001A0C"/>
38+
</vector>

apps/flipcash/core/src/main/res/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,4 +400,6 @@
400400

401401
<string name="action_sendAsLink">Send as a Link</string>
402402

403+
<string name="subtitle_addUsdcToWallet">Add Solana USDC to your Flipcash wallet</string>
404+
403405
</resources>

apps/flipcash/features/advanced/src/main/kotlin/com/flipcash/app/advanced/internal/AdvancedFeatureMenuItems.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@ import com.flipcash.app.core.AppRoute
88
import com.flipcash.app.menu.FullMenuItem
99
import com.flipcash.features.advanced.R
1010

11-
internal data object Deposit : FullMenuItem<AdvancedFeaturesScreenViewModel.Event>() {
12-
override val icon: Painter
13-
@Composable get() = painterResource(R.drawable.ic_menu_deposit)
14-
override val name: String
15-
@Composable get() = stringResource(R.string.title_depositUsdc)
16-
override val action: AdvancedFeaturesScreenViewModel.Event = AdvancedFeaturesScreenViewModel.Event.OpenScreen(
17-
AppRoute.OnRamp.ProviderList(AppRoute.Sheets.Menu)
18-
)
19-
}
20-
2111
internal data object Pools : FullMenuItem<AdvancedFeaturesScreenViewModel.Event>() {
2212
override val icon: Painter
2313
@Composable get() = painterResource(R.drawable.ic_flipcash_pools)

apps/flipcash/features/advanced/src/main/kotlin/com/flipcash/app/advanced/internal/AdvancedFeaturesScreenViewModel.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import kotlinx.coroutines.flow.map
1414
import javax.inject.Inject
1515

1616
private val FullMenuList = buildList {
17-
add(Deposit)
1817
add(Pools)
1918
}
2019

apps/flipcash/features/menu/src/main/kotlin/com/flipcash/app/menu/internal/MenuItems.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ internal data object MyAccount : FullMenuItem<MenuScreenViewModel.Event>() {
2727
)
2828
}
2929

30+
internal data object Deposit : FullMenuItem<MenuScreenViewModel.Event>() {
31+
override val icon: Painter
32+
@Composable get() = painterResource(R.drawable.ic_menu_deposit)
33+
override val name: String
34+
@Composable get() = stringResource(R.string.title_depositUsdc)
35+
override val action: MenuScreenViewModel.Event = MenuScreenViewModel.Event.OpenScreen(
36+
AppRoute.OnRamp.ProviderList(AppRoute.Sheets.Menu)
37+
)
38+
}
39+
3040
internal data object AdvancedFeatures : FullMenuItem<MenuScreenViewModel.Event>() {
3141
override val icon: Painter
3242
@Composable get() = painterResource(R.drawable.ic_advanced_features)

apps/flipcash/features/menu/src/main/kotlin/com/flipcash/app/menu/internal/MenuScreenViewModel.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import javax.inject.Inject
3737

3838
private val FullMenuList = buildList {
3939
add(MyAccount)
40+
add(Deposit)
4041
add(AppSettings)
4142
add(AdvancedFeatures)
4243
add(SwitchAccount)

apps/flipcash/features/onramp/src/main/kotlin/com/flipcash/app/onramp/OnRampProviderListScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class OnRampProviderListScreen(
4444
override val key: ScreenKey = uniqueScreenKey
4545

4646
override val name: String
47-
@Composable get() = stringResource(R.string.title_selectMethod)
47+
@Composable get() = stringResource(R.string.title_depositUsdc)
4848

4949
@Composable
5050
override fun ModalContent() {

0 commit comments

Comments
 (0)