File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ class SendAmountViewController: KeyboardViewController {
338338 infoView. isHidden = false
339339 } else {
340340 btnNextEnabled = false
341- if viewModel. createTx. satoshi != nil || viewModel. createTx. sendAll || viewModel. createTx. txType == . sweep || viewModel. createTx. txType == . redepositExpiredUtxos {
341+ if viewModel. createTx. satoshi ?? 0 > 0 || viewModel. createTx. sendAll || viewModel. createTx. txType == . sweep || viewModel. createTx. txType == . redepositExpiredUtxos {
342342 btnNextEnabled = true
343343 }
344344 lblError. text = " "
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ class SendAmountViewModel {
3636 }
3737
3838 var error : String ? {
39+ if transaction? . txType == . transaction {
40+ if !sendAll && ( createTx. satoshi ?? 0 == 0 ) {
41+ return nil
42+ }
43+ }
3944 if let error = transaction? . error, !error. isEmpty {
4045 return error
4146 }
@@ -277,6 +282,8 @@ class SendAmountViewModel {
277282 case . transaction, . psbt:
278283 if createTx. sendAll && createTx. satoshi == nil {
279284 createTx. satoshi = 0
285+ } else if !createTx. sendAll && ( createTx. satoshi == nil || createTx. satoshi == 0 ) {
286+ return tx
280287 }
281288 if let addressee = createTx. addressee {
282289 tx. addressees = [ addressee]
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ class SendTxConfirmViewModel {
161161 }
162162 bcurUnsignedPsbt = res
163163 }
164-
164+
165165 func sendPsbt( ) async throws -> SendTransactionSuccess {
166166 guard let session = session else {
167167 throw TransactionError . invalid ( localizedDescription: " Invalid session " )
You can’t perform that action at this time.
0 commit comments