diff --git a/src/App.js b/src/App.js index 6112b05..a8abbbb 100644 --- a/src/App.js +++ b/src/App.js @@ -40,7 +40,8 @@ class App extends React.Component { hideSpinner: false, menuState: 0, queryParamExists: false, - serverUrl + serverUrl, + servers: [] } this.cnt = 0 @@ -54,6 +55,10 @@ class App extends React.Component { await this.asyncLoad.loadWalletLib() + this.addToModal('Getting alternative servers') + const servers = await this.asyncLoad.getServers() + // console.log('servers: ', servers) + this.addToModal('Initializing wallet') // console.log(`Initializing wallet with back end server ${serverUrl}`) // console.log(`queryParamExists: ${queryParamExists}`) @@ -64,7 +69,8 @@ class App extends React.Component { wallet, walletInitialized: true, serverUrl, - queryParamExists + queryParamExists, + servers }) } catch (err) { this.modalBody = [ @@ -84,6 +90,12 @@ class App extends React.Component { // console.log(`App component menuState: ${this.state.menuState}`) // console.log(`render() this.state.serverUrl: ${this.state.serverUrl}`) + // This is a macro object that is passed to all child components. It gathers + // all the data and handlers used throughout the app. + const appData = { + servers: this.state.servers // Alternative back end servers + } + return ( <> @@ -92,11 +104,11 @@ class App extends React.Component { { this.state.walletInitialized - ? + ? : } - +