Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(synapse-interface): destination address (#2137)
* Init * Basic Address Input * Detect if input is valid address * Click on Input to trigger warning * DestinationInputWarning to handle accept/reject warning * Hide placeholder when input is active * Input display when input address valid * Input width * DestinationInputWarning state * Warning accept/reject callback * DestinationInputWarning to take up entire output container * Style Warning * Focus on Input after accepting warning terms * showDestinationWarning state in bridge display to track if user already accepted warning for session * Input border red signalling invalid input when activated * Improve isEmptyString * SwitchButton takes priority over OutputContainer in visual layer * Clear Input button * Style and format clear button for smooth input clearing * Style Close Button * Clean * filterTransactionsByRecipient * Calculate days ago a recipient tx was executed * filterNewestTxByRecipient * Display list of recipient addresses when input is focused * Style Receipient dropdown list * Destination address settable from dropdown list * Close dropdown after selecting new destination address from list * Disable Input if wallet unconnected * Hover text on Input * Input html states, styling * Remove previous dest address settings state + component * Optimize OutputContianer address prop passed into DestinationAddressInput, remove previous component * Clean Bridge imports * Style Input * Replace useSelector with hook * clearDestinationAddress on Bridge Page load * Clean up Bridge reducer to not require actions file for better imports * Rm file * Maintain inputted destination address after bridge tx executes * Clear destination address by setting to null, clear input * Fix errors in BridgeTransactionButton * User inputted empty string throws error in input * Clean * Update text error state * Clean callbacks to make clear input flow clearer * Clean * Fix console errors * Clean * Add hover on warning buttnos * . * Refactor; clean functions * Use destination address as key * Style address dropdown * Rm log * Clean * Keep inputRef local * Add To * Dynamically set Input width * Adjust spacing for filled input * Dynamic input width including placeholder * Increase input width when focused * Remove shift when x button appears * Max width for input to fit on mobile * Clean * Basic Confirm Warning * Connect ConfirmWarning to store * Allow Warning text to be clickable * Style: BridgeTransactionButton Warning * Add setIsDestinationWarningAccepted to state to track status * Show Confirm warning button when warning not yet accepted + tracked in state * Conditions for showing Destination Address in Bridge Receipt * Remove prior destination warning popup * BridgeWarnings * Conditions to show Warning * Conditions to hide Destination Address Input * Simplify * Update button color for Confirm destination address * Use default text size for dropdown * Ensure blur from input on handleInputBlur * Ensure blur from input on handleInputBlur * .. * Add paste functionality * Conditions to show paste button * Add key press up/down direction for navigating list * Add pressing enter key functionality to select Address from list * Reset list idx onClose * Clean * Prevent input blur when mouseDown on ListReceipient item * Blur after selecting address from list * Update input ref to useRef * Fix merge imports * Make input smaller * Unconnected input padding * Remove shift when input is valid address * Add back SettingsSlideOver * Add back settings toggled page * Show destination address input when toggled on from Settings * Clean SettingsSlideOver * Clean * Remove Pink highlight on Input * Increase spacing between address and days ago * Increase width of input, limit for mobile * Remove yellow text in Warning * Only show Destination Address in Receipt if valid * Clear input if invalid and exists * Adjust dropdown spacing * Minor adjustments * Blur input after clearing * Enter button can submit input text for validation * Paste icon sizing * Show dest address for unconnected user if inputted * Hide destination address input on page load between page switch * Hide Bridge Warning if destination address is turned off * Ensure bridge listener clears destination address if destination input setting turned off * Remove unused code * Fix enter bug when wallet disconnected * Update dispatch value * Update to proper action to dispatch * Add back segment given we are using settings * Lint * Remove side effect to clear dest address * Origin token copy --------- Co-authored-by: abtestingalpha <abtestingalpha@gmail.com>
- Loading branch information