diff --git a/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml b/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml
index 2c847a420..d08d076c8 100644
--- a/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml
+++ b/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml
@@ -225,11 +225,12 @@
}
diff --git a/BTCPayServer/Views/Wallets/WalletPSBT.cshtml b/BTCPayServer/Views/Wallets/WalletPSBT.cshtml
index 733bf2995..a3797a31d 100644
--- a/BTCPayServer/Views/Wallets/WalletPSBT.cshtml
+++ b/BTCPayServer/Views/Wallets/WalletPSBT.cshtml
@@ -86,17 +86,17 @@
-
-
+ hljs.initHighlightingOnLoad();
+
+ $(function (){
+ initQRShow("Scan PSBT", @Json.Serialize(Model.PSBTHex), "scan-qr-modal");
+ if (typeof(initCameraScanningApp) === "function") {
+ initCameraScanningApp("Scan PSBT", function (data){
+ $("textarea[name=PSBT]").val(data);
+ $("#Decode").click();
+ }, "scanModal");
+ }
+ });
+
}
diff --git a/BTCPayServer/wwwroot/js/wallet/wallet-camera-scanner.js b/BTCPayServer/wwwroot/js/wallet/wallet-camera-scanner.js
index 899b64786..06f42be1e 100644
--- a/BTCPayServer/wwwroot/js/wallet/wallet-camera-scanner.js
+++ b/BTCPayServer/wwwroot/js/wallet/wallet-camera-scanner.js
@@ -1,6 +1,8 @@
$(function () {
- initCameraScanningApp("Scan address/ payment link", function(data){
- $("#BIP21").val(data);
- $("form").submit();
- },"scanModal");
+ if (typeof(initCameraScanningApp) === "function") {
+ initCameraScanningApp("Scan address/ payment link", function(data) {
+ $("#BIP21").val(data);
+ $("form").submit();
+ },"scanModal");
+ }
});