diff --git a/frontend/src/components/FederationTable/index.tsx b/frontend/src/components/FederationTable/index.tsx index 93c7aa1f..9947edf9 100644 --- a/frontend/src/components/FederationTable/index.tsx +++ b/frontend/src/components/FederationTable/index.tsx @@ -57,7 +57,11 @@ const FederationTable = ({ }, [federationUpdatedAt]); const loadRatings: () => void = () => { - if (settings.connection !== 'nostr') return; + if (settings.connection !== 'nostr') { + setLoading(false); + return; + } + setLoading(true); federation.roboPool.subscribeRatings({ onevent: (event) => { diff --git a/frontend/src/components/MakerForm/MakerForm.tsx b/frontend/src/components/MakerForm/MakerForm.tsx index 27ce428c..968923de 100644 --- a/frontend/src/components/MakerForm/MakerForm.tsx +++ b/frontend/src/components/MakerForm/MakerForm.tsx @@ -58,7 +58,7 @@ const MakerForm = ({ onReset = () => {}, submitButtonLabel = 'Create Order', }: MakerFormProps): React.JSX.Element => { - const { fav, setFav } = useContext(AppContext); + const { fav, setFav, settings } = useContext(AppContext); const { federation, federationUpdatedAt } = useContext(FederationContext); const { maker, setMaker, garage } = useContext(GarageContext); @@ -68,7 +68,7 @@ const MakerForm = ({ const [badRequest, setBadRequest] = useState(null); const [amountLimits, setAmountLimits] = useState([1, 1000]); - const [currentPrice, setCurrentPrice] = useState('...'); + const [currentPrice, setCurrentPrice] = useState(); const [currencyCode, setCurrencyCode] = useState('USD'); const [openDialogs, setOpenDialogs] = useState(false); @@ -411,6 +411,8 @@ const MakerForm = ({ } }; + const currencyFormatter = new Intl.NumberFormat(settings.language); + const SummaryText = (): React.JSX.Element => { return ( - {`${t('Order current rate:')} ${currentPrice ?? '-'} ${currencyCode}/BTC`} + {`${t('Order current rate:')} ${currentPrice ? currencyFormatter.format(currentPrice) : '-'} ${currencyCode}/BTC`} diff --git a/frontend/src/models/Federation.model.ts b/frontend/src/models/Federation.model.ts index db8efaa0..8fbe60db 100644 --- a/frontend/src/models/Federation.model.ts +++ b/frontend/src/models/Federation.model.ts @@ -117,8 +117,6 @@ export class Federation { this.roboPool.subscribeBook(robosatsOnly, { onevent: (event) => { const { dTag, publicOrder, network } = eventToPublicOrder(event); - console.log(network); - console.log(this.network); if (publicOrder && network == this.network) { this.book[dTag] = publicOrder; } else {