Skip to content

Commit

Permalink
destructuring forceUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
myxmaster committed Feb 12, 2025
1 parent 981fba5 commit ade5f5f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/AmountInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,11 @@ export default class AmountInput extends React.Component<
hideUnitChangeButton,
FiatStore,
UnitsStore,
SettingsStore
SettingsStore,
forceUnit
} = this.props;
const { units }: any = UnitsStore;
const effectiveUnits = this.props.forceUnit || units;
const effectiveUnits = forceUnit || units;
const { getRate, getSymbol }: any = FiatStore;
const { settings }: any = SettingsStore;
const { fiatEnabled } = settings;
Expand All @@ -174,7 +175,7 @@ export default class AmountInput extends React.Component<
const formatted = text.replace(/[^\d.,-]/g, '');
const satAmount = getSatAmount(
formatted,
this.props.forceUnit
forceUnit
);
onAmountChange(formatted, satAmount);
this.setState({ satAmount });
Expand Down

0 comments on commit ade5f5f

Please sign in to comment.