Show unconfirmed coin on wallets page, disable staking for particl.
This commit is contained in:
		
							parent
							
								
									1baf13c5a8
								
							
						
					
					
						commit
						4f83da0f26
					
				@ -404,14 +404,17 @@ class BasicSwap():
 | 
			
		||||
        if connection_type == 'rpc':
 | 
			
		||||
            if 'rpcauth' in chain_client_settings:
 | 
			
		||||
                rpcauth = chain_client_settings['rpcauth']
 | 
			
		||||
                self.log.debug('Read %s rpc credentials from json settings', coin)
 | 
			
		||||
            elif 'rpcpassword' in chain_client_settings:
 | 
			
		||||
                rpcauth = chain_client_settings['rpcuser'] + ':' + chain_client_settings['rpcpassword']
 | 
			
		||||
                self.log.debug('Read %s rpc credentials from json settings', coin)
 | 
			
		||||
            if rpcauth is None:
 | 
			
		||||
                if self.chain == 'mainnet':
 | 
			
		||||
                    testnet_name = ''
 | 
			
		||||
                else:
 | 
			
		||||
                    testnet_name = chainparams[coin][self.chain].get('name', self.chain)
 | 
			
		||||
                authcookiepath = os.path.join(datadir, testnet_name, '.cookie')
 | 
			
		||||
                self.log.debug('Reading %s rpc credentials from auth cookie %s', coin, authcookiepath)
 | 
			
		||||
                # Wait for daemon to start
 | 
			
		||||
                for i in range(10):
 | 
			
		||||
                    if not os.path.exists(authcookiepath):
 | 
			
		||||
@ -2244,7 +2247,8 @@ class BasicSwap():
 | 
			
		||||
            'deposit_address': self.getCachedAddressForCoin(coin),
 | 
			
		||||
            'name': chainparams[coin]['name'].capitalize(),
 | 
			
		||||
            'blocks': blockchaininfo['blocks'],
 | 
			
		||||
            'balance': format8(walletinfo.get('total_balance', walletinfo['balance']) * COIN),
 | 
			
		||||
            'balance': format8(makeInt(walletinfo['balance'])),
 | 
			
		||||
            'unconfirmed': format8(makeInt(walletinfo.get('unconfirmed_balance'))),
 | 
			
		||||
            'synced': '{0:.2f}'.format(round(blockchaininfo['verificationprogress'], 2)),
 | 
			
		||||
        }
 | 
			
		||||
        return rv
 | 
			
		||||
 | 
			
		||||
@ -228,6 +228,8 @@ class HttpHandler(BaseHTTPRequestHandler):
 | 
			
		||||
                'synced': w['synced'],
 | 
			
		||||
                'deposit_address': w['deposit_address'],
 | 
			
		||||
            })
 | 
			
		||||
            if float(w['unconfirmed']) > 0.0:
 | 
			
		||||
                wallets_formatted[-1]['unconfirmed'] = w['unconfirmed']
 | 
			
		||||
 | 
			
		||||
        template = env.get_template('wallets.html')
 | 
			
		||||
        return bytes(template.render(
 | 
			
		||||
 | 
			
		||||
@ -18,7 +18,7 @@
 | 
			
		||||
<p>Error: {{ w.error }}</p>
 | 
			
		||||
{% else %}
 | 
			
		||||
<table>
 | 
			
		||||
<tr><td>Balance:</td><td>{{ w.balance }}</td></tr>
 | 
			
		||||
<tr><td>Balance:</td><td>{{ w.balance }}</td>{% if w.unconfirmed %}<td>Unconfirmed:</td><td>{{ w.unconfirmed }}</td>{% endif %}</tr>
 | 
			
		||||
<tr><td>Blocks:</td><td>{{ w.blocks }}</td></tr>
 | 
			
		||||
<tr><td>Synced:</td><td>{{ w.synced }}</td></tr>
 | 
			
		||||
<tr><td><input type="submit" name="newaddr_{{ w.cid }}" value="Deposit Address"></td><td>{{ w.deposit_address }}</td></tr>
 | 
			
		||||
 | 
			
		||||
@ -219,6 +219,7 @@ def prepareDataDir(coin, settings, data_dir, chain, particl_mnemonic):
 | 
			
		||||
            fp.write('zmqpubsmsg=tcp://127.0.0.1:{}\n'.format(settings['zmqport']))
 | 
			
		||||
            fp.write('spentindex=1')
 | 
			
		||||
            fp.write('txindex=1')
 | 
			
		||||
            fp.write('staking=0')
 | 
			
		||||
 | 
			
		||||
            if particl_mnemonic == 'none':
 | 
			
		||||
                fp.write('createdefaultmasterkey=1')
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user