diff --git a/CHANGELOG.md b/CHANGELOG.md index cf642ae904..b4538995fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased - Display the wallet root fingerprint in the account info and device settings +- Add support for Nigerian Naira (NGN) +- Add support for South African Rand (ZAR) ## 4.38.0 - Bundle BitBox02 firmware version v9.14.1 diff --git a/backend/rates/gecko.go b/backend/rates/gecko.go index 3a81192b94..ba24e36d1a 100644 --- a/backend/rates/gecko.go +++ b/backend/rates/gecko.go @@ -101,6 +101,8 @@ var ( "SEK": "sek", "PLN": "pln", "CZK": "czk", + "NGN": "ngn", + "ZAR": "zar", } // Copied from https://api.coingecko.com/api/v3/simple/supported_vs_currencies. @@ -125,5 +127,7 @@ var ( "sek": "SEK", "pln": "PLN", "czk": "CZK", + "ngn": "NGN", + "zar": "ZAR", } ) diff --git a/backend/rates/rates.go b/backend/rates/rates.go index 17431dc1a4..7f7c38170c 100644 --- a/backend/rates/rates.go +++ b/backend/rates/rates.go @@ -39,7 +39,7 @@ import ( const ( // Latest rates are fetched for all these (coin, fiat) pairs. simplePriceAllIDs = "bitcoin,litecoin,ethereum,basic-attention-token,dai,chainlink,maker,sai,usd-coin,tether,0x,wrapped-bitcoin,pax-gold" - simplePriceAllCurrencies = "usd,eur,chf,gbp,jpy,krw,cny,rub,cad,aud,ils,btc,sgd,hkd,brl,nok,sek,pln,czk" + simplePriceAllCurrencies = "usd,eur,chf,gbp,jpy,krw,cny,rub,cad,aud,ils,btc,sgd,hkd,brl,nok,sek,pln,czk,ngn,zar" // RatesEventSubject is the Subject of the event generated by new rates fetching. RatesEventSubject = "rates" ) @@ -73,11 +73,13 @@ const ( ILS Fiat = "ILS" JPY Fiat = "JPY" KRW Fiat = "KRW" + NGN Fiat = "NGN" NOK Fiat = "NOK" PLN Fiat = "PLN" RUB Fiat = "RUB" SEK Fiat = "SEK" SGD Fiat = "SGD" + ZAR Fiat = "ZAR" USD Fiat = "USD" BTC Fiat = "BTC" ) diff --git a/frontends/web/src/api/account.ts b/frontends/web/src/api/account.ts index b17af25ebb..302797f80f 100644 --- a/frontends/web/src/api/account.ts +++ b/frontends/web/src/api/account.ts @@ -21,7 +21,7 @@ export type CoinCode = 'btc' | 'tbtc' | 'ltc' | 'tltc' | 'eth' | 'goeth'; export type AccountCode = string; -export type Fiat = 'AUD' | 'BRL' | 'BTC' | 'CAD' | 'CHF' | 'CNY' | 'CZK' | 'EUR' | 'GBP' | 'HKD' | 'ILS' | 'JPY' | 'KRW' | 'NOK' | 'PLN' | 'RUB' | 'SEK' | 'SGD' | 'USD'; +export type Fiat = 'AUD' | 'BRL' | 'BTC' | 'CAD' | 'CHF' | 'CNY' | 'CZK' | 'EUR' | 'GBP' | 'HKD' | 'ILS' | 'JPY' | 'KRW' | 'NGN' | 'NOK' | 'PLN' | 'RUB' | 'SEK' | 'SGD' | 'ZAR' | 'USD'; export type ConversionUnit = Fiat | 'sat' diff --git a/frontends/web/src/components/balance/balance.test.tsx b/frontends/web/src/components/balance/balance.test.tsx index 5e08d31a0e..6c341176ba 100644 --- a/frontends/web/src/components/balance/balance.test.tsx +++ b/frontends/web/src/components/balance/balance.test.tsx @@ -45,11 +45,13 @@ describe('components/balance/balance', () => { ILS: '512', JPY: '512', KRW: '512', + NGN: '512', NOK: '512', PLN: '512', RUB: '512', SEK: '512', SGD: '512', + ZAR: '512', USD: '512', } } diff --git a/frontends/web/src/components/rates/rates.tsx b/frontends/web/src/components/rates/rates.tsx index aef0088a6d..cb9ee4f79d 100644 --- a/frontends/web/src/components/rates/rates.tsx +++ b/frontends/web/src/components/rates/rates.tsx @@ -51,15 +51,17 @@ export const currenciesWithDisplayName: FiatWithDisplayName[] = [ { currency: 'ILS', displayName: 'Israeli New Shekel' }, { currency: 'JPY', displayName: 'Japanese Yen' }, { currency: 'KRW', displayName: 'South Korean Won' }, + { currency: 'NGN', displayName: 'Nigerian Naira' }, { currency: 'NOK', displayName: 'Norwegian Krone' }, { currency: 'PLN', displayName: 'Polish Zloty' }, { currency: 'RUB', displayName: 'Russian ruble' }, { currency: 'SEK', displayName: 'Swedish Krona' }, { currency: 'SGD', displayName: 'Singapore Dollar' }, + { currency: 'ZAR', displayName: 'South African Rand' }, { currency: 'USD', displayName: 'United States Dollar' }, { currency: 'BTC', displayName: 'Bitcoin' } ]; -export const currencies: Fiat[] = ['AUD', 'BRL', 'CAD', 'CHF', 'CNY', 'CZK', 'EUR', 'GBP', 'HKD', 'ILS', 'JPY', 'KRW', 'NOK', 'PLN', 'RUB', 'SEK', 'SGD', 'USD', 'BTC']; +export const currencies: Fiat[] = ['AUD', 'BRL', 'CAD', 'CHF', 'CNY', 'CZK', 'EUR', 'GBP', 'HKD', 'ILS', 'JPY', 'KRW', 'NGN', 'NOK', 'PLN', 'RUB', 'SEK', 'SGD', 'ZAR', 'USD', 'BTC']; export const store = new Store({ active: 'USD', diff --git a/frontends/web/src/routes/account/send/feetargets.test.tsx b/frontends/web/src/routes/account/send/feetargets.test.tsx index ae9c9d6e4a..2002f8b759 100644 --- a/frontends/web/src/routes/account/send/feetargets.test.tsx +++ b/frontends/web/src/routes/account/send/feetargets.test.tsx @@ -68,6 +68,7 @@ describe('routes/account/send/feetargets', () => { EUR: '0.02', GBP: '0.02', HKD: '19880', + NGN: '0.0013', NOK: '0.02', ILS: '0.02', JPY: '1.30', @@ -76,6 +77,7 @@ describe('routes/account/send/feetargets', () => { RUB: '0.88', SEK: '0.1', SGD: '32233', + ZAR: '0.06', USD: '0.02', BTC: '0.02', },