* fix: make asset dialog use asset id rather than symbol
* fix: tests that relied on asset symbol rather than id
* chore: add missing asset id to mocks
* chore: add asset id to mocks for e2e tests
* chore: add missing asset id for orders mock
* chore: fix console-lite build
* chore: add missing asset ids to mocks
* feat: update validation for size and price so they are reported simultaneously
* feat: adjust styles so error messages for price/size are rendered on one line
* fix: missing key in map error
* feat: split validation out on a field by field basis
* refactor: remove unnecessary price setting and just use props to calc market price
* refactor: rename setOrder func and add a comment
* chore: add type for form fields to allow for summary field
* fix: layout of market order size and price
* fix: casing of size/price in validation message
* refactor: fix type errors for summary react nodes and for tif and type validation
* feat: break out functions for testing market.state and market.tradingmode on submit
* fix: deal ticket test for last price value
* chore: remove unused files and move hooks and utils to correct dirs
* chore: tidy up constants
* fix: const before enum invalid syntax
* feat: dont block submission if not enough margin but do if zero balance
* chore: remove duplicated margin warning message
* feat: dont allow margin warning and error message to render at the same time
* feat: make trading mode check just a warning rather than error message
* test: make markets active so they are tradable, renaming describe blocks for clarity
* test: adjust test ids and disabled state and fix tests
* test: include AC codes in tests
* chore: remove click of in test as form is already dirty
* fix: lint errors, only show margin warning if you have balance
* chore: add ts ignore
* chore: re add use-order-validation hook for console-lite specifically
* chore: update use-order-validation test after consumed margin check hook changed
* fix: circular deps issue in console-lite
* chore: update use order validation hook to use Schema rather than direct import
* feat: update connect dialog to handle api v2
* feat: better error handling
* feat: update to only use strings for pubkey, add json rpc connector
* feat: make json connector follow same patterns as rest connector
* feat: add ability to change wallet location
* feat: add chain id fetch
* feat: improve types
* feat: adjust send tx types
* chore: remove dialog title and chain check temporarily
* feat: additional UI and error handling
* feat: rename keypair and keypairs to pubKey and pubKeys
* feat: make rest and json rpc connectors return consistent data
* feat: rename derived ids more clearly
* feat: update send_transaction response type
* chore: fix tests after context name change
* feat: add utils for wallet, add encode tx func
* feat: return null if tx is rejected
* feat: fix up styles for connect buttons
* feat: handle wallet version check
* feat: add chain id check
* chore: rename select pub key function to match, fix tests
* fix: tests for rest connector form
* feat: add tests for json rpc flow
* feat: connect dialog changes
* chore: change status to enum to avoid magic strings
* feat: add custom icons and handle provided key name
* chore: update global wallet connection e2d tests
* chore: change zod validation to only expected required values
* chore: ignore new generated code files
* chore: fix typos and add translations
* chore: set hosted wallet via env var and only show if not mainnet
* feat: add functionality for try again button
* test: fix failing tests
* chore: fix lint and test
* chore: remove double import
* chore: make console-lite-e2e strict so json connector compiles correctly
* chore: make token e2e tsconfig strict
* chore: make stats-e2e tsconfig strict
* feat: update json rpc request namespace
* feat: simplify connector setup, support try again
* chore: remove comment
* fix: build errors
* chore: make chainId check optional based on presence of appChainId, mock request for tests
* chore: mock chain id request for all apps on all pages
* fix: footer border on small screens
* fix: use beforeEach for chainId query mock
* chore: remove optional chain check, prevent rendering until fetch is complete
* chore: update NX_VEGA_WALLET_URLs as the application now appends the base path, adjust token tests
* fix: token e2e test that checks for pubkey name
* chore: remove duplicated test, update wallet title assertion
* fix: token tests
* fix: token e2e assertions
* fix: withdraw test
* feat: enable json RPC for token
* fix: sendTx command now accpets pubkey as separate arg
* fix: test to use gui option temporarily
Co-authored-by: Dexter <dexter.edwards93@gmail.com>
* feat: added asset details dialog to market select (1226)
* Update libs/ui-toolkit/src/components/dialog/dialog.tsx
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* removed focus complexity from popover, refactored
* chore: after rebase fixes
* fix: fixed console-lite asset details dialog func - after rebase
* fix: added mock for one failing test, removed console.log
* fix: removed increased timeout - not needed
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* feat: add new generator with config
* feat: split off gql queries to separate files for the new generator
* fix: delete dummy schema
* feat: add generated queries with new codegen
* fix: regenerate from scratch and remove duplicates
* fix: libs and app gen folders
* fix: remove more duplicate queries
* fix: add generated files to be ignored by the formatter
* fix: format
* feat: migrate assets to use new code generator
* fix: generated imports
* fix: lint
* fix: accounts export
* fix: more imports
* fix: add type alias for new type system and regenerate
* fix: format
* fix: export
* fix: format
* fix: delete leftover file from merge
* chore: migrate candles-chart lib
* fix: remove redundant asset files
* chore: migrate accounts
* chore: update glob
* chore: add cleanup to fix-imports to support type migrations for now
* fix: imports
* fix: update market types
* fix: type import paths
* fix: format
* fix: import
* fix: types in e2e tests
* fix: format
* fix: lint
* feat: add new generator with config
* feat: split off gql queries to separate files for the new generator
* fix: delete dummy schema
* feat: add generated queries with new codegen
* fix: regenerate from scratch and remove duplicates
* fix: libs and app gen folders
* fix: remove more duplicate queries
* fix: add generated files to be ignored by the formatter
* fix: format
* fix: generated imports
* fix: lint
* fix: accounts export
* fix: more imports
* fix: add type alias for new type system and regenerate
* fix: format
* fix: delete leftover file from merge
* feat: add deposits table to deposits tab on portfolio page
* feat: refactor use-withdraw hook to not invoke eth tx
* feat: rename hook for clarity
* feat: fix withdrawal creation test
* feat: update withdraw-manager and withrawals-table tests
* chore: fix lint
* feat: remove web3 input to avoid double dialog
* chore: use renderHook from testing-library/react
* chore: update to use non deprecated fields
* chore: remove usage of all bridge contract
* feat: correctly merge cache update in withdrawals table
* feat: changes to support token app withdrawals
* chore: add height to ag grid table wrapping element
* feat: add txhash col to withdraw table
* feat: provide better ui if withdrawal is not ready to be completed
* feat: use separate dialogs for txs
* feat: allow user to immediately complete withdrawal if delay not triggered
* feat: add withdraw store to tidy up state management
* chore: fix tests
* chore: convert callback to promises, fix tests, delete withdraw page
* chore: fix lint errors
* fix: withdrawals link in nav
* feat: style changes after design update
* fix: proposal form test
* chore: tidy error ui logic
* feat: review comments
* chore: lint
* feat: add better typing for tables
* chore: put withdrawals tab at the end
* chore: update i18n
* fix: dialog in positions manager due to rename
* chore: increase spacing in withdrawal form
* chore: update tests
* chore: lint
* chore: use new assetsConnection and update cy test
* fix: incorrect shape of withdrawal generate function
* feat: delete withdrawals page now that its shown on the portfolio page
* chore: update tests to check for withdrawals page
* chore: fix tests again
* fix: page title test
* feat: create new buttons
* feat: update anchor and button link styles
* feat: add icon support
* feat: fix full width with icon
* feat: convert invalid button props to use new props
* feat: tidy up explorer
* feat: more tidy up for token and trading
* feat: move styles to css file using @apply
* chore: remove css with @apply as its not working in apps
* fix: deposit form button
* feat: use default tailwind config, start on forms
* feat: fixup trade grid styles
* feat: form styles
* feat: styles for order book and tables
* feat: make key management use dropdown
* feat: update various components
* feat: tidy up wallet section
* feat: token tidy up
* feat: token governance styles
* Feat/927: Dialog styling
* feat: token styles
* feat: add font familys
* feat: change token borders to be softer
* feat: console-lite changes to support new theme
* Feat/927: Centered key-value-table.tsx spacing
* Feat/927: Tweak to Explorer site border colours to be inline with trading
* Feat/927: Tweak to Explorer header
* Feat/927: Theme switcher icon colours
* Feat/927: Fix for Explorer block data styling
* feat: fix tests, add status footer and change logos
* feat: render both theme icons to avoid hydration error
* chore: run migrations for project
* fix: tailwindconfig build to work with new next version
* feat: use document page for next as per documentation
* chore: update build targets to use development mode when serving
* fix: console-lite default text colors
* chore: fix tooltip text break, change submit button
* feat: adjust console-lite styles to work with tabs
* feat: add bespoke dialog for console-lite market-selector
* Feat/927: Theme switcher now has prop for fixed bg colour
* Feat/927: Font size and border radius tweak for toggles
* Feat/927: Cleaned up trade-grid.tsx spacing
* feat: responsive styles for market header and nav
* feat: update designs for market popover
* fix: nav active state
* chore: allow classname to be passed to button
* Feat/927: Fix Token width on desktop (was overflowing)
* Feat/927: Fix token header h1 from wrapping
* Feat/927: Tweak for claim-flow.tsx
* fix: connect button test
* Feat/927: Proposals list styling polish
* Feat/927: key-value-table.tsx spacing tweak
* feat: add copy button to kp dropdown
* Feat/927: Removing old theme params and uses
* Feat/927: Removing old theme params and uses, documenting the now used otb sizes
* feat: use key val table in asset dialog
* feat: align tooltip styles
* fix: orderbook grid alignment
* chore: linting
* fix: dialog sizing in medium mode, node switcher styles
* chore: remove unused color classes
* feat: update radio and checkbox designs
* feat: updates to storybook
* feat: update design system stories
* chore: stories update
* chore: rename resize panels and tidy
* feat: fix checkbox tick
* fix: add poyfills for jest in trading test setup
* chore: fix checkbox tests
* chore: fix tests
* chore: fix tests again
* chore: revert token wallet name test
* fix: tooltip tests on console-lite
* fix: wallet dropdown test
Co-authored-by: sam-keen <samuel.kleinmann@gmail.com>
* feat: show asset details (627)
* feat: show asset details (627)
fixed tests
* feat: show asset details (627)
pr suggestions
* feat: show asset details (627)
var name convention
* feat: show asset details (627)
merge confict, keys
* feat: show asset details (627)
Introduced zustand store for asset details dialog.
* feat: show asset details (627)
Made it prettier
* fix: fixed lint error in accounts-table
* Feat/537: Removed old contract and branching logic for collateral bridge
* Feat/537: Renamed all 'new' name instances in functions, files and types. Regenerated types.
* Feat/537: Added 'creation' field to withdraw-dialog.spec.tsx test
* refactor: deposit manager with a zustand store and refetching balances after contracts complete
* refactor: remove assetId query string functionality
* chore: remove unused import
* chore: add a comment with a link to code explanation
* refactor: capture errors from deposit value get functions
* refactor: add error handling for async perform funcs
* feat: add assets to react helpers for types and erc20 check
* feat: make use max only use account balance, add custom max messages
* fix: withdraw threshold limit display
* feat: add callstatic to ethereum transaction hook
* feat: improve types for useTransaction hook
* chore: fix types and remove ts-ignore
* chore: convert all smart contract wrapper methods to match metaclass methods
* fix: this context for calling tx
* chore: fix comment and any type
* chore: typo
Co-authored-by: Edd <edd@vega.xyz>
Co-authored-by: Edd <edd@vega.xyz>
* chore: fix remaning text for large number
* feat: make use max only use account balance, add custom max messages
* fix: withdraw threshold limit display
* fix: assertions in deposit withdrawy e2e tests
* feat: add disconnect feature form ethereum wallet
* fix: unit tests
* fix: format
* fix: format
* fix: e2e withdrawal check
* fix: format again
* fix: eth address in e2e
* fix: env var for eth address
* chore: make sure etherscan links open in new tab
* fix: format withdrawal amount correctly in table
* fix: switch to use next Link element so page state not lost
* fix: calc deposit max validation using ethereum storage at
* fix: remaining amount in deposits and refetch allowance
* fix: page background in dark mode
* chore: disable autocomplete for ethaddress
* fix: bump ag grid row size so underline is shown on FF
* fix: expect correctly formatted withdrawal amount
* fix: missing react keys in maps
* fix: complete button text in test
* fix: use sentry/react, fix webpack config path
* feat: handle withdrawal limits
* feat: add withdraw limit ui to withdraw form
* chore: lint error
* fix: mock network param query for e2e tests
* fix: wrong translation in tests
* fix: withdrawals test and revert change in text for trade grid elements
* fix: add check for signature length before progressing withdraw
* chore(ui-toolkit): add aria label to icon for a11y (#621)
* chore(ui-toolkit): add labels for form-groups for a11y (#621)
* fix(ui-toolkit): fix form inputs storybook for a11y (#621)
* feat(ui-toolkit): add strict eslint a11y and components config (#621)
* chore(ui-toolkit): add translate t to form labels
* feat: add new bridge contract logic
* chore: remove unused contract from provider
* chore: remove minimum as no longer exists
* feat: use new withdrawals contract, but allow for old contract for token
* feat: power contracts selection by a flag
* style: lint
* Update libs/smart-contracts/src/contracts/collateral-bridge-new.ts
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* chore: rename env var as per feedback
* chore: consistent varaible names as per PR comments
* chore: add back in checks for minimum as per PR comments
* style: formatting
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* feat: unhardcode contract addresses
* fix: linting and tests
* feat: switch contract usage in token app to use unhardcoded addresses
* chore: remove other usage of hard coded contract addresses
* feat: convert contracts to classes, update claim contract to fix circular dependency
* feat: add hard coded contract addresses to contracts page
* fix: misc tidy up
* chore: rename ethers big num conversion func
* fix: remove pending transactions modal
* chore: add single toBigNum function that can accept number string or EthersBignNumber
* chore: delete unused tranche helpers and decimals functions from smart contracts lib
* feat: add faucetable token class
* fix: reset tx state after early exit from approve tx
* feat: re add transaction modal using zustand store
* fix: loader colors for eth wallet
* fix: pass ethereum config to gurantee existence before tx execution
* chore: lint smart contracts lib
* chore: fix web3container to use children and not render prop
* chore: lint
* fix: use background to mock ethereum wallet to avoid mocking globally for every test
* chore: move web3 mock to common steps and call from withdrawals feature tests
* feat: add enviromnemt provider to the ui-toolkit
* chore: replace etherscan links
* chore: wrap trading app into environment provider
* chore: move env provider to react-helpers and wrap every app
* chore: remove more env variables from libs and replace them with the env hook
* fix: lint
* fix: update readme with correct formatting command
* fix: warnings for web3 hook
* fix: wrap warning in conditional, print message only when env keys are missing
* fix: incorrect condition on deposit manager fauceting param
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* fix: cleanup token app ethereum config
* chore: add better error handling to the useEnvironment hook
* fix: lint
* fix: formatting
* fix: more lint
* fix: throw error if required env variables are missing
* fix: remove default eth chain id
* fix: add back etherscan testid to withdrawals links
* fix: imports
* fix: try using babel jest for smart contracts test transpilation
* fix: uniform ts syntax
* chore: set resolveJsonModule in base tsconfig
* fix: add missing data-ids for etherscan links
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* 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
* 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 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>