26 lines
570 B
Swift
26 lines
570 B
Swift
//
|
|
// CashRatesService.swift
|
|
// PayCash
|
|
//
|
|
// Created by Saveliy Stavitsky on 7/19/21.
|
|
// Copyright © 2021 AM. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import EosioSwift
|
|
|
|
class CashRatesService {
|
|
|
|
func fetchRates(listSymbol: String, completion: @escaping ([String]?) -> Void) {
|
|
Network.table.fetch(
|
|
code: Network.servers.current.contract(.cash),
|
|
table: "rates",
|
|
scope: listSymbol,
|
|
fieldName: "cash_token",
|
|
type: String.self
|
|
) { rows in
|
|
completion(rows)
|
|
}
|
|
}
|
|
}
|