Browse Source
Merge pull request #8 from CoboVault/electrum
handle invalid txn
V1.1.0-release
Aaron Chen
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
app/src/main/java/com/cobo/cold/viewmodel/TxConfirmViewModel.java
|
|
@ -60,6 +60,7 @@ import com.googlecode.protobuf.format.JsonFormat; |
|
|
|
import org.json.JSONArray; |
|
|
|
import org.json.JSONException; |
|
|
|
import org.json.JSONObject; |
|
|
|
import org.spongycastle.util.encoders.DecoderException; |
|
|
|
import org.spongycastle.util.encoders.Hex; |
|
|
|
|
|
|
|
import java.security.SignatureException; |
|
|
@ -163,7 +164,7 @@ public class TxConfirmViewModel extends AndroidViewModel { |
|
|
|
|
|
|
|
JSONObject signTx = parseElectrumTxHex(tx); |
|
|
|
parseTxData(signTx.toString()); |
|
|
|
} catch (ElectrumTx.SerializationException | JSONException e) { |
|
|
|
} catch (ElectrumTx.SerializationException | JSONException | DecoderException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
parseTxException.postValue(new InvalidTransactionException("invalid transaction")); |
|
|
|
} catch (XpubNotMatchException e) { |
|
|
|