Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Update coinjoin.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
22388o authored Mar 2, 2024
1 parent f42a668 commit 36f5257
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions ios/app/coinjoin.swift
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
import UIKit
import CoinjoinTS

class ViewController: UIViewController {
let coinjoinService = CoinjoinService()

override func viewDidLoad() {
super.viewDidLoad()

DispatchQueue.global().async {
let transactions = self.coinjoinService.getCoinjoinTransactions()
// Update UI with transactions on the main thread
DispatchQueue.main.async {
// Update UI
}
}

createTransactionButton.addTarget(self, action: #selector(createTransaction), for: .touchUpInside)
}

@objc func createTransaction() {
DispatchQueue.global().async {
self.coinjoinService.createCoinjoinTransaction(amount: 0.1) // Example amount
}
}
}

0 comments on commit 36f5257

Please sign in to comment.