Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up list of available currencies #7667

Merged
merged 1 commit into from
Dec 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/unit/balance-formatter-test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const assert = require('assert')
const currencyFormatter = require('currency-formatter')
const infuraConversion = require('../../ui/app/helpers/constants/infura-conversion.json')
const availableCurrencies = require('../../ui/app/helpers/constants/available-conversions.json')

describe('currencyFormatting', function () {
it('be able to format any infura currency', function (done) {
const number = 10000

infuraConversion.objects.forEach((conversion) => {
const code = conversion.quote.code.toUpperCase()
availableCurrencies.forEach((conversion) => {
const code = conversion.code.toUpperCase()
const result = currencyFormatter.format(number, { code })

switch (code) {
Expand Down
238 changes: 238 additions & 0 deletions ui/app/helpers/constants/available-conversions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
[
{
"code": "aud",
"name": "Australian Dollar"
},
{
"code": "hkd",
"name": "Hong Kong Dollar"
},
{
"code": "sgd",
"name": "Singapore Dollar"
},
{
"code": "idr",
"name": "Indonesian Rupiah"
},
{
"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"
}
]
Loading