Page MenuHomePhabricator

D10665.diff
No OneTemporary

D10665.diff

diff --git a/web/cashtab/src/components/Send/Send.js b/web/cashtab/src/components/Send/Send.js
--- a/web/cashtab/src/components/Send/Send.js
+++ b/web/cashtab/src/components/Send/Send.js
@@ -100,6 +100,7 @@
dirty: true,
value: '',
address: '',
+ opReturnMsg: '',
});
const [queryStringText, setQueryStringText] = useState(null);
const [sendBchAddressError, setSendBchAddressError] = useState(false);
@@ -115,6 +116,15 @@
const [messageSignature, setMessageSignature] = useState('');
const [sigCopySuccess, setSigCopySuccess] = useState('');
+ const clearInputForms = () => {
+ setFormData({
+ dirty: true,
+ value: '',
+ address: '',
+ opReturnMsg: '',
+ });
+ };
+
const showModal = () => {
setIsModalVisible(true);
};
@@ -256,6 +266,7 @@
cleanAddressAndValueArray,
);
sendXecNotification(link);
+ clearInputForms();
} catch (e) {
handleSendXecError(e, isOneToManyXECSend);
}
@@ -326,6 +337,7 @@
bchValue,
);
sendXecNotification(link);
+ clearInputForms();
} catch (e) {
handleSendXecError(e, isOneToManyXECSend);
}
@@ -777,6 +789,7 @@
<TextArea
name="opReturnMsg"
placeholder="(max 160 characters)"
+ value={formData.opReturnMsg}
onChange={e =>
handleOpReturnMsgChange(e)
}
@@ -811,7 +824,11 @@
Send
</PrimaryButton>
) : (
- <PrimaryButton onClick={() => send()}>
+ <PrimaryButton
+ onClick={() => {
+ send();
+ }}
+ >
Send
</PrimaryButton>
)}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 28, 19:33 (7 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4844958
Default Alt Text
D10665.diff (2 KB)

Event Timeline