mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
log errors on failed qr psbt parsing
This commit is contained in:
parent
f8fa929166
commit
563af71ed2
2 changed files with 14 additions and 1 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
||||||
Subproject commit e974c3f4223d1771aa59013c31311cf3d85e0915
|
Subproject commit 49654b7c82d104f7898eff95f0ac3cec96fbc0ec
|
|
@ -16,6 +16,7 @@ import com.sparrowwallet.drongo.protocol.Base43;
|
||||||
import com.sparrowwallet.drongo.protocol.ScriptType;
|
import com.sparrowwallet.drongo.protocol.ScriptType;
|
||||||
import com.sparrowwallet.drongo.protocol.Transaction;
|
import com.sparrowwallet.drongo.protocol.Transaction;
|
||||||
import com.sparrowwallet.drongo.psbt.PSBT;
|
import com.sparrowwallet.drongo.psbt.PSBT;
|
||||||
|
import com.sparrowwallet.drongo.psbt.PSBTParseException;
|
||||||
import com.sparrowwallet.drongo.uri.BitcoinURI;
|
import com.sparrowwallet.drongo.uri.BitcoinURI;
|
||||||
import com.sparrowwallet.drongo.wallet.Keystore;
|
import com.sparrowwallet.drongo.wallet.Keystore;
|
||||||
import com.sparrowwallet.drongo.wallet.Wallet;
|
import com.sparrowwallet.drongo.wallet.Wallet;
|
||||||
|
@ -193,6 +194,10 @@ public class QRScanDialog extends Dialog<QRScanDialog.Result> {
|
||||||
PSBT psbt = PSBT.fromString(complete);
|
PSBT psbt = PSBT.fromString(complete);
|
||||||
result = new Result(psbt);
|
result = new Result(psbt);
|
||||||
return;
|
return;
|
||||||
|
} catch(PSBTParseException e) {
|
||||||
|
if(PSBT.isPSBT(complete)) {
|
||||||
|
log.error("Error parsing PSBT", e);
|
||||||
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
//ignore, bytes not parsable as PSBT
|
//ignore, bytes not parsable as PSBT
|
||||||
}
|
}
|
||||||
|
@ -241,6 +246,10 @@ public class QRScanDialog extends Dialog<QRScanDialog.Result> {
|
||||||
psbt = PSBT.fromString(qrtext);
|
psbt = PSBT.fromString(qrtext);
|
||||||
result = new Result(psbt);
|
result = new Result(psbt);
|
||||||
return;
|
return;
|
||||||
|
} catch(PSBTParseException e) {
|
||||||
|
if(PSBT.isPSBT(qrtext)) {
|
||||||
|
log.error("Error parsing PSBT", e);
|
||||||
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
//Ignore, not parseable as Base64 or hex
|
//Ignore, not parseable as Base64 or hex
|
||||||
}
|
}
|
||||||
|
@ -299,6 +308,10 @@ public class QRScanDialog extends Dialog<QRScanDialog.Result> {
|
||||||
try {
|
try {
|
||||||
PSBT psbt = new PSBT(urBytes);
|
PSBT psbt = new PSBT(urBytes);
|
||||||
return new Result(psbt);
|
return new Result(psbt);
|
||||||
|
} catch(PSBTParseException e) {
|
||||||
|
if(PSBT.isPSBT(urBytes)) {
|
||||||
|
log.error("Error parsing PSBT", e);
|
||||||
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
//ignore, bytes not parsable as PSBT
|
//ignore, bytes not parsable as PSBT
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue