* chore: [#471] update @vegaprotocol/vegawallet-service-api-client to 0.4.12
* fix: [#471] set up storybook in order-list lib and add tailwind
* fix: [#471] organize order list components
* chore: [471] pull theme switcher changes
* feat: [#471] add cancel order button
* feat: [#471] initial impl of use order cancel hook
* fix: [#471] fix format of the price in order list
* fix: #471 fix static assets issue when merging
* fix: #471 refactor order dialog to vega tx dialog
* fix: #471 move use cancel order hook in wallet lib
* fix: [#471] cancel order dialog and hook refactor
* fix: [#471] remove commented code from storybook preview and fix test
* fix: [#471] update order-list.tsx
* fix: [#471] fix update subscription - show order is cancelled
* fix: [#471] fix eslint error
* chore: [#471] refactoring and add tests for dialogs and cancel hook
* fix: #471 add ref to order list table
* fix: #471 add field for cancel fix test
* fix: #471 rename vega-order-transaction-dialog, error handiling, open dialog on finalized order
* fix: #471 sendTx body mandatory
* fix: #471 use BusEventType.Order to check the typename
* fix: #471 revert using BusEventType.Order to check the typename
* Update libs/wallet/src/order-hooks/use-order-cancel.tsx
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* fix: #471 fix order-list refactoring and fixes
* fix: #471 generate orders added as a mock in order-list
* fix: #471 reset transaction after order updated
* fix: #471 remove unused import useEffect
* fix: #471 generate mock orders
* fix: #471 revert generate mock orders
* fix: #471 order list price set to display all decimals
* fix: #471 generate orders updates
* fix: #471 remove unused import
* fix: #471 remove __typename from mock orders genOrder
* Update libs/wallet/src/order-hooks/order-event-query.ts
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* fix: #471 update order event sub and pull master changes
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* feat: 447 Refactored 'progress' intent to be 'prompt' as now white. Added yellow 'selected' intent
* feat: 447 Colour consolidation
* feat: 447 Colour consolidation extra renaming
* feat: 447 Fixing specified red colours
* feat: 447 Removed unused darker red
* feat: 447 Documenting additional colours in storybook
* feat: 447 Buttons updated (except 'accent', which will probably get removed when navs built)
* feat: 447 Text inputs updated
* feat:frontend-monorepo-447: Trading nav
* feat:frontend-monorepo-447: Updated toggle button colours
* feat:frontend-monorepo-447: Custom checkboxes
* feat:frontend-monorepo-447: Tweaks to radio buttons
* feat:frontend-monorepo-447: Input dates get dark color scheme in dark mode
* feat:frontend-monorepo-447: Dropdown updates
* feat:frontend-monorepo-447: Icon menu
* feat:frontend-monorepo-447: Focus visual styles moved to focus-visible for radios and toggle
* feat:frontend-monorepo-447: Tweak to focus styles for text input and textarea
* feat:frontend-monorepo-447: Labeled input
* feat:frontend-monorepo-447: Labeled input description red when in error
* feat:frontend-monorepo-447: Tooltip visual update
* feat:frontend-monorepo-447: Added disabled state to checkbox
* feat:frontend-monorepo-447: Custom select with radix
* feat:frontend-monorepo-447: Reverted back to native Select for a11y concerns
* feat:frontend-monorepo-447: Added visual cue for dropdown items when multiple can be selected
* feat:frontend-monorepo-447: Removed shadow from buttons in Explorer where it looked wrong
* feat:frontend-monorepo-447: Added box shadow classes into tailwind theme
* feat:frontend-monorepo-447: Colour primitives documentation updated
* feat:frontend-monorepo-447: Cleaning up box shadow use further
* feat:frontend-monorepo-447: Intents util updated
* feat:frontend-monorepo-447: Dialog component updated
* feat:frontend-monorepo-447: Callout component updated
* feat:frontend-monorepo-447: Adjusted apps to handle toolkit changes
* feat:frontend-monorepo-447: Moved tabs to ui-toolkit and styled
* feat:frontend-monorepo-447: Fixed ui-toolkit tests
* feat:frontend-monorepo-447: Token eth wallet made dark to support new buttons
* feat:frontend-monorepo-447: Ran prettier
* frontend-monorepo-447: Simplified button class functions and exported for use on other elements
* frontend-monorepo-447: Used newly exported button classes on Link elements in eth-wallet
* frontend-monorepo-447: Moved trading nav from ui-toolkit to trading app
* frontend-monorepo-447: Simplified intents and updated stories
* frontend-monorepo-447: Using classnames in requested spot
* frontend-monorepo-447: Removed unnecessary 'asChild' prop on dropdown triggers
* frontend-monorepo-447: Made use of the XPrimitive Radix naming convention
* frontend-monorepo-447: Simplified types in 'getButtonClasses'
* frontend-monorepo-447: Added 'asChild' to dropdown trigger to avoid nested buttons
* frontend-monorepo-447: Moved input label and description into Formgroup component. Refactored based on tweaked structure
* frontend-monorepo-447: Externally linked input label
* frontend-monorepo-447: Adding correct text colours to Intent.None backgrounds
* frontend-monorepo-447: Improved intent function name
* frontend-monorepo-447: Removed new navbar until implementation ticket is picked up
* frontend-monorepo-447: using testing-library/user-event for tab click unit tests
* frontend-monorepo-447: Removed unused button import
* frontend-monorepo-447: Little extra use of classnames in form-group.tsx
* feat: make navbar pink for light mode
* fix: problem with theme not switching when dependent in js on theme value
* fix: bg of row hover
* fix: dont use vega pink for sell red
* fix: type error in generate orders func
* fix: lint
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
* feat: format size and volume with positionDecimalPlaces
* fix: pass in calculated step so client side validation works
* fix: add requested state to order dialog, handle user rejected error
* feat: add test case for user rejecting tx
* feat: add test case for order list fractional sizes
* feat: add test case for fractional volume in positions table
* fix: deal ticket tests imports
* feat: add test case for trades fractional size
* fix: props for orderbook tests
* fix: add missing positionDecimalPlaces fields to mock functions
* fix: improve error handling of service error with type guard
* 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: 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>
* feat: add positionDecimalPlaces prop to market query and regenerate types
* feat: add stepper to order amount input
* feat: convert fractions back to integers when submitting the order
* refactor: move order transformations into hooks
* fix: formatting
* fix: simplify toDecimal calculation
* fix: remove redundant function for size calculation
* fix: add new prop to e2e test mock generator
* feat: add tests for order validation
* fix: lint
* chore: add validation to the simple trading app order form
* fix: lint
* 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
* 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>
* 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>
* 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
* 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>
* fix loader size, balance refresh after faucet and string interpolation of market name in order dialog
* fix ts errors
* remove ts-ignores
* remove 0x from pubkey before starting sub for deposit event
* add remove0x helper
* add fixture for markets query
* stub graphql requests
* re-add assertion for tx hash, stub command/sync requests
* refactor to get tests to run with trading page mocked queries
* add test wallet credentials
* split up markets page from trading page
* add portfolio page feature, add market page scenarios
* move hasOperationName helper to support/index
* fix home-page.feature
* fix missing feature step
* Minor changes to BDD steps
* Use in object syntax to get better type safety on hasOperationName helper function
* remove bypass placing orders env var and usage in tests
* use UI_Trading_Test wallet publick key in command/sync mock
* move public key to cypress env
* replace fixtures with generator functions
* colocate query generators with queries
* add custom commands, add index files
* fix dodgy merge, remove duplicate market page feature
* make tsconfig for cypress lib match
* update tsconfig for explorer e2e so commands using merge work
* revert trading step to js
Co-authored-by: Joe <joe@vega.xyz>
* add small/large options for loader
* switch order-list lib to use orders data provider
* prepare incoming orders for table insertion
* delete dupe file, fix test
* ignore sentry-cli from netlify build
* move sentry/nextjs to dev deps
* exclude sentry-cli from netlify
* scaffold dealticket package, remove trading views from react-helpers
* add deal ticket component, add intent utils, expand dialog and form group styles
* add splash component, show market not found message if market doesnt exist
* tidy up error handling
* add handleError method for vega tx hook
* add better testname for provider test, flesh out tests a bit more for deal ticket
* Add unit tests for useVegaTransaction and useOrderSubmit hooks
* add wrapper component for order dialog styles
* add vega styled loader to ui toolkit and use in order dialog
* add title prop to order dialog
* split limit and market tickets into own files
* add button radio component
* revert dialog styles
* move splash component to ui-toolkit, add story
* convert intent to enum
* Make button always type=button unless type prop is passed
* inline filter logic for tif selector
* add date-fns, add datetime to helpers
* add order types to wallet package, make price undefined if order type is market
* use enums in deal ticket logic
* tidy up order state by moving submit and transaction hooks out of deal ticket
* add comment for dialog styles
* remove decimal from price input
* add types package, delete old generated types from trading project
* rename types package to graphql
* update generate command to point to correct locations
* fix use order submit test
* BDD and navigation tests passing
* Remove commented steps
* Steps up to placing order
* Date picker and date-fns update
* Vega connector wallet tests
* Passing up to request sent, updated date picker
* Tests for sell orders and errors
* Update market feature
* Fix failing tests
* Update wallet login
* Readded tx hash assertion and remaining tests
* Add CI wallet import
* Update .github/workflows/cypress.yml
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* Resolved PR comments
* Fix yaml error
* Attempt to fix failing tests in CI
* Run Cypress in Chrome
* Add reload if public key error displayed
* Fix wallet name
* Add force click and waits
* Increase timeout for deal ticket page
* Removed network list from yaml and using input error id
* Increase timeout to 8 seconds
* Re add deleted test id
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* scaffold dealticket package, remove trading views from react-helpers
* add deal ticket component, add intent utils, expand dialog and form group styles
* add splash component, show market not found message if market doesnt exist
* tidy up error handling
* add handleError method for vega tx hook
* add better testname for provider test, flesh out tests a bit more for deal ticket
* Add unit tests for useVegaTransaction and useOrderSubmit hooks
* add wrapper component for order dialog styles
* add vega styled loader to ui toolkit and use in order dialog
* add title prop to order dialog
* add button radio component
* revert dialog styles
* move splash component to ui-toolkit, add story
* convert intent to enum
* add date-fns, add datetime to helpers
* add order types to wallet package, make price undefined if order type is market
* tidy up order state by moving submit and transaction hooks out of deal ticket
* add types package, delete old generated types from trading project
* rename types package to graphql
* add order list container and order list component
* add test setup for useOrders
* add test for use-orders hook
* tidy unnecessary diff
* regen types and use them in order-list, also change to use applytransaction hook for orderlist grid
* make order table columns resizable
* make market table not have highlightable cells, use splash for orders errors and loading states, unit test for orderlist container
* add tests for order list table
* show rejection reason and expires at depending on status and tif
* add decimal places to query
* only update row if data has changed, add test coverage
* add setup tests file to avoid importing jest-dom for every test, add async-renderer component to handle fetch ui logic
* install all of lodash but import individually to get tree shaking
* add setup tests file for orderlist package
* add missing fields to use orders spec mock order
* fix act warnings in index page test
* fix casing of app import
* remove react-singleton-hook, simplify side formatting
* fix linting errors
* scaffold dealticket package, remove trading views from react-helpers
* add deal ticket component, add intent utils, expand dialog and form group styles
* add splash component, show market not found message if market doesnt exist
* tidy up error handling
* add handleError method for vega tx hook
* add better testname for provider test, flesh out tests a bit more for deal ticket
* Add unit tests for useVegaTransaction and useOrderSubmit hooks
* add wrapper component for order dialog styles
* add vega styled loader to ui toolkit and use in order dialog
* add title prop to order dialog
* split limit and market tickets into own files
* add button radio component
* revert dialog styles
* move splash component to ui-toolkit, add story
* convert intent to enum
* Make button always type=button unless type prop is passed
* inline filter logic for tif selector
* add date-fns, add datetime to helpers
* add order types to wallet package, make price undefined if order type is market
* use enums in deal ticket logic
* tidy up order state by moving submit and transaction hooks out of deal ticket
* add comment for dialog styles
* remove decimal from price input
* add types package, delete old generated types from trading project
* rename types package to graphql
* update generate command to point to correct locations
* fix use order submit test
* use intent shadow helper
* remove date-fns and format manually, update submit button error to use input-error
* remove stray console.log