<commit_before>class @WalletSendPreparingDialogViewController extends ledger.common.DialogViewController

  view:
    contentContainer: '#content_container'

  initialize: ->
    super
    # fetch amount
    account = Account.find(index: 0).first()
    account.createTransaction amount: @params.amount, fees: ledger.preferences.instance.getMiningFee(), address: @params.address, (transaction, error) =>
      return if not @isShown()
      if error?
        reason = switch error.code
          when ledger.errors.NetworkError then 'network_no_response'
          when ledger.errors.NotEnoughFunds then 'unsufficient_balance'
          when ledger.errors.DustTransaction then 'dust_transaction'
        @dismiss =>
          errorMessage = switch reason
            when 'dust_transaction' then _.str.sprintf(t("common.errors." + reason), ledger.formatters.formatValue(ledger.wallet.transaction.MINIMUM_OUTPUT_VALUE))
            else t("common.errors." + reason)
          Api.callback_cancel 'send_payment', errorMessage
          dialog = new CommonDialogsMessageDialogViewController(kind: "error", title: t("wallet.send.errors.sending_failed"), subtitle: errorMessage)
          dialog.show()
      else
        @_routeToNextDialog(transaction)<commit_msg>Fix typo in send preparing dialog view controller<commit_after>class @WalletSendPreparingDialogViewController extends ledger.common.DialogViewController

  view:
    contentContainer: '#content_container'

  initialize: ->
    super
    # fetch amount
    account = Account.find(index: 0).first()
    account.createTransaction amount: @params.amount, fees: ledger.preferences.instance.getMiningFee(), address: @params.address, (transaction, error) =>
      return if not @isShown()
      if error?
        reason = switch error.code
          when ledger.errors.NetworkError then 'network_no_response'
          when ledger.errors.NotEnoughFunds then 'unsufficient_balance'
          when ledger.errors.DustTransaction then 'dust_transaction'
        @dismiss =>
          errorMessage = switch reason
            when 'dust_transaction' then _.str.sprintf(t("common.errors." + reason), ledger.formatters.formatValue(ledger.wallet.Transaction.MINIMUM_OUTPUT_VALUE))
            else t("common.errors." + reason)
          Api.callback_cancel 'send_payment', errorMessage
          dialog = new CommonDialogsMessageDialogViewController(kind: "error", title: t("wallet.send.errors.sending_failed"), subtitle: errorMessage)
          dialog.show()
      else
        @_routeToNextDialog(transaction)
{'fraction_non_alphanumeric': 0.09467918622848201, 'fraction_numerical': 0.000782472613458529, 'mean_word_length': 3.5660714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3319958', 'n_tokens_mistral': 687, 'n_tokens_neox': 671, 'n_words': 148}