mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-24 15:36:59 +01:00
21 lines
460 B
Swift
21 lines
460 B
Swift
|
//
|
||
|
// FiatUnit.swift
|
||
|
// BlueWallet
|
||
|
//
|
||
|
// Created by Marcos Rodriguez on 11/20/20.
|
||
|
// Copyright © 2020 BlueWallet. All rights reserved.
|
||
|
//
|
||
|
import Foundation
|
||
|
|
||
|
struct FiatUnit: Codable {
|
||
|
let endPointKey: String
|
||
|
let symbol: String
|
||
|
let locale: String
|
||
|
let source: String
|
||
|
|
||
|
}
|
||
|
|
||
|
func fiatUnit(currency: String) -> FiatUnit? {
|
||
|
return Bundle.main.decode([String: FiatUnit].self, from: "fiatUnits.json").first(where: {$1.endPointKey == currency})?.value
|
||
|
}
|