Fix useffects for book/limit baseurl change, robot open profile and stats.

This commit is contained in:
Reckless_Satoshi 2023-03-04 11:42:17 -08:00
parent 41feb8cf8e
commit e69aa09bb6
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
5 changed files with 7 additions and 6 deletions

View File

@ -160,7 +160,7 @@ const ListHeader = styled('span')(
const Listbox = styled('ul')( const Listbox = styled('ul')(
({ theme, sx }) => ` ({ theme, sx }) => `
width: ${sx ? sx.width : '15.6em'}; width: ${sx != null ? sx.width : '15.6em'};
margin: 2px 0 0; margin: 2px 0 0;
padding: 0; padding: 0;
position: absolute; position: absolute;

View File

@ -329,6 +329,7 @@ export const AppContextProvider = ({
clientVersion: versionInfo.clientVersion, clientVersion: versionInfo.clientVersion,
loading: false, loading: false,
}); });
setSettings({ ...settings, network: data.network });
}); });
}; };
@ -450,7 +451,7 @@ export const AppContextProvider = ({
newRobot = { newRobot = {
...oldRobot, ...oldRobot,
nickname: data.nickname, nickname: data.nickname,
token: token, token,
loading: false, loading: false,
activeOrderId: data.active_order_id ?? null, activeOrderId: data.active_order_id ?? null,
lastOrderId: data.last_order_id ?? null, lastOrderId: data.last_order_id ?? null,

View File

@ -17,7 +17,7 @@ class Garage {
} else { } else {
this.slots = [emptySlot]; this.slots = [emptySlot];
} }
this.setGarage = initialState?.setGarage || (() => {}); this.setGarage = initialState?.setGarage ?? (() => {});
} }
slots: Slot[] = [emptySlot]; slots: Slot[] = [emptySlot];

View File

@ -19,7 +19,7 @@ export interface Info {
taker_fee: number; taker_fee: number;
bond_size: number; bond_size: number;
current_swap_fee_rate: number; current_swap_fee_rate: number;
network: 'mainnet' | 'testnet' | undefined; network: 'mainnet' | 'testnet';
coordinatorVersion: string; coordinatorVersion: string;
clientVersion: string; clientVersion: string;
openUpdateClient: boolean; openUpdateClient: boolean;

View File

@ -14,8 +14,8 @@ class SystemNativeClient implements SystemClient {
public loading = true; public loading = true;
public copyToClipboard: (value: string) => void = (value) => { public copyToClipboard: (value: string) => void = async (value) => {
return window.NativeRobosats?.postMessage({ return await window.NativeRobosats?.postMessage({
category: 'system', category: 'system',
type: 'copyToClipboardString', type: 'copyToClipboardString',
detail: value, detail: value,