Show live swap status, explorer links, and full kyc.rip route details

This commit is contained in:
2026-10-26 21:31:41 +08:00
parent 2f70931cba
commit 3ff5385a9b
13 changed files with 759 additions and 150 deletions
+4 -2
View File
@@ -313,12 +313,14 @@ final class MoneroService {
// MARK: - Sends
func send(address: String, amountXMR: String, priority: TransactionPriority) async throws -> (hash: String, fee: String) {
func send(address: String, amountXMR: String, priority: TransactionPriority,
accountIndex: Int = 0) async throws -> (hash: String, fee: String) {
let atomic = try MoneroAmount.atomic(fromXMR: amountXMR)
let response = try await invoke(["op": "transferTo",
"address": address.trimmingCharacters(in: .whitespacesAndNewlines),
"amount": String(atomic),
"priority": priority.rawValue])
"priority": priority.rawValue,
"accountIndex": accountIndex])
return (response["txHash"] as? String ?? "",
MoneroAmount.xmr(fromAtomic: response["fee"] as? String ?? "0"))
}