From 9541ecad3ec566e5ef27a36a9ec7d5e0fb00726e Mon Sep 17 00:00:00 2001 From: Elizaveta Semenova Date: Mon, 12 Feb 2024 12:41:50 +0300 Subject: [PATCH] [ETH-950] Total amount in send action button --- .../Scenes/Main/Send/Input/SendInputViewModel.swift | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/p2p_wallet/Scenes/Main/Send/Input/SendInputViewModel.swift b/p2p_wallet/Scenes/Main/Send/Input/SendInputViewModel.swift index 1a96bfd0d..01ed32331 100644 --- a/p2p_wallet/Scenes/Main/Send/Input/SendInputViewModel.swift +++ b/p2p_wallet/Scenes/Main/Send/Input/SendInputViewModel.swift @@ -454,11 +454,12 @@ private extension SendInputViewModel { inputAmountViewModel.isError = false if !currentState.isSendingViaLink { var title = L10n.send + " " - title += currentState.amountInToken.tokenAmountFormattedString( - symbol: currentState.token.symbol, - maximumFractionDigits: Int(currentState.token.decimals), - roundingMode: .down - ) + title += currentState.totalAmount.convertToBalance(decimals: currentState.token.decimals) + .tokenAmountFormattedString( + symbol: currentState.token.symbol, + maximumFractionDigits: Int(currentState.token.decimals), + roundingMode: .down + ) actionButtonData = SliderActionButtonData(isEnabled: true, title: title) } else { actionButtonData = SliderActionButtonData(