Skip to content

Commit a8bfd48

Browse files
authored
Merge pull request #408 from El-Chapo-Npm/fix/issues-208-209-210-213
fix: resolve issues #208, #209, #210, #213
2 parents a5f3bc2 + ab0c578 commit a8bfd48

2 files changed

Lines changed: 6 additions & 19 deletions

File tree

backend/src/services/stellar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export async function createAccount() {
105105

106106
await eventMonitor.publishEvent(publicKey, {
107107
type: 'AccountCreated',
108-
data: { publicKey, secretKey: pair.secret() },
108+
data: { publicKey },
109109
version: 1
110110
});
111111

frontend/src/App.jsx

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,17 @@ function withTimeout(promiseFn) {
4545
}
4646

4747
function 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

Comments
 (0)