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')(
({ theme, sx }) => `
width: ${sx ? sx.width : '15.6em'};
width: ${sx != null ? sx.width : '15.6em'};
margin: 2px 0 0;
padding: 0;
position: absolute;

View File

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

View File

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

View File

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

View File

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