def format_amount(
        self,
        amount_sat,
        is_diff=False,
        whitespaces=False,
        *,
        add_thousands_sep: bool = None,
    ) -> str:
        """Formats amount as string, converting to desired unit.
        E.g. 500_000 -> '0.005'
        """
        return self.config.format_amount(
            amount_sat,
            is_diff=is_diff,
            whitespaces=whitespaces,
            add_thousands_sep=add_thousands_sep,
        )
Formats amount as string, converting to desired unit.
        E.g. 500_000 -> '0.005'
        
electrum/gui/qt/main_window.py