* Fix: debounce fetch apps
* refactor: fix AddAppForm name and add missing types
* add `use-lodash-debounce` hook to test debounce functionality
I'm planning to remove this dependency, as it requires to also install `lodash.debounce`. I prefer to implement it ad-hoc.
* refactor AddAppForm to use the observable pattern
* memoize `getAppInfoFromUrl` to prevent requesting the same information over and over
* prevent requesting data if url is not valid
* remove logging
* prevent validating form before visiting the fields
* refactor AddAppForm
reorganize code
* fix: change `any` to `unknown`
* fix: `uitls.ts` types and imports
* refactor: rename `isSubmitDisabled` to `onSubmitButtonStatusChange` prop
* refactor: rename `agreement` to `agreementAccepted`
also, moved `initialValues` to a constant `INITIAL_VALUES` outside the component
* refactor: reimplement `useDebounce` hook in-app
* refactor: extract app manifest verification to a helper function
also fixed types
* fix: prevent accessing `contentWindow` if `iframe` is `null`
* fix: `getAppInfoFromOrigin` return type
also, removed the expected type for the `getAppInfoFromOrigin` calls as it is inferred
Co-authored-by: fernandomg <fernando.greco@gmail.com>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
* Remove spaces
* Change naming convention to make clear that only edge whitespaces are removed
Fix function documentation in string util
* Add trim spaces from address input in AddToken and AddAsset
* Use validator type
* Trim spaces on Safe App links
Co-authored-by: Mati Dastugue <mdastugu@amazon.com>
Co-authored-by: Mati Dastugue <matias.dastugue@altoros.com>
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
* type validators
* safeSelector types
* history 5.0.0 breaking changes adaptation
* replace simpleMemoize with memoize from lodash because of typing issues
* add type definitions for history and react-router-dom
* type fixes
* yarn lock update
* fix router state
* more type improvements
* validator tests wip
* add tests for validators, remove duplicated validators
* add error messages to tests
* fix minValue error message for inclusive param
* Replace jsx.element with react.reactelement
* Fix uniqueAddress validator argument type
* remove comment in AddCustomToken validator
* use absolute import for saferecord in safe paage container
* Add `ArrayTypeInput` to support array type values
- also updated types for ContractInteraction/utils
* Update placeholder message
* Support fixed size arrays
- refactored how Field's key is generated due to conflicts with final-form library and `[]` in the name
- also simplified validation for array-like fields, as it messed with arguments of type `T[][2][][3]`