Skip to content

Commit

Permalink
refactor(on-ramp): use ?? instead of ||
Browse files Browse the repository at this point in the history
  • Loading branch information
wachunei committed Jun 22, 2023
1 parent 1f878e3 commit 52cf196
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ const Quote: React.FC<Props> = ({
const totalFees = networkFee + providerFee;
const price = amountIn - totalFees;

const fiatCode = fiat?.symbol || '';
const fiatSymbol = fiat?.denomSymbol || '';
const fiatCode = fiat?.symbol ?? '';
const fiatSymbol = fiat?.denomSymbol ?? '';

const expandedHeight = useSharedValue(0);
const handleOnLayout = (event: LayoutChangeEvent) => {
Expand Down Expand Up @@ -147,9 +147,9 @@ const Quote: React.FC<Props> = ({
{renderFromTokenMinimalUnit(
toTokenMinimalUnit(
amountOut,
crypto?.decimals || 0,
crypto?.decimals ?? 0,
).toString(),
crypto?.decimals || 0,
crypto?.decimals ?? 0,
)}{' '}
{crypto?.symbol}
</Text>
Expand Down

0 comments on commit 52cf196

Please sign in to comment.