mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Move IsValidAddress to utils
This commit is contained in:
parent
6823e0f926
commit
0dc90676c8
2 changed files with 8 additions and 8 deletions
|
@ -38,14 +38,6 @@ def CheckDisableWithdraw():
|
|||
if config.disable_withdraw_on_error:
|
||||
DisableWithdraw(None,None,None)
|
||||
|
||||
def IsValidAddress(address):
|
||||
if len(address) < coinspecs.address_length[0] or len(address) > coinspecs.address_length[1]:
|
||||
return False
|
||||
for prefix in coinspecs.address_prefix:
|
||||
if address.startswith(prefix):
|
||||
return True
|
||||
return False
|
||||
|
||||
def Withdraw(nick,chan,cmd):
|
||||
local_withdraw_fee = config.withdrawal_fee or coinspecs.min_withdrawal_fee
|
||||
local_min_withdraw_amount = config.min_withdraw_amount or local_withdraw_fee
|
||||
|
|
|
@ -54,6 +54,14 @@ def GetNickFromPaymentID(p):
|
|||
log_log('PaymentID %s => %s' % (p, str(nick)))
|
||||
return nick
|
||||
|
||||
def IsValidAddress(address):
|
||||
if len(address) < coinspecs.address_length[0] or len(address) > coinspecs.address_length[1]:
|
||||
return False
|
||||
for prefix in coinspecs.address_prefix:
|
||||
if address.startswith(prefix):
|
||||
return True
|
||||
return False
|
||||
|
||||
def AmountToString(amount):
|
||||
if amount == None:
|
||||
amount = 0
|
||||
|
|
Loading…
Reference in a new issue