diff --git a/frontend/src/components/MakerForm/AutocompletePayments.tsx b/frontend/src/components/MakerForm/AutocompletePayments.tsx index 9bba349f..7d7d829e 100644 --- a/frontend/src/components/MakerForm/AutocompletePayments.tsx +++ b/frontend/src/components/MakerForm/AutocompletePayments.tsx @@ -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; diff --git a/frontend/src/contexts/AppContext.tsx b/frontend/src/contexts/AppContext.tsx index 5cad378f..64b95851 100644 --- a/frontend/src/contexts/AppContext.tsx +++ b/frontend/src/contexts/AppContext.tsx @@ -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, diff --git a/frontend/src/models/Garage.model.ts b/frontend/src/models/Garage.model.ts index c9af8480..89d03d95 100644 --- a/frontend/src/models/Garage.model.ts +++ b/frontend/src/models/Garage.model.ts @@ -17,7 +17,7 @@ class Garage { } else { this.slots = [emptySlot]; } - this.setGarage = initialState?.setGarage || (() => {}); + this.setGarage = initialState?.setGarage ?? (() => {}); } slots: Slot[] = [emptySlot]; diff --git a/frontend/src/models/Info.model.ts b/frontend/src/models/Info.model.ts index c74b6f17..60e19077 100644 --- a/frontend/src/models/Info.model.ts +++ b/frontend/src/models/Info.model.ts @@ -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; diff --git a/frontend/src/services/System/SystemNativeClient/index.ts b/frontend/src/services/System/SystemNativeClient/index.ts index 3206696e..03999cfb 100644 --- a/frontend/src/services/System/SystemNativeClient/index.ts +++ b/frontend/src/services/System/SystemNativeClient/index.ts @@ -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,