Skip to content

Commit

Permalink
fix cold hd split bcd crash
Browse files Browse the repository at this point in the history
  • Loading branch information
lujunZhang committed Jan 5, 2018
1 parent 0507217 commit 52ec507
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bither-android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="net.bither"
android:installLocation="internalOnly"
android:versionCode="179"
android:versionCode="180"
android:versionName="1.7.9">

<uses-sdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public void onConfirm() {

private void qrCodeTxTranscation(String...blockHash) {
Intent intent = new Intent(this, UnsignedTxQrCodeActivity.class);
intent.putExtra(BitherSetting.INTENT_REF.QR_CODE_STRING, QRCodeTxTransport.getSplitCoinHDAccountMonitoredUnsignedTx(txs, toAddress, (HDAccount) address, splitCoin));
intent.putExtra(BitherSetting.INTENT_REF.QR_CODE_STRING, QRCodeTxTransport.getSplitCoinHDAccountMonitoredUnsignedTx(txs, toAddress, (HDAccount) address, splitCoin, blockHash));
intent.putExtra(BitherSetting.INTENT_REF.TITLE_STRING, getString(R.string
.unsigned_transaction_qr_code_title));
startActivityForResult(intent, BitherSetting.INTENT_REF.SIGN_TX_REQUEST_CODE);
Expand Down Expand Up @@ -268,7 +268,11 @@ public void run() {
ArrayList<byte[]> sigs = new ArrayList<byte[]>();
for (int j = 0; j < tx.getIns().size(); j++) {
String s = array[strIndex + j];
sigs.add(Utils.hexStringToByteArray(replaceSignHashOfString(s)));
if(splitCoin == SplitCoin.BCD) {
sigs.add(Utils.hexStringToByteArray(s));
}else {
sigs.add(Utils.hexStringToByteArray(replaceSignHashOfString(s)));
}
}
tx.signWithSignatures(sigs);
if (!tx.verifySignatures()) {
Expand Down

0 comments on commit 52ec507

Please sign in to comment.