lnd-demo-app/wallet/Repository/ExampleRepository.swift
2023-06-08 09:36:06 +03:00

21 lines
440 B
Swift

//
// ExampleRepository.swift
// wallet
//
// Created by Jason on 8/23/20.
// Copyright © 2020 Jason. All rights reserved.
//
import Foundation
class ExampleRepository {
// Perform fake request
func getRandomInt(onSuccess: @escaping (Int) -> Void, onFailure: @escaping (Error) -> Void) {
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
onSuccess(Int.random(in: 1..<100))
}
}
}