mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-22 17:53:14 +00:00
Fix others
This commit is contained in:
@ -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) => {
|
||||
|
@ -58,7 +58,7 @@ const MakerForm = ({
|
||||
onReset = () => {},
|
||||
submitButtonLabel = 'Create Order',
|
||||
}: MakerFormProps): React.JSX.Element => {
|
||||
const { fav, setFav } = useContext<UseAppStoreType>(AppContext);
|
||||
const { fav, setFav, settings } = useContext<UseAppStoreType>(AppContext);
|
||||
const { federation, federationUpdatedAt } = useContext<UseFederationStoreType>(FederationContext);
|
||||
const { maker, setMaker, garage } = useContext<UseGarageStoreType>(GarageContext);
|
||||
|
||||
@ -68,7 +68,7 @@ const MakerForm = ({
|
||||
|
||||
const [badRequest, setBadRequest] = useState<string | null>(null);
|
||||
const [amountLimits, setAmountLimits] = useState<number[]>([1, 1000]);
|
||||
const [currentPrice, setCurrentPrice] = useState<number | string>('...');
|
||||
const [currentPrice, setCurrentPrice] = useState<number>();
|
||||
const [currencyCode, setCurrencyCode] = useState<string>('USD');
|
||||
|
||||
const [openDialogs, setOpenDialogs] = useState<boolean>(false);
|
||||
@ -411,6 +411,8 @@ const MakerForm = ({
|
||||
}
|
||||
};
|
||||
|
||||
const currencyFormatter = new Intl.NumberFormat(settings.language);
|
||||
|
||||
const SummaryText = (): React.JSX.Element => {
|
||||
return (
|
||||
<Typography
|
||||
@ -1031,7 +1033,7 @@ const MakerForm = ({
|
||||
title={t("Your order's current exchange rate. Rate will move with the market.")}
|
||||
>
|
||||
<Typography align='center' variant='caption' color='text.secondary'>
|
||||
{`${t('Order current rate:')} ${currentPrice ?? '-'} ${currencyCode}/BTC`}
|
||||
{`${t('Order current rate:')} ${currentPrice ? currencyFormatter.format(currentPrice) : '-'} ${currencyCode}/BTC`}
|
||||
</Typography>
|
||||
</Tooltip>
|
||||
</Collapse>
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user