@@ -273,59 +273,49 @@ private fun BottomBarButtons(
273273 verticalAlignment = Alignment .CenterVertically ,
274274 horizontalArrangement = Arrangement .spacedBy(CodeTheme .dimens.grid.x2),
275275 ) {
276- if (state.isCashReserve && state.cashReservesEnabled) {
277- CodeButton (
278- modifier = Modifier .weight(1f ),
279- buttonState = ButtonState .Filled ,
280- text = stringResource(R .string.action_withdraw),
281- ) {
282- dispatch(
283- TokenInfoViewModel .Event .OpenScreen (
284- AppRoute .Transfers .Withdrawal .Amount (loadable.data.address)
285- )
286- )
287- }
288- } else if (state.cashReservesEnabled) {
289- CodeButton (
290- modifier = Modifier .weight(1f ),
291- buttonState = ButtonState .Filled ,
292- text = stringResource(R .string.action_buy),
293- ) {
294- dispatch(TokenInfoViewModel .Event .OpenPurchaseMethods (forNeededFunds = isForNeededFunds))
295- }
276+ if (! state.isCashReserve) {
277+ if (state.cashReservesEnabled) {
278+ CodeButton (
279+ modifier = Modifier .weight(1f ),
280+ buttonState = ButtonState .Filled ,
281+ text = stringResource(R .string.action_buy),
282+ ) {
283+ dispatch(TokenInfoViewModel .Event .OpenPurchaseMethods (forNeededFunds = isForNeededFunds))
284+ }
296285
297- if (state.canSell) {
286+ if (state.canSell) {
287+ CodeButton (
288+ modifier = Modifier
289+ .weight(1f ),
290+ buttonState = ButtonState .Filled20 ,
291+ text = stringResource(R .string.action_sell),
292+ ) {
293+ dispatch(
294+ TokenInfoViewModel .Event .OpenScreen (
295+ AppRoute .Token .SwapTransact (
296+ purpose = TokenSwapPurpose .Sell (loadable.data.address),
297+ )
298+ )
299+ )
300+ }
301+ }
302+ } else {
298303 CodeButton (
299304 modifier = Modifier
300- .weight(1f ),
301- buttonState = ButtonState .Filled20 ,
302- text = stringResource(R .string.action_sell),
305+ .fillMaxWidth()
306+ .padding(horizontal = CodeTheme .dimens.inset)
307+ .padding(bottom = CodeTheme .dimens.grid.x3)
308+ .navigationBarsPadding(),
309+ buttonState = ButtonState .Filled ,
310+ text = stringResource(R .string.action_give),
303311 ) {
304312 dispatch(
305313 TokenInfoViewModel .Event .OpenScreen (
306- AppRoute .Token .SwapTransact (
307- purpose = TokenSwapPurpose .Sell (loadable.data.address),
308- )
314+ AppRoute .Main .Give (mint = loadable.data.address)
309315 )
310316 )
311317 }
312318 }
313- } else {
314- CodeButton (
315- modifier = Modifier
316- .fillMaxWidth()
317- .padding(horizontal = CodeTheme .dimens.inset)
318- .padding(bottom = CodeTheme .dimens.grid.x3)
319- .navigationBarsPadding(),
320- buttonState = ButtonState .Filled ,
321- text = stringResource(R .string.action_give),
322- ) {
323- dispatch(
324- TokenInfoViewModel .Event .OpenScreen (
325- AppRoute .Main .Give (mint = loadable.data.address)
326- )
327- )
328- }
329319 }
330320 }
331321 }
0 commit comments