Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions gaios/Sendflow/ViewModels/SendTxConfirmViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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 {
Expand Down