Exemple #1
0
 def format_amount_and_units_fees(self, x):
     return format_satoshis_plain(x, 3) + ' sats'
Exemple #2
0
 def format_amount_and_units(self, x):
     return format_satoshis_plain(x, self.decimal_point()) + ' ' + self.base_unit
 def formatPlain_(self, amount: ObjCInstance) -> ObjCInstance:
     amount = int(amount)
     return ns_from_py(format_satoshis_plain(amount, self.decimalPoint()))
Exemple #4
0
 def setAmount(self, amount):
     if amount is None:
         self.setText(" ") # Space forces repaint in case units changed
     else:
         self.setText(format_satoshis_plain(amount, self.decimal_point()))
Exemple #5
0
 def setAmount(self, amount: Optional[Union[float, int]]):
     if amount is None:
         # Space forces repaint in case units changed
         self.setText(" ")
     else:
         self.setText(format_satoshis_plain(amount, self.decimal_point))