@@ -44,6 +44,7 @@ export const CurrencyUnit = {
4444 MWK : "MWK" ,
4545 RWF : "RWF" ,
4646 ZMW : "ZMW" ,
47+ AED : "AED" ,
4748 USDT : "USDT" ,
4849 USDC : "USDC" ,
4950
@@ -59,6 +60,7 @@ export const CurrencyUnit = {
5960 Gbp : "GBP" ,
6061 Inr : "INR" ,
6162 Brl : "BRL" ,
63+ Aed : "AED" ,
6264 Usdt : "USDT" ,
6365 Usdc : "USDC" ,
6466} as const ;
@@ -112,6 +114,7 @@ const standardUnitConversionObj = {
112114 [ CurrencyUnit . MWK ] : ( v : number ) => v ,
113115 [ CurrencyUnit . RWF ] : ( v : number ) => v ,
114116 [ CurrencyUnit . ZMW ] : ( v : number ) => v ,
117+ [ CurrencyUnit . AED ] : ( v : number ) => v ,
115118 [ CurrencyUnit . USDT ] : ( v : number ) => v ,
116119 [ CurrencyUnit . USDC ] : ( v : number ) => v ,
117120} ;
@@ -164,6 +167,7 @@ const CONVERSION_MAP = {
164167 [ CurrencyUnit . MWK ] : toBitcoinConversion ,
165168 [ CurrencyUnit . RWF ] : toBitcoinConversion ,
166169 [ CurrencyUnit . ZMW ] : toBitcoinConversion ,
170+ [ CurrencyUnit . AED ] : toBitcoinConversion ,
167171 [ CurrencyUnit . USDT ] : toBitcoinConversion ,
168172 [ CurrencyUnit . USDC ] : toBitcoinConversion ,
169173 } ,
@@ -200,6 +204,7 @@ const CONVERSION_MAP = {
200204 [ CurrencyUnit . MWK ] : toMicrobitcoinConversion ,
201205 [ CurrencyUnit . RWF ] : toMicrobitcoinConversion ,
202206 [ CurrencyUnit . ZMW ] : toMicrobitcoinConversion ,
207+ [ CurrencyUnit . AED ] : toMicrobitcoinConversion ,
203208 [ CurrencyUnit . USDT ] : toMicrobitcoinConversion ,
204209 [ CurrencyUnit . USDC ] : toMicrobitcoinConversion ,
205210 } ,
@@ -236,6 +241,7 @@ const CONVERSION_MAP = {
236241 [ CurrencyUnit . MWK ] : toMillibitcoinConversion ,
237242 [ CurrencyUnit . RWF ] : toMillibitcoinConversion ,
238243 [ CurrencyUnit . ZMW ] : toMillibitcoinConversion ,
244+ [ CurrencyUnit . AED ] : toMillibitcoinConversion ,
239245 [ CurrencyUnit . USDT ] : toMillibitcoinConversion ,
240246 [ CurrencyUnit . USDC ] : toMillibitcoinConversion ,
241247 } ,
@@ -272,6 +278,7 @@ const CONVERSION_MAP = {
272278 [ CurrencyUnit . MWK ] : toMillisatoshiConversion ,
273279 [ CurrencyUnit . RWF ] : toMillisatoshiConversion ,
274280 [ CurrencyUnit . ZMW ] : toMillisatoshiConversion ,
281+ [ CurrencyUnit . AED ] : toMillisatoshiConversion ,
275282 [ CurrencyUnit . USDT ] : toMillisatoshiConversion ,
276283 [ CurrencyUnit . USDC ] : toMillisatoshiConversion ,
277284 } ,
@@ -308,6 +315,7 @@ const CONVERSION_MAP = {
308315 [ CurrencyUnit . MWK ] : toNanobitcoinConversion ,
309316 [ CurrencyUnit . RWF ] : toNanobitcoinConversion ,
310317 [ CurrencyUnit . ZMW ] : toNanobitcoinConversion ,
318+ [ CurrencyUnit . AED ] : toNanobitcoinConversion ,
311319 [ CurrencyUnit . USDT ] : toNanobitcoinConversion ,
312320 [ CurrencyUnit . USDC ] : toNanobitcoinConversion ,
313321 } ,
@@ -344,6 +352,7 @@ const CONVERSION_MAP = {
344352 [ CurrencyUnit . MWK ] : toSatoshiConversion ,
345353 [ CurrencyUnit . RWF ] : toSatoshiConversion ,
346354 [ CurrencyUnit . ZMW ] : toSatoshiConversion ,
355+ [ CurrencyUnit . AED ] : toSatoshiConversion ,
347356 [ CurrencyUnit . USDT ] : toSatoshiConversion ,
348357 [ CurrencyUnit . USDC ] : toSatoshiConversion ,
349358 } ,
@@ -373,6 +382,7 @@ const CONVERSION_MAP = {
373382 [ CurrencyUnit . MWK ] : standardUnitConversionObj ,
374383 [ CurrencyUnit . RWF ] : standardUnitConversionObj ,
375384 [ CurrencyUnit . ZMW ] : standardUnitConversionObj ,
385+ [ CurrencyUnit . AED ] : standardUnitConversionObj ,
376386 [ CurrencyUnit . USDT ] : standardUnitConversionObj ,
377387 [ CurrencyUnit . USDC ] : standardUnitConversionObj ,
378388} ;
@@ -462,6 +472,7 @@ export type CurrencyMap = {
462472 [ CurrencyUnit . MWK ] : number ;
463473 [ CurrencyUnit . RWF ] : number ;
464474 [ CurrencyUnit . ZMW ] : number ;
475+ [ CurrencyUnit . AED ] : number ;
465476 [ CurrencyUnit . USDT ] : number ;
466477 [ CurrencyUnit . USDC ] : number ;
467478 [ CurrencyUnit . FUTURE_VALUE ] : number ;
@@ -501,6 +512,7 @@ export type CurrencyMap = {
501512 [ CurrencyUnit . MWK ] : string ;
502513 [ CurrencyUnit . RWF ] : string ;
503514 [ CurrencyUnit . ZMW ] : string ;
515+ [ CurrencyUnit . AED ] : string ;
504516 [ CurrencyUnit . USDT ] : string ;
505517 [ CurrencyUnit . USDC ] : string ;
506518 [ CurrencyUnit . FUTURE_VALUE ] : string ;
@@ -721,6 +733,7 @@ function convertCurrencyAmountValues(
721733 mwk : CurrencyUnit . MWK ,
722734 rwf : CurrencyUnit . RWF ,
723735 zmw : CurrencyUnit . ZMW ,
736+ aed : CurrencyUnit . AED ,
724737 mibtc : CurrencyUnit . MICROBITCOIN ,
725738 mlbtc : CurrencyUnit . MILLIBITCOIN ,
726739 nbtc : CurrencyUnit . NANOBITCOIN ,
@@ -805,6 +818,7 @@ export function mapCurrencyAmount(
805818 mwk,
806819 rwf,
807820 zmw,
821+ aed,
808822 usdt,
809823 usdc,
810824 } = convertCurrencyAmountValues ( unit , value , unitsPerBtc , conversionOverride ) ;
@@ -839,6 +853,7 @@ export function mapCurrencyAmount(
839853 [ CurrencyUnit . MWK ] : mwk ,
840854 [ CurrencyUnit . RWF ] : rwf ,
841855 [ CurrencyUnit . ZMW ] : zmw ,
856+ [ CurrencyUnit . AED ] : aed ,
842857 [ CurrencyUnit . MICROBITCOIN ] : mibtc ,
843858 [ CurrencyUnit . MILLIBITCOIN ] : mlbtc ,
844859 [ CurrencyUnit . NANOBITCOIN ] : nbtc ,
@@ -974,6 +989,10 @@ export function mapCurrencyAmount(
974989 value : zmw ,
975990 unit : CurrencyUnit . ZMW ,
976991 } ) ,
992+ [ CurrencyUnit . AED ] : formatCurrencyStr ( {
993+ value : aed ,
994+ unit : CurrencyUnit . AED ,
995+ } ) ,
977996 [ CurrencyUnit . USDT ] : formatCurrencyStr ( {
978997 value : usdt ,
979998 unit : CurrencyUnit . USDT ,
@@ -1106,6 +1125,8 @@ export const abbrCurrencyUnit = (unit: CurrencyUnitType) => {
11061125 return "RWF" ;
11071126 case CurrencyUnit . ZMW :
11081127 return "ZMW" ;
1128+ case CurrencyUnit . AED :
1129+ return "AED" ;
11091130 }
11101131 return "Unsupported CurrencyUnit" ;
11111132} ;
0 commit comments