@@ -45,27 +45,17 @@ function withTimeout(promiseFn) {
4545}
4646
4747function App ( ) {
48- const [ account , setAccount ] = useState ( null ) ;
49- const [ balance , setBalance ] = useState ( null ) ;
50- const [ recipient , setRecipient ] = useState ( '' ) ;
51- const [ amount , setAmount ] = useState ( '' ) ;
52-
53- const [ loading , setLoading ] = useState ( '' ) ;
54- const [ memo , setMemo ] = useState ( '' ) ;
55- const [ showQR , setShowQR ] = useState ( false ) ;
56- const [ showShortcuts , setShowShortcuts ] = useState ( false ) ;
57- const [ showImportForm , setShowImportForm ] = useState ( false ) ;
58- const [ confirmClear , setConfirmClear ] = useState ( false ) ;
59- const { account, balance, loading, recipient, amount, showQR, showImportForm, showShortcuts, accountLabel } = useAppState ( ) ;
60- const { account, balance, loading, recipient, amount, memo, memoType, showQR, showImportForm, showShortcuts } = useAppState ( ) ;
61- const [ showConfirm , setShowConfirm ] = useState ( false ) ;
62- const [ showScanner , setShowScanner ] = useState ( false ) ;
48+ const { account, balance, loading, recipient, amount, memo, memoType, showQR, showImportForm, showShortcuts, accountLabel } = useAppState ( ) ;
6349 const dispatch = useAppDispatch ( ) ;
6450
6551 // Local state not in store
52+ const [ showConfirm , setShowConfirm ] = useState ( false ) ;
53+ const [ showScanner , setShowScanner ] = useState ( false ) ;
6654 const [ confirmClear , setConfirmClear ] = useState ( false ) ;
6755 const [ replaySecret , setReplaySecret ] = useState ( '' ) ;
6856 const [ showReplayPrompt , setShowReplayPrompt ] = useState ( false ) ;
57+ const [ editingLabel , setEditingLabel ] = useState ( false ) ;
58+ const [ labelDraft , setLabelDraft ] = useState ( '' ) ;
6959 const [ showCelebration , setShowCelebration ] = useState ( false ) ;
7060
7161 const msg = useMessages ( ) ;
@@ -203,7 +193,6 @@ function App() {
203193 const createAccount = async ( ) => {
204194 dispatch ( { type : A . SET_LOADING , payload : 'create' } ) ;
205195 try {
206- const { data } = await withTimeout ( axios . post ( '/api/stellar/account/create' ) ) ;
207196 const { data } = await withTimeout ( signal => axios . post ( '/api/stellar/account/create' , null , { signal } ) ) ;
208197 dispatch ( { type : A . SET_ACCOUNT , payload : data } ) ;
209198 dispatch ( { type : A . SET_LABEL , payload : '' } ) ;
@@ -269,9 +258,7 @@ function App() {
269258
270259 try {
271260 const { data } = await withTimeout ( signal => axios . post ( '/api/stellar/payment/send' , payload , { signal } ) ) ;
272- const { data } = await withTimeout ( axios . post ( '/api/stellar/payment/send' , payload ) ) ;
273261 msg . success ( `Payment sent! Hash: ${ data . hash . slice ( 0 , 8 ) } …` , { hash : data . hash } ) ;
274- msg . success ( `Payment sent! Hash: ${ data . hash } ` ) ;
275262 resetForm ( ) ;
276263 checkBalance ( ) ;
277264 } catch ( error ) {
0 commit comments