File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,6 +158,13 @@ export function makeMockWaveEnv(mockEnv?: MockEnv): MockWaveEnv {
158158 const blockMetaKeyAtomCache = new Map < string , Atom < any > > ( ) ;
159159 const connConfigKeyAtomCache = new Map < string , Atom < any > > ( ) ;
160160 const atoms = makeMockGlobalAtoms ( overrides . settings , overrides . atoms , overrides . tabId ) ;
161+ const localHostDisplayNameAtom = atom < string > ( ( get ) => {
162+ const configValue = get ( atoms . settingsAtom ) ?. [ "conn:localhostdisplayname" ] ;
163+ if ( configValue != null ) {
164+ return configValue ;
165+ }
166+ return "user@localhost" ;
167+ } ) ;
161168 const env = {
162169 mockEnv : overrides ,
163170 electron : {
@@ -184,13 +191,7 @@ export function makeMockWaveEnv(mockEnv?: MockEnv): MockWaveEnv {
184191 console . log ( "[mock showContextMenu]" , menu , e ) ;
185192 } ) ,
186193 getLocalHostDisplayNameAtom : ( ) => {
187- return atom < string > ( ( get ) => {
188- const configValue = get ( atoms . settingsAtom ) ?. [ "conn:localhostdisplayname" ] ;
189- if ( configValue != null ) {
190- return configValue ;
191- }
192- return "user@localhost" ;
193- } ) ;
194+ return localHostDisplayNameAtom ;
194195 } ,
195196 getConnStatusAtom : ( conn : string ) => {
196197 if ( ! connStatusAtomCache . has ( conn ) ) {
You can’t perform that action at this time.
0 commit comments