added languages and currencies

This commit is contained in:
loj 2019-04-29 21:00:19 +02:00
parent 1b9994cf7e
commit eb254ccc2d
4 changed files with 74 additions and 0 deletions

View File

@ -809,6 +809,7 @@
EE07A46C21E29EA4006031C8 /* BaseCoordinator.swift in Sources */,
EEE15B1B22723179008231B6 /* SettingsVCDelegate.swift in Sources */,
EE57702B21D0230C00433CAB /* ZWProgressBar.swift in Sources */,
EECB17A022777D6A002964A4 /* Languages.swift in Sources */,
EE377EED21F7B02600138385 /* TrxMemoTableViewCell.swift in Sources */,
EE57702921D0011400433CAB /* Colors.swift in Sources */,
EE377EE621F4F1C400138385 /* TrxHistoryObservable.swift in Sources */,
@ -839,6 +840,7 @@
EEBEBB7D2200E10B00A6BD18 /* ScanVCDelegate.swift in Sources */,
EE377ED421F4827500138385 /* HomeTrxTableViewCell.swift in Sources */,
EEE15B132270ECE8008231B6 /* QrcGenerator.swift in Sources */,
EECB179C22760EAB002964A4 /* Currencies.swift in Sources */,
EE377EB521E6821F00138385 /* CreateNewWalletCoordinator.swift in Sources */,
EE377ECF21EB56AD00138385 /* ZWKeyboardLayoutConstraint.swift in Sources */,
EEBEBB7521FF8DC800A6BD18 /* RecipientAddressVC.swift in Sources */,

View File

@ -11,6 +11,10 @@ import Foundation
internal class Constants {
public static let defaultLanguage = "en"
public static let defaultCurrency = "USD"
public static let defaultNodeAddress = "node.22of8.ch:2208"
public static let pinCodeLength = 6
public static let atomicUnitsPerZec: UInt64 = 1_000_000_000_000

View File

@ -0,0 +1,44 @@
//
// Currencies.swift
// ZWallet
//
// Created by loj on 28.04.19.
// Copyright © 2019 XMR Systems LLC. All rights reserved.
//
import Foundation
extension Constants {
public static let currencies: [String:[String]] =
[
"":["EUR","USD","CHF","GBP"],
"A":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN"],
"B":["BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BZD"],
"C":["CAD","CDF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK"],
"D":["DJF","DKK","DOP","DZD"],
"E":["EGP","ERN","ETB"],
"F":["FJD","FKP"],
"G":["GEL","GGP","GHS","GIP","GMD","GNF","GTQ","GYD"],
"H":["HKD","HNL","HRK","HTG","HUF"],
"I":["IDR","ILS","IMP","INR","IQD","IRR","ISK"],
"J":["JEP","JMD","JOD","JPY"],
"K":["KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT"],
"L":["LAK","LBP","LKR","LRD","LSL","LYD"],
"M":["MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN"],
"N":["NAD","NGN","NIO","NOK","NPR","NZD"],
"O":["OMR"],
"P":["PAB","PEN","PGK","PHP","PKR","PLN","PYG"],
"Q":["QAR"],
"R":["RON","RSD","RUB","RWF"],
"S":["SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SPL","SRD","STN","SVC","SYP","SZL"],
"T":["THB","TJS","TMT","TND","TOP","TRY","TTD","TVD","TWD","TZS"],
"U":["UAH","UGX","UYU","UZS"],
"V":["VEF","VND","VUV"],
"W":["WST"],
"X":["XAF","XCD","XDR","XOF","XPF"],
"Y":["YER"],
"Z":["ZAR","ZMW","ZWD"]
]
}

View File

@ -0,0 +1,24 @@
//
// Languages.swift
// ZWallet
//
// Created by loj on 29.04.19.
// Copyright © 2019 XMR Systems LLC. All rights reserved.
//
import Foundation
public enum LanguageId: String, CaseIterable {
case en = "en"
case de = "de"
}
extension Constants {
public static let languages =
[
"":LanguageId.allCases
]
}