reason->memo
This commit is contained in:
@@ -812,7 +812,7 @@ class ElectrumWindow(QMainWindow):
|
|||||||
timestamp = req['time']
|
timestamp = req['time']
|
||||||
amount = req.get('amount')
|
amount = req.get('amount')
|
||||||
expiration = req.get('expiration', None)
|
expiration = req.get('expiration', None)
|
||||||
message = req.get('reason', '')
|
message = req.get('memo', '')
|
||||||
date = format_time(timestamp)
|
date = format_time(timestamp)
|
||||||
status = req.get('status')
|
status = req.get('status')
|
||||||
account = self.wallet.get_account_name(self.wallet.get_account_from_address(address))
|
account = self.wallet.get_account_name(self.wallet.get_account_from_address(address))
|
||||||
|
|||||||
@@ -535,7 +535,7 @@ class Commands:
|
|||||||
'address': addr,
|
'address': addr,
|
||||||
'amount': format_satoshis(amount),
|
'amount': format_satoshis(amount),
|
||||||
'timestamp': timestamp,
|
'timestamp': timestamp,
|
||||||
'reason': v.get('reason'),
|
'memo': v.get('memo', ''),
|
||||||
'expiration': expiration,
|
'expiration': expiration,
|
||||||
'URI':'bitcoin:' + addr + '?amount=' + format_satoshis(amount),
|
'URI':'bitcoin:' + addr + '?amount=' + format_satoshis(amount),
|
||||||
'status': pr_str[v.get('status', PR_UNKNOWN)]
|
'status': pr_str[v.get('status', PR_UNKNOWN)]
|
||||||
@@ -574,10 +574,10 @@ class Commands:
|
|||||||
return map(self._format_request, self.wallet.get_sorted_requests())
|
return map(self._format_request, self.wallet.get_sorted_requests())
|
||||||
|
|
||||||
@command('w')
|
@command('w')
|
||||||
def addrequest(self, requested_amount, reason='', expiration=60*60):
|
def addrequest(self, requested_amount, memo='', expiration=60*60):
|
||||||
"""Create a payment request."""
|
"""Create a payment request."""
|
||||||
amount = int(Decimal(requested_amount)*COIN)
|
amount = int(Decimal(requested_amount)*COIN)
|
||||||
key = self.wallet.add_payment_request(amount, reason, expiration)
|
key = self.wallet.add_payment_request(amount, memo, expiration)
|
||||||
if key is None:
|
if key is None:
|
||||||
return
|
return
|
||||||
req = self.wallet.get_payment_request(key)
|
req = self.wallet.get_payment_request(key)
|
||||||
@@ -637,7 +637,7 @@ command_options = {
|
|||||||
'unsigned': ("-u", "--unsigned", "Do not sign transaction"),
|
'unsigned': ("-u", "--unsigned", "Do not sign transaction"),
|
||||||
'domain': ("-D", "--domain", "List of addresses"),
|
'domain': ("-D", "--domain", "List of addresses"),
|
||||||
'account': (None, "--account", "Account"),
|
'account': (None, "--account", "Account"),
|
||||||
'reason': (None, "--reason", "Description of the request"),
|
'memo': ("-m", "--memo", "Description of the request"),
|
||||||
'expiration': (None, "--expiration", "Time in seconds"),
|
'expiration': (None, "--expiration", "Time in seconds"),
|
||||||
'status': (None, "--status", "Show status"),
|
'status': (None, "--status", "Show status"),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user