Skip to content

Commit

Permalink
cleanup/comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-dydx committed Sep 13, 2024
1 parent 388011e commit a967fd6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import FloatingPanel
import PlatformRouting
import dydxFormatter
import Combine
// import single class due to VaultTransferType collision
import class Abacus.Subaccount

public class dydxVaultDepositWithdrawViewBuilder: NSObject, ObjectBuilderProtocol {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,25 +239,24 @@ private struct VaultDepositWithdrawConfirmationView: View {
@ViewBuilder
public var buttonContent: some View {
if let transferType = viewModel.transferType {
switch viewModel.submitState {
case .enabled, .loading:
Text(viewModel.isFirstSubmission ? transferType.confirmTransferText : DataLocalizer.localize(path: "APP.ONBOARDING.TRY_AGAIN"))
.themeFont(fontType: .base, fontSize: .large)
case .submitting:
HStack {
Text(DataLocalizer.localize(path: "APP.TRADE.SUBMITTING"))
.themeFont(fontType: .base, fontSize: .large)
spinner
}
case .disabled:
if viewModel.requiresAcknowledgeHighSlippage && !viewModel.hasAcknowledgedHighSlippage {
Text(DataLocalizer.localize(path: "APP.VAULTS.ACKNOWLEDGE_HIGH_SLIPPAGE"))
.themeFont(fontType: .base, fontSize: .large)
} else {
Text(transferType.confirmTransferText)
.themeFont(fontType: .base, fontSize: .large)
Group {
switch viewModel.submitState {
case .enabled, .loading:
Text(viewModel.isFirstSubmission ? transferType.confirmTransferText : DataLocalizer.localize(path: "APP.ONBOARDING.TRY_AGAIN"))
case .submitting:
HStack {
Text(DataLocalizer.localize(path: "APP.TRADE.SUBMITTING"))
spinner
}
case .disabled:
if viewModel.requiresAcknowledgeHighSlippage && !viewModel.hasAcknowledgedHighSlippage {
Text(DataLocalizer.localize(path: "APP.VAULTS.ACKNOWLEDGE_HIGH_SLIPPAGE"))
} else {
Text(transferType.confirmTransferText)
}
}
}
.themeFont(fontType: .base, fontSize: .large)
}
}

Expand Down

0 comments on commit a967fd6

Please sign in to comment.