Deduct TXFee from transferred balance
This should fix #568 as proposed by @nicoschtein
This commit is contained in:
parent
3bc1f780f2
commit
769a85cbc0
@ -70,7 +70,7 @@ if (! empty($users)) {
|
||||
|
||||
// Send balance, fees are reduced later by RPC Server
|
||||
try {
|
||||
$bitcoin->sendtoaddress($aUserData['coin_address'], $dBalance);
|
||||
$bitcoin->sendtoaddress($aUserData['coin_address'], $dBalance - $config['txfee']);
|
||||
} catch (BitcoinClientException $e) {
|
||||
$log->logError('Failed to send requested balance to coin address, please check payout process');
|
||||
continue;
|
||||
|
||||
@ -62,7 +62,7 @@ if (count($aPayouts) > 0) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
$bitcoin->sendtoaddress($aData['coin_address'], $dBalance);
|
||||
$bitcoin->sendtoaddress($aData['coin_address'], $dBalance - $config['txfee']);
|
||||
} catch (BitcoinClientException $e) {
|
||||
$log->logError('Failed to send requested balance to coin address, please check payout process');
|
||||
continue;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user