* delete token version of vega wallet serivce
* update use-user-vote to use new wallet service
* remove typo
* add further types for transaction submissions, add assets to withdraw page query
* update api client package to get generated types, adjust render logic of withdrawals page
* fix withdrawals list rendering
* update determine id function to not use nodejs buffer
* update service api client so it accepts new tx types
* remove stray logs and formatting
* make filtering erc20 assets the responsibility of the withdraw/deposit lib and not the app
* remove sha3 dep and use js-sha3 and ethers to determine ids
* use hook for fetching withdrawals form lib, add type policy to ensure withdrawal state is updated correctly
* fix: markets page feature
* remove staking page scss and invalid class for buttons
* remove pending stake and staking form scss
* make eith wallet buttons fill space
* convert app banner and app footer to tailwind
* remove low hanging fruit css
* add spacing back to home page
* fix spacings on various pages
* remove custom text helpers and replace with tailwind
* Loader component scss to tailwind
* Locked progress scss to tailwind
* Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html
* Page template scss to tailwind
* Splash error scss to tailwind
* Splash loader scss to tailwind
* Token-input scss to tailwind
* Stateful button scss to tailwind
* Transaction button scss to tailwind
* Transactions modal scss to tailwind
* Modal scss to tailwind and improved structure
* vega-wallet scss to tailwind
* wallet-card (and child components in other files tweaked) scss to tailwind
* Token details scss to tailwind
* Home scss to tailwind
* current-proposal-state scss to tailwind
* current-proposal-status scss to tailwind
* Tweak of modal scss to tailwind
* vote-buttons scss to tailwind
* vote-details scss to tailwind
* vote-progress scss to tailwind
* tranche-table scss to tailwind
* vesting-table scss to tailwind
* withdrawals scss to tailwind
* removed reliance on colors.scss from styles.scss
* convert tranche item scss
* delete unused colors and fonts scss files
* convert styles.scss to regular css
* Tweak to token e2e tests to account for classname removal
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* Making a start with react-window-infinite-loader for the blocks infinite scrolling
* WIP block explorer infinte scroll
* WIP pairing
* pairing tidying
* Applied refetch url params more cleanly, moved useFetch to react-helpers lib
* Add notice of new blocks created since page load, some cleanup of blocks-infinite-list.tsx component
* Attempting a refresh of the 'new blocks' value in blocks-refetch.tsx
* Correctly updating state based on previous value
* Update libs/react-helpers/src/hooks/use-fetch.ts
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* Update libs/react-helpers/src/hooks/use-fetch.ts
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* Update apps/explorer/src/app/components/blocks/blocks-refetch.tsx
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* Cleanup from convos and PR
* Prettier formatting
* struggling with websocket tests
* struggling with websocket tests
* Progress on websocket tests for blocks-refetch.tsx
* Tests for blocks-refetch
* Tests for blocks-infinite-list
* Scroll test for blocks-infinite-list
* Defined NOOP in blocks-infinite-list.tsx
* Separate web sockets for each test
* Separate web sockets for each test
* Tweaked e2e tests to account for blocks taking longer to load
* fix tests
* Removed nx knowledge of empty simple-trading-app-e2e for now
* mock at use fetch level instead of at fetch level
* fix edge cases and add further tests
* fix failing e2e tests
* rename test
* Update apps/explorer-e2e/src/support/pages/blocks-page.ts
* Update apps/explorer-e2e/src/support/pages/blocks-page.ts
* rename
* test: use explicit wait for rather than times
* style: remove console
* test: correct env file
* Revert "test: correct env file"
This reverts commit d01d3cfa5e.
* think env var is incorrect
* correct env file
* fix flakiness
* add minor wait for test flakiness
* longer timeout
Co-authored-by: Dexter <dexter.edwards93@gmail.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* Initial commit after nx create
* Add .env files
* Add working commit for poc
* Make deal-ticket-manager.tsx accept children as props and export more components to be consumed by external apps
* Add stepper component to simple trading app
* Add basic prototype for simple trading app with stepper component
* Remove unnecessary flags and env variables
* Change simple trading app port
* Refactor deal ticket container to be more dry
* Refactor deal ticket to be more dry
* Refactor app loader, remove tendermint socket and change providers for App.tsx in simple trading app
* Remove example cypress files and change config
* Fix linting issues
* add feature/scenarios for deposits
* add file for auction orders tests
* update feature file for deposits
* update feature tests for deposit
* add feature/scenarios for deposits
* add file for auction orders tests
* update feature file for deposits
* update feature tests for deposit
* add test for wallet not connected
* fix lint warning
* add mock ethereum provider to allow connecting ethereum wallet
* add basic test for required validation errors
* add aria for input errors for a11y and test targeting, expand submit form helper
* use mnemonic for private key generation, update tests to not submit and just assert validation message updates
* add chain id to cypress config
* update scenario
* remove feature file
* lint fix
* Update apps/trading-e2e/cypress.json
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* use mnemonic from github secret, update cypress.json env vars to match
* fix typo in test name and mnemonic env var
* update env variables
* update eth wallet mnemonic env
* Update libs/cypress/src/lib/eip1193-bridge.ts
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* remove unused reference to chainId
* update casing
* chainId reference from cypress.json
* Update apps/trading-e2e/cypress.json
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* Update apps/trading-e2e/src/support/step_definitions/deposits.step.ts
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* ignore a known failing step in the test due to wallet connected having approved status
* update testid
* update tests for deposits
* tidy up comments in custom cypress commands
* add comment about eager connect when running in cypress
* update deposits tests
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* Add additional checks before and after click
* Change back to use cy.contains
* Add assertion before click
* Change assert
* Remove force
* Add click
* Increase timeout
* move colors in ui-toolkit/config
* fixing tests and add stories
* fixing some tests and edit story
* update sparkline story
* rename story templates for sparkline
* use tailwind colors and rename to *.spec.tsx
* use tailwind only
* remove test.tsx
* Update libs/tailwindcss-config/src/theme.js
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* remove gray from tailwind and use black/40 and white/40 for strokeCurrent
Co-authored-by: madalinaraicu <“madalina@raygroup.uk”>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* Converted app.scss
* Made a start converting styles.scss
* commenting out unused colours - test for now
* restoring font-family
* Added correct text colour and height to top level elements
* Eth connect button styling
* Truncated wallet key on staking screen (had been causing overflow)
* Tranches Scss to tailwind
* Withdraw form Scss to tailwind
* Part way done with staking Scss to tailwind
* Removed redundant containerClass prop from epoch-countdown
* Cleanup of colors part 1
* Ran prettier
* Changes from the MR - removed epoch-countdown styles (apart from blueprint, which has moved to styles.scss)
* Changes from mr - removed extra button size classes (to be replaced with a prop later)
* Changes from mr - allow Tailwind's default list styles. Added role="list" for accessibility
* Border-box applied via wildcard again
* MR tweaks
* Removing the eslint warning for using role="list" on unstyled lists
* Correctly naming the jsx-ally plugin in the eslintrc file so that rules were correctly applied
* Removed redundant 'list-none' classes as Tailwind applies this by default for lists
* network parameters table with key value rows and syntax blobs only for json values
* inline row not for syntax
* add unit test for network param table
* add cypress test to verify if values are non-empty
* remove some comments
* rename formatNumber method to addDecimalsFormatNumber and simplify formatNumber
* remove duplicate expect line
* use AsyncRenderer and sort params asc
* refactor and add extra tests to check ordering and loading cases
* format big number params with addDecimals formatNumber
* Update apps/explorer/src/app/routes/network-parameters/network-parameters.tsx
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* capitalize and refactor tests
* missing ; caused formatting to fail
Co-authored-by: madalinaraicu <“madalina@raygroup.uk”>
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* move key-value-table to ui-toolkit and use tailwind
* add key-value-table to storybook
* override border width 1px from the styles of the app, remove td and th from children
* clone muted and numerical props to children elements
* proposal change table remove empty lines
* add Roboto mono to font-mono tailwind config
* remove labels and labelfor
* revert change on token-details-circulating
* export the whole components directory rather than explicitly individual components
* add classNames, add formatNumberPercentage, remove spans, add span in token details circulating
* data-testid=governance-proposal-enactmentDate and use span instead of div
* use custom spacing defined in tailwind & another README.md update for running cypress in watch mode
* update divs to span within the vesting table
* Update README.md
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* borders and text visible on both dark and light themes
* add headingLevel and use dl instead of tables
* update styling for dl inline
* remove added grey from tailwind
* ignore md files
Co-authored-by: madalinaraicu <“madalina@raygroup.uk”>
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* move accounts and positions into own feature, add mock for accounts
* use length for expected number of columns
* combine trading feature tests into single trading-page.feature
* add orders scenario for trading page
* fix typo
* move related test cases for orders together
* Moved syntax highlighter from explorer to ui-toolkit
* Update libs/ui-toolkit/src/components/syntax-highlighter/syntax-highlighter.stories.tsx
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* Added a light theme for syntax highlighter, added the styling for syntax highlighter to our custom classes
* Suboptimal but successful way of ensuring styling is applied to syntax highlighter
* Styling syntax highlighter with scss
* Fix failing test
* Back to applying styling via custom plugin, but with a wrapper on the syntax highlighter ensuring Tailwind doesn't cull the classes
* Preferred class name
* prettier formatting
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
* add withdraw page
* add create page and withdraws lib with basic components
* add create withdrawal functionality, add withdrawal dialog
* re arrange pages so we have a pending page with a list of withdrawals and a withdraw page with the form
* handle withdrawal completion
* add withdraw dialog so withdraw is completed in one flow
* rename and arrange prop getter function to avoid use of any
* tidy up and make eth transaction and vega transaction hooks follow similar patterns
* make complete withdraw hook fetch approval, combine hooks for full flow
* delete unused file
* add accounts to query to get use max withdraw button
* use ag grid fro withdrawals list
* format amount in grid
* ensure party has id field for cache
* update to use t i18n function
* change complete status to better match values of WithdrawalStatus
* add asset lib file for type guard
* share queries for withdraws lib
* move web3 related hooks to the web3 lib and make web3 lib buildable
* add unit test for use-complete-withdraw
* add test for use-withdraw
* add e2e scenarios for withdrawals
* don render custom no withdrawals message and use ag grid prop
* make withdraw form take ethereum account as prop
* add test config, update withdraw form to handle min/max amounts, add unit test for withdraw form
* fix rendering 0 if not pending withdrawals
* use controlled component for select box
* tidy up async parts of tests, add test for withdraw-manager
* update withdraw dialog to use map for different tx states
* add fallback etherscan link, add test for withdraw-dialog.spec.tsx
* rename erc20 query in token app, change page structure to /withdraw and /withdrawals
* change linked vegawallet-service-api-client to newly published version
* ignore not implemented withdrawals e2e tests
* make vega tx pending and requested states the same, for now, until tx confirmation work is done
* Add some unit tests for determine-ids and remove0x
Neither are critical, but both are libs expected to be shared between
projects so some unit tests will hopefully ensure projects all have the
same expectations about how the functions act.
- Add 1 determine-ids test
- Add a few remove-0x tests
- Update determine-ids to use remove-0x
- Add a comment describing why i18n is what it is
* modify cache with client only field for tracking foreign chain progress
* move withdrawals-list to lib, add useWithdrawals hook
* add container component for withdrawals page
* add unit tests for withdrawals-table
* add some tests for use-withdrawals hook
* revert changes to generated files in other libs and apps
* update withdrawals scenarios
* resolve pr comments
* update page containers to use render prop rather than children
* delete unused files
* remove transaction dialog story
Co-authored-by: Ditmir-Vega <ditmir@vega.xyz>
Co-authored-by: Edd <edd@vega.xyz>
* frontend-monorepo-267 Reduce total staked to 2 decimal precision
* Tweak to formatNumber to allow fixed decimal specificity
* Setting default value for the 'defaultPrecision' argument in the function signature of 'addDecimal'
* change to setting envars rather than passing in via CLI
* update nx to latest patch version
* add env files for token-e2e, fix lint and ts errors
* move generate functions to mocs for trading e2e to avoid violating boundary rules
* add jsx compiler option for trading-e2e
* downgrade nextjs
* add testing-library to types declaration where required
* moved TFE into monorepo with some remaining errors
* moved TFE into monorepo with some remaining errors - further files
* add tailwind config, use etherscan link from toolkit, use web3 from lib
* make app compatible with react router 6
* remove vega keys from app state and use from state from lib
* comment out crowdin script injection
* convert all buttons to use ui toolkit buttons
* remove blueprint inputs and selects and replace with ui-toolkit
* remove css resets
* tidy button styles in wallet replace splash-screen with version from ui-toolkit
* various style fixes
* tidy up proposal list
* add valid key to route children
* Set custom port and config for token e2e tests
* added env title e2e test
* started some styling fixes - nav and home route
* Added 'h-auto' to button height regex check
* Added 'h-auto' to regex check to allow desired TFE button height
* Removed scss and used tailwind for heading component
* Woff files not woof :)
* Proper nav h1 font size
* Wallet card headings
* Vega wallet button styles
* Set project to use static hosted alpha font (cors being fixed separately)
* Eth wallet button styles (unfinished)
* Home route styles
* Staking route styles and title calculation
* Rewards route styles
* Vega wallet container button style
* Eth wallet disconnect button
* Connect dialog title colour and spacing
* Splash screen layout
* Fixed a bunch of linting errors
* Used 'Object.entries' instead of 'Array.from' to create iterable from object in 'use-search-params'
* Removed use of 'any' from 'use-search-params'
* Better simplification of 'use-search-params'
* Removed package.json duplication errors, set most up-to-date version from duplicate options
* Elvis for possible undefined in 'use-add-asset-to-wallet'
* Removed redundant files
* Removed old todo
* Removed package.json redundant packages
* Added dark class for dialog h1 text colour (required as the current scss gives a wrong default for this element)
* update useAddAsset to use new provider
* Ensure Jest has required methods
* tidy up package.json
* remove ts-ignores and use casts for dynamic grid imports
* remove unused code from token-e2e
* update to latest types from react 17
* Removed vegag wallet not running component as it should be handled by wallet lib
* fix typing of contract addresses
* type cast network string to Network enum in reduce
* remove comment, issue 270 created instead
* default associated wallet amounts to zero
* update comment
* delete unused staking-overview component, add note about withTranslation types to comment
* re add proposal dates
* enable source maps for build
* add rest of env files for networks
* remove crowdin script tags from index.html
* add testing-library/jest-dom to types in test tsconfig
* setup i18n for tests so that translations are used, proposal change table test
* delete unused translation files and config
* set sentry release to use commit ref
* delete dex liquidity pages
* remove unused useVegaLPStaking hook
* use found id so no non null assertion needed
* remove mocked graphql provider
* remove commented out breadcrumb component
* add comment and link to issue for syntax highlighter changes
* fix any types in token-input, add link to ui-toolkit input changes
* dont default allowance to zero as it affects rendering logic
* fix spacing between callouts on associate page
* adjust spacing between callout for association callout
* fix alignment of ethereum splash screen
* use ethereum connect dialog state for connect dialog
* add infura provider as default
* change from infura provider to JsonRpcProvider
* remove unused Ethereum config
* add custom webpack config to inject sentry plugin
* delete commented out code for pending stake
* add comment linking input elements issue for eth-address-input
* move useEagerConnect to libs/wallet, add logic for connecting state so token app can load after connection has succeeded or failed
* remove unused storage files, update web3 connector to render children if not actively connected
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* Toggle button built ui-toolkit
* Rewrote controlled toggle button story without args
* Fixed ts args issue using ComponentStory element
* Wrapped controlled version of buttons in a form for Storybook to stop light and dark theme scope collisions
* More toggle tests
* Update libs/ui-toolkit/src/components/toggle/toggle.stories.tsx
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* Displays checked state as text for controlled toggles in storybook
* Used classnames helper
* Added toggle to deal ticket
* Simplified the toggles array type to allow any number of toggles, removing the need for a cast
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>