Skip to content

Commit

Permalink
Merge branch '524-the-paste-button-on-the-address-form-input-is-not-f…
Browse files Browse the repository at this point in the history
…unctioning-correctly-as-it-bypasses-the' into 'dev'

Fix : Improve functionality of paste button in target field and test

Closes #524

See merge request ergo/rosen-bridge/ui!441
  • Loading branch information
vorujack committed Jan 27, 2025
2 parents e50b5b0 + 98026b9 commit f81b109
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/itchy-beans-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rosen-bridge/rosen-app': patch
---

Enhance the paste button functionality for the Target Address field by implementing validation for pasted addresses.
5 changes: 4 additions & 1 deletion apps/rosen/app/(bridge)/BridgeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ export const BridgeForm = () => {
try {
const clipboardText =
await navigator.clipboard.readText();
addressField.onChange(clipboardText);
setValue('walletAddress', clipboardText, {
shouldDirty: true,
shouldTouch: true,
});
} catch (err) {
console.error('Failed to read clipboard: ', err);
}
Expand Down

0 comments on commit f81b109

Please sign in to comment.