@@ -38,7 +38,7 @@ export const WalletProvider = ({ children }: { children: React.ReactNode }) => {
3838 const signTransaction = wallet . signTransaction . bind ( wallet ) ;
3939
4040 // The state is not updated in updateCurrentWalletState() so we need
41- // to create a ref and to keep it up to date with the useEffect
41+ // to create a ref and to keep it up to date with the useEffect.
4242 const stateRef = useRef ( state ) ;
4343 useEffect ( ( ) => {
4444 if ( state . address !== stateRef . current . address ) stateRef . current = state ;
@@ -62,8 +62,7 @@ export const WalletProvider = ({ children }: { children: React.ReactNode }) => {
6262 } else {
6363 if ( popupLock . current ) return ;
6464 // If our storage item is there, then we try to get the user's address &
65- // network from their wallet. Note: `getAddress` MAY open their wallet
66- // extension, depending on which wallet they select!
65+ // network from their wallet.
6766 try {
6867 popupLock . current = true ;
6968 wallet . setWallet ( walletId ) ;
@@ -88,7 +87,7 @@ export const WalletProvider = ({ children }: { children: React.ReactNode }) => {
8887 nullify ( ) ;
8988 // then log the error (instead of throwing) so we have visibility
9089 // into the error while working on Scaffold Stellar but we do not
91- // crash the app process
90+ // crash the app process.
9291 console . error ( e ) ;
9392 } finally {
9493 popupLock . current = false ;
@@ -109,7 +108,6 @@ export const WalletProvider = ({ children }: { children: React.ReactNode }) => {
109108 } else return ;
110109 if ( walletId == "freighter" ) return ;
111110
112- storage . setItem ( "walletAddress" , "" ) ;
113111 wallet
114112 . getAddress ( )
115113 . then ( ( address ) => {
0 commit comments