Don't pass empty strings to the API for no reason?

environments/review-feat-zap-p-d365ml/deployments/4680
Alex Gleason 2024-06-04 22:59:20 +00:00
rodzic 6734254630
commit 3b419b1097
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -319,7 +319,7 @@ const zap = (account: AccountEntity, status: StatusEntity | undefined, amount: n
if (status) dispatch(zapRequest(status));
return api(getState).post('/api/v1/ditto/zap', { amount, comment: comment ?? '', account_id: account.id, status_id: status?.id ?? '' }).then(async function(response) {
return api(getState).post('/api/v1/ditto/zap', { amount, comment, account_id: account.id, status_id: status?.id }).then(async function(response) {
const { invoice } = response.data;
if (!invoice) throw Error('Could not generate invoice');
if (!window.webln) return invoice;