modify no private key tx miner fee
MODIFY
bither-android/src/net/bither/BCCAssetsHDAccountMonitoredActivity.java
bither-android/src/net/bither/BCCAssetsHDAccountMonitoredActivity.java
@@ -117,7 +117,7 @@ public class BCCAssetsHDAccountMonitoredActivity extends BCCAssetsDetectHotActiv
this.txs = null;
HDAccount account = (HDAccount) address;
try {
- txs = account.newForkTx(toAddress, btcAmount,outs, SplitCoin.BCC);
+ txs = account.newForkTx(toAddress, btcAmount,outs, SplitCoin.BCC, true);
} catch (Exception e) {
e.printStackTrace();
btcAmount = 0;

MODIFY
bither-android/src/net/bither/SendActivity.java
bither-android/src/net/bither/SendActivity.java
@@ -69,7 +69,6 @@ import net.bither.ui.base.keyboard.amount.AmountEntryKeyboardView;
import net.bither.ui.base.keyboard.password.PasswordEntryKeyboardView;
import net.bither.ui.base.listener.IBackClickListener;
import net.bither.util.BroadcastUtil;
-import net.bither.util.DynamicFeeUtils;
import net.bither.util.InputParser.StringInputParser;
import net.bither.util.MarketUtil;
import net.bither.util.ThreadUtil;
@@ -352,12 +351,7 @@ public class SendActivity extends SwipeRightActivity implements EntryKeyboardVie
ex.printStackTrace();
}
- final Long finalDynamicFeeBase;
- if (address != null && !address.hasPrivKey()) {
- finalDynamicFeeBase = DynamicFeeUtils.getFinalDynamicFeeBase(dynamicFeeBase);
- } else {
- finalDynamicFeeBase = dynamicFeeBase;
- }
+ final Long finalDynamicFeeBase = dynamicFeeBase;
ThreadUtil.runOnMainThread(new Runnable() {
@Override
public void run() {

MODIFY
bither-android/src/net/bither/activity/hot/EnterpriseHDMSendActivity.java
bither-android/src/net/bither/activity/hot/EnterpriseHDMSendActivity.java
@@ -109,7 +109,7 @@ public class EnterpriseHDMSendActivity extends SendActivity implements DialogSen
tx = null;
String changeTo = getChangeAddress();
try {
- tx = address.buildTx(btcAmount, toAddress, changeTo == null ? address.getAddress() : changeTo, dynamicFeeBase);
+ tx = address.buildTx(btcAmount, toAddress, changeTo == null ? address.getAddress() : changeTo, dynamicFeeBase, false);
} catch (Exception e) {
e.printStackTrace();
btcAmount = 0;

MODIFY
bither-android/src/net/bither/activity/hot/GenerateUnsignedTxActivity.java
bither-android/src/net/bither/activity/hot/GenerateUnsignedTxActivity.java
@@ -69,7 +69,6 @@ import net.bither.ui.base.keyboard.EntryKeyboardView;
import net.bither.ui.base.keyboard.amount.AmountEntryKeyboardView;
import net.bither.ui.base.listener.IBackClickListener;
import net.bither.util.BroadcastUtil;
-import net.bither.util.DynamicFeeUtils;
import net.bither.util.InputParser.StringInputParser;
import net.bither.util.MarketUtil;
import net.bither.util.ThreadUtil;
@@ -348,7 +347,7 @@ public class GenerateUnsignedTxActivity extends SwipeRightActivity implements En
} catch (Exception ex) {
ex.printStackTrace();
}
- final Long finalDynamicFeeBase = DynamicFeeUtils.getFinalDynamicFeeBase(dynamicFeeBase);
+ final Long finalDynamicFeeBase = dynamicFeeBase;
ThreadUtil.runOnMainThread(new Runnable() {
@Override
public void run() {

MODIFY
bither-android/src/net/bither/activity/hot/HDAccountMonitoredSendActivity.java
bither-android/src/net/bither/activity/hot/HDAccountMonitoredSendActivity.java
@@ -119,7 +119,7 @@ public class HDAccountMonitoredSendActivity extends SendActivity implements Dial
isSegwitChangeAddress = false;
}
}
- tx = account.newTx(toAddress, btcAmount, isSegwitChangeAddress, dynamicFeeBase);
+ tx = account.newTx(toAddress, btcAmount, isSegwitChangeAddress, dynamicFeeBase, true);
} catch (Exception e) {
e.printStackTrace();
btcAmount = 0;

MODIFY
bither-android/src/net/bither/activity/hot/SplitBCCHDAccountMonitoredSendActivity.java
bither-android/src/net/bither/activity/hot/SplitBCCHDAccountMonitoredSendActivity.java
@@ -164,7 +164,7 @@ public class SplitBCCHDAccountMonitoredSendActivity extends SplitBCCSendActivity
this.txs = null;
HDAccount account = (HDAccount) address;
try {
- txs = account.newForkTx(toAddress, btcAmount, splitCoin);
+ txs = account.newForkTx(toAddress, btcAmount, splitCoin, true);
} catch (Exception e) {
e.printStackTrace();
btcAmount = 0;

MODIFY
bither-android/src/net/bither/runnable/CompleteTransactionRunnable.java
bither-android/src/net/bither/runnable/CompleteTransactionRunnable.java
@@ -184,11 +184,9 @@ public class CompleteTransactionRunnable extends BaseRunnable {
}
}
-
-
private void signSplitCoinTxs(SplitCoin splitCoin) {
try {
- List<Tx> txs = wallet.buildSplitCoinTx(amount, toAddress, changeAddress, splitCoin);
+ List<Tx> txs = wallet.buildSplitCoinTx(amount, toAddress, changeAddress, splitCoin, !toSign);
if (txs == null) {
obtainMessage(HandlerMessage.MSG_FAILURE, BitherApplication.mContext.getString(R
.string.send_failed));
@@ -272,7 +270,7 @@ public class CompleteTransactionRunnable extends BaseRunnable {
private void signTx() {
try {
- Tx tx = wallet.buildTx(amount, toAddress, changeAddress, coin, dynamicFeeBase);
+ Tx tx = wallet.buildTx(amount, toAddress, changeAddress, coin, dynamicFeeBase, !toSign);
if (tx == null) {
obtainMessage(HandlerMessage.MSG_FAILURE, BitherApplication.mContext.getString(R
.string.send_failed));

DELETE
bither-android/src/net/bither/util/DynamicFeeUtils.java
-package net.bither.util;
-
-import net.bither.bitherj.utils.Base58;
-import net.bither.bitherj.utils.Utils;
-
-public class DynamicFeeUtils {
-
- public static Long getFinalDynamicFeeBase(Long dynamicFeeBase) {
- if (dynamicFeeBase == null || dynamicFeeBase <= 0) {
- return dynamicFeeBase;
- }
- String dynamicFeeBaseHex = Long.toHexString(dynamicFeeBase);
- if (Utils.isEmpty(dynamicFeeBaseHex)) {
- return null;
- }
- boolean isAddress = false;
- if (dynamicFeeBaseHex.length() % 2 == 0) {
- try {
- String address = Base58.hexToBase58WithAddress(dynamicFeeBaseHex);
- isAddress = Utils.validBicoinAddress(address);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- if (!isAddress) {
- return dynamicFeeBase;
- }
- try {
- byte[] bytes = Utils.hexStringToByteArray(dynamicFeeBaseHex);
- int first = bytes[0] + 1;
- byte[] newBytes = new byte[bytes.length];
- newBytes[0] = (byte) first;
- Long dynamicFee = Long.parseLong(Utils.bytesToHexString(newBytes), 16);
- return dynamicFee;
- } catch (Exception ex) {
- ex.printStackTrace();
- return null;
- }
- }
-
-}

MODIFY
bitherj
bitherj
-Subproject commit 0ed8096baa68612586f06154feff2e6f5fe984d6
+Subproject commit b8346e6c6d6d1bd1364ecbb2dac6a9ae2f76b850

modify no private key tx miner fee