Fix link and currency input (#2697)
* fix link focus * fix currency value null * fix currency code nullable * change in progress * currency is working * modify path
This commit is contained in:
@ -1,10 +1,8 @@
|
||||
import { isUndefined } from '@sniptt/guards';
|
||||
|
||||
export const convertCurrencyToCurrencyMicros = (
|
||||
currencyAmount: number | undefined,
|
||||
currencyAmount: number | null | undefined,
|
||||
) => {
|
||||
if (!currencyAmount) {
|
||||
return undefined;
|
||||
if (currencyAmount == null) {
|
||||
return null;
|
||||
}
|
||||
const currencyAmountAsNumber = +currencyAmount;
|
||||
if (isNaN(currencyAmountAsNumber)) {
|
||||
@ -18,10 +16,10 @@ export const convertCurrencyToCurrencyMicros = (
|
||||
};
|
||||
|
||||
export const convertCurrencyMicrosToCurrency = (
|
||||
currencyAmountMicros: number | undefined,
|
||||
currencyAmountMicros: number | null | undefined,
|
||||
) => {
|
||||
if (isUndefined(currencyAmountMicros)) {
|
||||
return undefined;
|
||||
if (currencyAmountMicros == null) {
|
||||
return null;
|
||||
}
|
||||
const currencyAmountMicrosAsNumber = +currencyAmountMicros;
|
||||
if (isNaN(currencyAmountMicrosAsNumber)) {
|
||||
|
||||
Reference in New Issue
Block a user