diff --git a/src/currencies.ts b/src/currencies.ts new file mode 100644 index 0000000000..6cde9cbff2 --- /dev/null +++ b/src/currencies.ts @@ -0,0 +1,257 @@ +interface Options { + code: string + name: string +} + +const currencies: Array = [ + { + code: "aud", + name: "Australian Dollar" + }, + { + code: "hkd", + name: "Hong Kong Dollar" + }, + { + code: "sgd", + name: "Singapore Dollar" + }, + { + code: "idr", + name: "Indonesian Rupiah" + }, + { + code: "inr", + name: "Indian Rupee" + }, + { + code: "php", + name: "Philippine Peso" + }, + { + code: "1st", + name: "FirstBlood" + }, + { + code: "adt", + name: "adToken" + }, + { + code: "adx", + name: "AdEx" + }, + { + code: "ant", + name: "Aragon" + }, + { + code: "bat", + name: "Basic Attention Token" + }, + { + code: "bnt", + name: "Bancor" + }, + { + code: "btc", + name: "Bitcoin" + }, + { + code: "cad", + name: "Canadian Dollar" + }, + { + code: "cfi", + name: "Cofound.it" + }, + { + code: "crb", + name: "CreditBit" + }, + { + code: "cvc", + name: "Civic" + }, + { + code: "dash", + name: "Dash" + }, + { + code: "dgd", + name: "DigixDAO" + }, + { + code: "etc", + name: "Ethereum Classic" + }, + { + code: "eur", + name: "Euro" + }, + { + code: "fun", + name: "FunFair" + }, + { + code: "gbp", + name: "Pound Sterling" + }, + { + code: "gno", + name: "Gnosis" + }, + { + code: "gnt", + name: "Golem" + }, + { + code: "gup", + name: "Matchpool" + }, + { + code: "hmq", + name: "Humaniq" + }, + { + code: "jpy", + name: "Japanese Yen" + }, + { + code: "lgd", + name: "Legends Room" + }, + { + code: "lsk", + name: "Lisk" + }, + { + code: "ltc", + name: "Litecoin" + }, + { + code: "lun", + name: "Lunyr" + }, + { + code: "mco", + name: "Monaco" + }, + { + code: "mtl", + name: "Metal" + }, + { + code: "myst", + name: "Mysterium" + }, + { + code: "nmr", + name: "Numeraire" + }, + { + code: "omg", + name: "OmiseGO" + }, + { + code: "pay", + name: "TenX" + }, + { + code: "ptoy", + name: "Patientory" + }, + { + code: "qrl", + name: "Quantum-Resistant Ledger" + }, + { + code: "qtum", + name: "Qtum" + }, + { + code: "rep", + name: "Augur" + }, + { + code: "rlc", + name: "iEx.ec" + }, + { + code: "rub", + name: "Russian Ruble" + }, + { + code: "sc", + name: "Siacoin" + }, + { + code: "sngls", + name: "SingularDTV" + }, + { + code: "snt", + name: "Status" + }, + { + code: "steem", + name: "Steem" + }, + { + code: "storj", + name: "Storj" + }, + { + code: "time", + name: "ChronoBank" + }, + { + code: "tkn", + name: "TokenCard" + }, + { + code: "trst", + name: "WeTrust" + }, + { + code: "uah", + name: "Ukrainian Hryvnia" + }, + { + code: "usd", + name: "United States Dollar" + }, + { + code: "wings", + name: "Wings" + }, + { + code: "xem", + name: "NEM" + }, + { + code: "xlm", + name: "Stellar Lumen" + }, + { + code: "xmr", + name: "Monero" + }, + { + code: "xrp", + name: "Ripple" + }, + { + code: "zec", + name: "Zcash" + }, + { + code: "dai", + name: "DAI" + }, + { + code: "sai", + name: "SAI" + } +] + +export default currencies; diff --git a/src/index.ts b/src/index.ts index 6e208904ff..a5521d3267 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import 'isomorphic-fetch'; import * as util from './util'; +import currencies from './currencies'; export * from './assets/AccountTrackerController'; export * from './user/AddressBookController'; @@ -20,4 +21,7 @@ export * from './assets/TokenRatesController'; export * from './transaction/TransactionController'; export * from './message-manager/PersonalMessageManager'; export * from './message-manager/TypedMessageManager'; -export { util }; +export { + util, + currencies +}; diff --git a/tests/currencies.test.ts b/tests/currencies.test.ts new file mode 100644 index 0000000000..2ffb177fec --- /dev/null +++ b/tests/currencies.test.ts @@ -0,0 +1,16 @@ +import currencies from '../src/currencies'; + +const toCheck = [ + "eur", + "etc", + "usd", + "sai" +]; + +describe('Test for some currencies', () => { + it('should have the important ones', () => { + toCheck.forEach(value => { + expect(currencies.some(currency => currency.code === value)) + }) + }); +})