From a4f64479052d02e74db35769a4460d0bdfa5ffd3 Mon Sep 17 00:00:00 2001 From: Jonikorjk Date: Thu, 8 Jan 2026 16:50:16 +0200 Subject: [PATCH] psbt: support liquid transaction psbt export --- gaios/Sendflow/ViewModels/SendTxConfirmViewModel.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gaios/Sendflow/ViewModels/SendTxConfirmViewModel.swift b/gaios/Sendflow/ViewModels/SendTxConfirmViewModel.swift index d8466663..6f70aacf 100644 --- a/gaios/Sendflow/ViewModels/SendTxConfirmViewModel.swift +++ b/gaios/Sendflow/ViewModels/SendTxConfirmViewModel.swift @@ -160,10 +160,15 @@ class SendTxConfirmViewModel { func exportPsbt() async throws { guard let session = session, - let tx = transaction else { + var tx = transaction else { throw TransactionError.invalid(localizedDescription: "Invalid transaction") } + + if isLiquid { + tx = try await session.blindTransaction(tx: tx) + } unsignedPsbt = try await session.getPsbt(tx: tx) + let params = BcurEncodeParams(urType: "crypto-psbt", data: unsignedPsbt) guard let res = try await session.bcurEncode(params: params) else { throw TransactionError.invalid(localizedDescription: "Invalid bcur") @@ -290,7 +295,8 @@ class SendTxConfirmViewModel { } func showSignTransactionViaQR() -> Bool { - wm?.isWatchonly ?? false && [.bitcoinSS, .testnetSS].contains(session?.networkType) && txType != .sweep && !importSignedPsbt + wm?.isWatchonly ?? false && [.bitcoinSS, .testnetSS, .liquidSS, .testnetLiquidSS] + .contains(session?.networkType) && txType != .sweep && !importSignedPsbt } func showSignTransaction() -> Bool {