mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
support tr script expressions in qr crypto-output
This commit is contained in:
parent
8f04d23b3f
commit
c566dea232
3 changed files with 6 additions and 2 deletions
|
@ -65,7 +65,7 @@ dependencies {
|
||||||
implementation('com.github.arteam:simple-json-rpc-server:1.0') {
|
implementation('com.github.arteam:simple-json-rpc-server:1.0') {
|
||||||
exclude group: 'org.slf4j'
|
exclude group: 'org.slf4j'
|
||||||
}
|
}
|
||||||
implementation('com.sparrowwallet:hummingbird:1.6.2')
|
implementation('com.sparrowwallet:hummingbird:1.6.3')
|
||||||
implementation('com.nativelibs4java:bridj:0.7-20140918-3') {
|
implementation('com.nativelibs4java:bridj:0.7-20140918-3') {
|
||||||
exclude group: 'com.google.android.tools', module: 'dx'
|
exclude group: 'com.google.android.tools', module: 'dx'
|
||||||
}
|
}
|
||||||
|
@ -441,7 +441,7 @@ extraJavaModuleInfo {
|
||||||
module('kotlin-stdlib-1.5.20.jar', 'kotlin.stdlib', '1.5.20') {
|
module('kotlin-stdlib-1.5.20.jar', 'kotlin.stdlib', '1.5.20') {
|
||||||
exports('kotlin')
|
exports('kotlin')
|
||||||
}
|
}
|
||||||
module('hummingbird-1.6.2.jar', 'com.sparrowwallet.hummingbird', '1.6.2') {
|
module('hummingbird-1.6.3.jar', 'com.sparrowwallet.hummingbird', '1.6.3') {
|
||||||
exports('com.sparrowwallet.hummingbird')
|
exports('com.sparrowwallet.hummingbird')
|
||||||
exports('com.sparrowwallet.hummingbird.registry')
|
exports('com.sparrowwallet.hummingbird.registry')
|
||||||
requires('co.nstant.in.cbor')
|
requires('co.nstant.in.cbor')
|
||||||
|
|
|
@ -515,6 +515,8 @@ public class QRScanDialog extends Dialog<QRScanDialog.Result> {
|
||||||
return ScriptType.P2SH_P2WSH;
|
return ScriptType.P2SH_P2WSH;
|
||||||
} else if(List.of(ScriptExpression.WITNESS_SCRIPT_HASH).equals(expressions)) {
|
} else if(List.of(ScriptExpression.WITNESS_SCRIPT_HASH).equals(expressions)) {
|
||||||
return ScriptType.P2WSH;
|
return ScriptType.P2WSH;
|
||||||
|
} else if(List.of(ScriptExpression.TAPROOT).equals(expressions)) {
|
||||||
|
return ScriptType.P2TR;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new IllegalArgumentException("Unknown script of " + expressions);
|
throw new IllegalArgumentException("Unknown script of " + expressions);
|
||||||
|
|
|
@ -360,6 +360,8 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
return List.of(ScriptExpression.SCRIPT_HASH, ScriptExpression.WITNESS_SCRIPT_HASH);
|
return List.of(ScriptExpression.SCRIPT_HASH, ScriptExpression.WITNESS_SCRIPT_HASH);
|
||||||
} else if(scriptType == ScriptType.P2WSH) {
|
} else if(scriptType == ScriptType.P2WSH) {
|
||||||
return List.of(ScriptExpression.WITNESS_SCRIPT_HASH);
|
return List.of(ScriptExpression.WITNESS_SCRIPT_HASH);
|
||||||
|
} else if(scriptType == ScriptType.P2TR) {
|
||||||
|
return List.of(ScriptExpression.TAPROOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new IllegalArgumentException("Unknown script type of " + scriptType);
|
throw new IllegalArgumentException("Unknown script type of " + scriptType);
|
||||||
|
|
Loading…
Reference in a new issue