Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F12428749
D10665.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D10665.diff
View Options
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
Details
Attached
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)
Attached To
D10665: [Cashtab] Clear amount & address fields on send
Event Timeline
Log In to Comment