Changed naming from BTC -> FLO

This commit is contained in:
Vivek Teega 2018-11-22 11:03:15 +05:30
parent ecea61d9ca
commit 34e84858c8
9 changed files with 29 additions and 29 deletions

View File

@ -791,7 +791,7 @@ class AddressSynchronizer(PrintError):
@with_local_height_cached
def get_addr_balance(self, address):
"""Return the balance of a bitcoin address:
"""Return the balance of a FLO address:
confirmed and matured, unconfirmed, unmatured
"""
received, sent = self.get_addr_io(address)

View File

@ -176,7 +176,7 @@ class SendScreen(CScreen):
try:
uri = electrum.util.parse_URI(text, self.app.on_pr)
except:
self.app.show_info(_("Not a Bitcoin URI"))
self.app.show_info(_("Not a FLO URI"))
return
amount = uri.get('amount')
self.screen.address = uri.get('address', '')
@ -249,10 +249,10 @@ class SendScreen(CScreen):
else:
address = str(self.screen.address)
if not address:
self.app.show_error(_('Recipient not specified.') + ' ' + _('Please scan a Bitcoin address or a payment request'))
self.app.show_error(_('Recipient not specified.') + ' ' + _('Please scan a FLO address or a payment request'))
return
if not bitcoin.is_address(address):
self.app.show_error(_('Invalid Bitcoin Address') + ':\n' + address)
self.app.show_error(_('Invalid FLO Address') + ':\n' + address)
return
try:
amount = self.app.get_amount(self.screen.amount)
@ -375,7 +375,7 @@ class ReceiveScreen(CScreen):
def do_share(self):
uri = self.get_URI()
self.app.do_share(uri, _("Share Bitcoin Request"))
self.app.do_share(uri, _("Share FLO Request"))
def do_copy(self):
uri = self.get_URI()

View File

@ -177,13 +177,13 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
grid = QGridLayout()
grid.addWidget(QLabel(_("Start")), 0, 0)
grid.addWidget(QLabel(self.format_date(start_date)), 0, 1)
grid.addWidget(QLabel(str(h.get('start_fiat_value')) + '/BTC'), 0, 2)
grid.addWidget(QLabel(str(h.get('start_fiat_value')) + '/FLO'), 0, 2)
grid.addWidget(QLabel(_("Initial balance")), 1, 0)
grid.addWidget(QLabel(format_amount(h['start_balance'])), 1, 1)
grid.addWidget(QLabel(str(h.get('start_fiat_balance'))), 1, 2)
grid.addWidget(QLabel(_("End")), 2, 0)
grid.addWidget(QLabel(self.format_date(end_date)), 2, 1)
grid.addWidget(QLabel(str(h.get('end_fiat_value')) + '/BTC'), 2, 2)
grid.addWidget(QLabel(str(h.get('end_fiat_value')) + '/FLO'), 2, 2)
grid.addWidget(QLabel(_("Final balance")), 4, 0)
grid.addWidget(QLabel(format_amount(h['end_balance'])), 4, 1)
grid.addWidget(QLabel(str(h.get('end_fiat_balance'))), 4, 2)

View File

@ -415,8 +415,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
if self.wallet.is_watching_only():
msg = ' '.join([
_("This wallet is watching-only."),
_("This means you will not be able to spend Bitcoins with it."),
_("Make sure you own the seed phrase or the private keys, before you request Bitcoins to be sent to this wallet.")
_("This means you will not be able to spend FLO with it."),
_("Make sure you own the seed phrase or the private keys, before you request FLO to be sent to this wallet.")
])
self.show_warning(msg, title=_('Information'))
@ -584,11 +584,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
def show_about(self):
QMessageBox.about(self, "Electrum",
(_("Version")+" %s" % self.wallet.electrum_version + "\n\n" +
_("Electrum's focus is speed, with low resource usage and simplifying Bitcoin.") + " " +
_("Electrum's focus is speed, with low resource usage and simplifying FLO.") + " " +
_("You do not need to perform regular backups, because your wallet can be "
"recovered from a secret phrase that you can memorize or write on paper.") + " " +
_("Startup times are instant because it operates in conjunction with high-performance "
"servers that handle the most complicated parts of the Bitcoin system.") + "\n\n" +
"servers that handle the most complicated parts of the FLO system.") + "\n\n" +
_("Uses icons from the Icons8 icon pack (icons8.com).")))
def show_report_bug(self):
@ -820,7 +820,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.receive_address_e = ButtonsLineEdit()
self.receive_address_e.addCopyButton(self.app)
self.receive_address_e.setReadOnly(True)
msg = _('Bitcoin address where the payment should be received. Note that each payment request uses a different Bitcoin address.')
msg = _('FLO address where the payment should be received. Note that each payment request uses a different Bitcoin address.')
self.receive_address_label = HelpLabel(_('Receiving address'), msg)
self.receive_address_e.textChanged.connect(self.update_receive_qr)
self.receive_address_e.setFocusPolicy(Qt.ClickFocus)
@ -850,8 +850,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
msg = ' '.join([
_('Expiration date of your request.'),
_('This information is seen by the recipient if you send them a signed payment request.'),
_('Expired requests have to be deleted manually from your list, in order to free the corresponding Bitcoin addresses.'),
_('The bitcoin address never expires and will always be part of this electrum wallet.'),
_('Expired requests have to be deleted manually from your list, in order to free the corresponding FLO addresses.'),
_('The FLO address never expires and will always be part of this electrum wallet.'),
])
grid.addWidget(HelpLabel(_('Request expires'), msg), 3, 0)
grid.addWidget(self.expires_combo, 3, 1)
@ -1077,7 +1077,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.amount_e = BTCAmountEdit(self.get_decimal_point)
self.payto_e = PayToEdit(self)
msg = _('Recipient of the funds.') + '\n\n'\
+ _('You may enter a Bitcoin address, a label from your list of contacts (a list of completions will be proposed), or an alias (email-like address that forwards to a Bitcoin address)')
+ _('You may enter a FLO address, a label from your list of contacts (a list of completions will be proposed), or an alias (email-like address that forwards to a Bitcoin address)')
payto_label = HelpLabel(_('Pay to'), msg)
grid.addWidget(payto_label, 1, 0)
grid.addWidget(self.payto_e, 1, 1, 1, -1)
@ -1130,7 +1130,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
hbox.addStretch(1)
grid.addLayout(hbox, 5, 4)
msg = _('Bitcoin transactions are in general not free. A transaction fee is paid by the sender of the funds.') + '\n\n'\
msg = _('FLO transactions are in general not free. A transaction fee is paid by the sender of the funds.') + '\n\n'\
+ _('The amount of fee can be decided freely by the sender. However, transactions with low fees take more time to be processed.') + '\n\n'\
+ _('A suggested fee is automatically added to this field. You may override it. The suggested fee increases with the size of the transaction.')
self.fee_e_label = HelpLabel(_('Fee'), msg)
@ -1521,7 +1521,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
for o in outputs:
if o.address is None:
self.show_error(_('Bitcoin Address is None'))
self.show_error(_('FLO Address is None'))
return
if o.type == TYPE_ADDRESS and not bitcoin.is_address(o.address):
self.show_error(_('Invalid Bitcoin Address'))

View File

@ -337,7 +337,7 @@ class ElectrumGui:
def do_send(self):
if not is_address(self.str_recipient):
self.show_message(_('Invalid Bitcoin address'))
self.show_message(_('Invalid FLO address'))
return
try:
amount = int(Decimal(self.str_amount) * COIN)

View File

@ -37,7 +37,7 @@ def plot_history(history):
plt.subplots_adjust(bottom=0.2)
plt.xticks( rotation=25 )
ax = plt.gca()
plt.ylabel('BTC')
plt.ylabel('FLO')
plt.xlabel('Month')
xfmt = md.DateFormatter('%Y-%m-%d')
ax.xaxis.set_major_formatter(xfmt)

View File

@ -449,9 +449,9 @@ class DeviceMgr(ThreadJob, PrintError):
# or it is not pairable
raise DeviceUnpairableError(
_('Electrum cannot pair with your {}.\n\n'
'Before you request bitcoins to be sent to addresses in this '
'Before you request FLO to be sent to addresses in this '
'wallet, ensure you can pair with your device, or that you have '
'its seed (and passphrase, if any). Otherwise all bitcoins you '
'its seed (and passphrase, if any). Otherwise all FLO you '
'receive will be unspendable.').format(plugin.device))
def unpaired_device_infos(self, handler, plugin, devices=None):

View File

@ -195,7 +195,7 @@ class SimpleConfig(PrintError):
base_unit = self.user_config.get('base_unit')
if isinstance(base_unit, str):
self._set_key_in_user_config('base_unit', None)
map_ = {'btc':8, 'mbtc':5, 'ubtc':2, 'bits':2, 'sat':0}
map_ = {'flo':8, 'mflo':5, 'uflo':2, 'bits':2, 'sat':0}
decimal_point = map_.get(base_unit.lower())
self._set_key_in_user_config('decimal_point', decimal_point)

View File

@ -51,11 +51,11 @@ def inv_dict(d):
return {v: k for k, v in d.items()}
base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0}
base_units = {'FLO':8, 'mFLO':5, 'bits':2, 'sat':0}
base_units_inverse = inv_dict(base_units)
base_units_list = ['BTC', 'mBTC', 'bits', 'sat'] # list(dict) does not guarantee order
base_units_list = ['FLO', 'mFLO', 'bits', 'sat'] # list(dict) does not guarantee order
DECIMAL_POINT_DEFAULT = 5 # mBTC
DECIMAL_POINT_DEFAULT = 5 # mFLO
class UnknownBaseUnit(Exception): pass
@ -140,7 +140,7 @@ class Satoshis(object):
return 'Satoshis(%d)'%self.value
def __str__(self):
return format_satoshis(self.value) + " BTC"
return format_satoshis(self.value) + " FLO"
class Fiat(object):
__slots__ = ('value', 'ccy')
@ -674,12 +674,12 @@ def parse_URI(uri, on_pr=None):
if ':' not in uri:
if not bitcoin.is_address(uri):
raise Exception("Not a bitcoin address")
raise Exception("Not a FLO address")
return {'address': uri}
u = urllib.parse.urlparse(uri)
if u.scheme != 'bitcoin':
raise Exception("Not a bitcoin URI")
raise Exception("Not a FLO URI")
address = u.path
# python for android fails to parse query
@ -696,7 +696,7 @@ def parse_URI(uri, on_pr=None):
out = {k: v[0] for k, v in pq.items()}
if address:
if not bitcoin.is_address(address):
raise Exception("Invalid bitcoin address:" + address)
raise Exception("Invalid FLO address:" + address)
out['address'] = address
if 'amount' in out:
am = out['amount']