Commit Graph

163 Commits

Author SHA1 Message Date
Dexter Edwards
e275460c76
feat: allow default wallet url to be configured (#875)
* feat: allow default wallet url to be configured

* docs: add docs to environement package
2022-07-27 11:28:29 +01:00
Dexter Edwards
05d8cb3605
Feat: Containerised docker images (#700)
* chore: first pass at config file

* ci: pass app version

* ci: remove workflows that take a while to run to not waste build mins

* ci: run all steps all the time

* ci: correct tags

* ci: correct output syntax

* ci: use quotes

* ci: fix build platform

* ci: only build amd as PoC

* ci: add push true to step

* ci: publish trading and token containers

* fix: use correct environement variable names

* feat: separate dockerfiles for CRA based apps and next apps

* chore: correct path

* fix: incorrect asset path

* ci: build for both platforms

* ci: publish

* ci: add missing deps

* ci: rename pipelines

* ci: rename

* ci: publish on tag only

* ci: remove additional vs

* Revert "ci: remove workflows that take a while to run to not waste build mins"

This reverts commit 7054367ba0.

* chore: remove comment

* chore: revert accientally committed change
2022-07-25 09:48:29 +01:00
m.ray
8ce51dddbc
Feat/625 market info more details - open interest, liquidity info, market and instrument ids, price and settlement asset in the header - Part 1 (#823)
* fix: #625 update the info market query with new fields

* fix: #625 generate code for info market query and fix pagination being removed from globalTypes

* fix:  add id and filter no trading auctions

* fix: add id and format labels

* fix: add name and code to instrument

* fix: add name and code to instrument

* fix: format check

* feat: add settlement asset and mark price

* feat: add liquidity parameters

* fix: remove settings.json

* fix: price instead of mark price label

* fix: add instrument metadata

* fix: remove unused set lodash

* fix: move Liquidity monitoring parameters after price monitoring

* fix: rename instrument metadata to metadata

* fix: settlement asset could be undefined

* Merge branch 'master' of github.com:vegaprotocol/frontend-monorepo into feat/625-market-info-more-details-open-interest-liquidity-ids-risk

* fix: format market id and trading mode label in key details

* fix: display settlement asset if defined

* fix: format trade-grid.tsx
2022-07-21 10:57:30 +01:00
PeteWilliams
0964d6dee5
chore(#819): ui tweaks (#826)
* chore: tweak panel layout/styling

* chore: tweak panel layout/styling

* chore: add thicker borders
2022-07-21 09:10:37 +01:00
m.ray
c0532a8507
Feat/470 edit order (#742)
* feat: 470 edit orders hook and @vegaprotocol/vegawallet-service-api-client@0.4.14

* fix: 470 add methods for dialog intent and title

* fix: #657 rename order-list lib to orders

* chore: #657 move hooks to orders lib

* chore: #657 vega tx dialog used for order cancellation and order submission

* chore: #657 use client subscribe and unsubscribe on reset, refactor vegatxdialog

* fix: #657 revert script src=./env-config.js ending

* fix: #657 format project.json

* Update project.json

* fix: #657 cancel all subs and async tasks in useffect cleanup function

* feat: #657 styling updates on vega order dialog

* fix: #657 rename set dialog open and awaiting confirmation dialog update

* fix: #657 updates on cancel order id check

* fix:  #657 fix vega tx dialog test

* fix:  #657 fix cypress trading-deal-tciket test

* fix:  #657 fix data-testid market test

* fix: #470  add use order edit hook

* fix:  #470 edit order button

* Update libs/orders/README.md

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/wallet/src/vega-order-transaction-dialog/vega-order-transaction-dialog.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/wallet/src/vega-transaction-dialog/vega-transaction-dialog.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/wallet/src/vega-order-transaction-dialog/vega-order-transaction-dialog.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/wallet/src/vega-order-transaction-dialog/vega-order-transaction-dialog.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* fix: #657 remove the magic string and use the ordertype enum from types package

* fix: #657 guarantee that order.id is present at this point or we need to determine the id of the order

* fix: #657 fix translation in dialog

* fix: #657 rename wallet types, delete ticket query, set finalized order null in submit

* fix: #657 fix deal ticket steps test

* fix: #657 remove settings.json

* fix: #657 use order submit in orders lib

* fix: #470 open edit order modal and update storybook

* feat:  #470 edit modals set up

* fix: #463 final modal links to block explorer

* fix: #745 long/short instead of buy/sell

* fix: #657 use only one vega tx dialog

* fix: #657 keep ref of subscription and unsubscribe

* fix:  #657 hide cancelled orders

* fix: #657 sub only when id set

* fix: WIP: trying to unsub when order updated

* fix: #745 long/short instead of buy/sell

* fix: ensure observable defined

* fix: #657 remove redundant test

* fix: #470 merge with new order hooks

* fix: #470 fix use-order-edit no red update order-list with code

* fix:  #470 invert order show price last in dialog

* fix: #470 able to edit order

* fix: #470 fix dialog transition

* fix: #656  #609 show Continuous trading and market state from trade grid header

* fix: #603 filter out rejected markets

* fix: #603 filter out rejected markets

* fix:  #470 revert to 17.0.2 react

* fix:  #470 revert to 17.0.2 react

* fix: #603 filter out rejected markets & dialog lg width

* fix: #609 show trading mode Continuous Trading and hide market state

* fix: #656 modify order validation to trade when suspended

* fix: #656 fix use order validation tests

* fix: #656 format volume no

* fix: format volume with positionDecimalPlaces

* fix: tests don't need to be async

* fix: md:w-[720px] to prevent dialog overflow

* fix: add market state translations

* fix: imprt type validation props

* fix: #470 working edit submit on GTC not on GTT as it is missing expiresAt

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.spec.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update apps/trading/pages/markets/__generated__/Market.ts

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* fix: fix warning messages based on feedback

* fix: capitalize trading mode

* fix: capitalize trading mode

* fix: remove line 72 on markets.cy.ts

* fix: don't show trigger if unspecified

* fix: format last price and shrink 0 on warning icon

* fix: order sizes must be whole numbers for this market and input warning size 20

* fix: order sizes must be whole numbers for this market and input warning size 20

* fix: format market list

* fix: #470 fix expiresAt and price unmarshall values

* fix: #470 fix expiresAt and price unmarshall values

* fix: #470 add extra test on editing order

* fix: pass child react node for order edit on vega tx default

* fix: status and rejection reason optional

* fix: add header transalations and remove commented line

* fix: simplify get list of markets

* fix: check if order.market undefined

* fix: remove cast and check market id

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
2022-07-20 17:40:28 +01:00
John Walley
819c21d35c
feat(#776): Resizable panes in trading app
* feat: resizable panes in trading app

* chore: use tailwind theme for colors
2022-07-19 09:12:02 +01:00
Matthew Russell
7c2a84805e
fix(#441): withdraw fixes
* 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
2022-07-18 22:11:53 +01:00
m.ray
5c038690c3
fix: filter rejected markets, order when suspended, remove market state from header, show continuous trading (#761)
* fix: #603 filter out rejected markets & dialog lg width

* fix: #609 show trading mode Continuous Trading and hide market state

* fix: #656 modify order validation to trade when suspended

* fix: #656 fix use order validation tests

* fix: #656 format volume no

* fix: format volume with positionDecimalPlaces

* fix: tests don't need to be async

* fix: md:w-[720px] to prevent dialog overflow

* fix: add market state translations

* fix: imprt type validation props

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.spec.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update apps/trading/pages/markets/__generated__/Market.ts

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* fix: fix warning messages based on feedback

* fix: capitalize trading mode

* fix: capitalize trading mode

* fix: remove line 72 on markets.cy.ts

* fix: don't show trigger if unspecified

* fix: format last price and shrink 0 on warning icon

* fix: order sizes must be whole numbers for this market and input warning size 20

* fix: order sizes must be whole numbers for this market and input warning size 20

* fix: format market list

* fix: remove market state check from markets.cy.ts

* fix: remove market state check from markets.cy.ts

* fix: remove market state check from markets.cy.ts

* Revert "fix: remove market state check from markets.cy.ts"

This reverts commit c9ab55c98a.

* Revert "fix: remove market state check from markets.cy.ts"

This reverts commit be60e56d8a.

* fix: fix markets.cy.ts failing

* fix: fix markets.cy.ts failing

* fix: fix markets.cy.ts failing

* fix: remove extra test from markets.cy.ts

* fix: update extra test from markets.cy.ts

* fix: update extra test from markets.cy.ts

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
2022-07-16 14:31:47 +01:00
botond
afeb772702
Feat/718 integrate node validation (#741)
* feat: add node swicther

* chore: remove hook form from node switcher

* feat: generate apollo types and add tests

* fix: format

* fix: types

* fix: remove redundant wrapper

* fix: layout styles

* fix: add controlled value to radio group

* fix: flaky node hook test

* feat: add custom input for node and more tests

* feat: wip refactor config hook to run on init

* fix: dont open node switcher on init

* fix: lint

* fix: lint

* fix: cache key error

* fix: format

* fix: lint

* feat: validate connected node on init WIP

* chore: refactor useconfig and usenodes

* fix: revert custom node branch changes

* feat: fix config loading errors and custom node handling

* feat: add test for nodes init

* fix: env error states

* fix: add more tests

* fix: format

* fix: lint and format

* fix: mock type in test

* fix: clean up queries

* fix: node block heights

* fix: make git variables optional

* fix: dialog width on lg screens

* feat: improve mobile looks

* fix: format

* fix: remove commented out styles

* fix: use node data url instead of key

* fix: clean up node switcher dialog props

* fix: add missing title and subtitle for dialog

* fix: show confiug load errors
2022-07-15 12:00:57 +01:00
Matthew Russell
ca56d9393a
fix: rename tradesPaged to tradesConnection (#770)
* fix: rename tradesPaged to tradesConnection

* fix: add missing import

* fix: remove config url from trading app so e2e test runs
2022-07-15 12:12:20 +02:00
Matthew Russell
ab77e99f96
fix: withdrawals and depsits (#754)
* 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
2022-07-14 17:12:28 +01:00
PeteWilliams
b078fc9aad
chore: ui tweaks (#737)
* chore: change tab panel background and spacing

* chore: prevent tabs shiting on click, bg tweak

* chore: adjust chrome layout/spacing

* chore: fix horizontal alignment when accordion chevron rotates

* chore: adjusting bold levels and making market name pink on light theme

* chore: changing white theme header to black background

* chore: re-ordering bottom tabs

* chore: tweaking font sizes

* chore: adjusting dropdown button hover colour

* chore: colour tweaks for accessibility, plus orderbook column widths

* Remove redundant style

Removed 'bg-white' left by error.

* Setting header text to white

* chore: alterative fix to prevent tabs moving

* chore: fixing header font colours

* chore: adding padding to orderbook

* chore: preventing modal close icon from moving on focus

* chore: remove inner shadow from selectbox

* chore: adding padding to orderbook

* chore: preventing @ sign from moving when changing order type

* chore: fix background colour on smaller responsive view

* chore: fix truncated market header on smaller responsive view

* chore: reorder tabs in smaller responsive view to match standard view

* fix: fix broken test
2022-07-14 17:03:17 +01:00
m.ray
07abc2b1eb
Chore/657 refactor wallet and orders libs (#709)
* feat: 470 edit orders hook and @vegaprotocol/vegawallet-service-api-client@0.4.14

* fix: 470 add methods for dialog intent and title

* fix: #657 rename order-list lib to orders

* chore: #657 move hooks to orders lib

* chore: #657 vega tx dialog used for order cancellation and order submission

* chore: #657 use client subscribe and unsubscribe on reset, refactor vegatxdialog

* fix: #657 revert script src=./env-config.js ending

* fix: #657 format project.json

* Update project.json

* fix: #657 cancel all subs and async tasks in useffect cleanup function

* feat: #657 styling updates on vega order dialog

* fix: #657 rename set dialog open and awaiting confirmation dialog update

* fix: #657 updates on cancel order id check

* fix:  #657 fix vega tx dialog test

* fix:  #657 fix cypress trading-deal-tciket test

* fix:  #657 fix data-testid market test

* Update libs/orders/README.md

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/wallet/src/vega-order-transaction-dialog/vega-order-transaction-dialog.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/wallet/src/vega-transaction-dialog/vega-transaction-dialog.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/wallet/src/vega-order-transaction-dialog/vega-order-transaction-dialog.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/wallet/src/vega-order-transaction-dialog/vega-order-transaction-dialog.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* fix: #657 remove the magic string and use the ordertype enum from types package

* fix: #657 guarantee that order.id is present at this point or we need to determine the id of the order

* fix: #657 fix translation in dialog

* fix: #657 rename wallet types, delete ticket query, set finalized order null in submit

* fix: #657 fix deal ticket steps test

* fix: #657 remove settings.json

* fix: #657 use order submit in orders lib

* fix: #463 final modal links to block explorer

* fix: #745 long/short instead of buy/sell

* fix: #657 use only one vega tx dialog

* fix: #657 keep ref of subscription and unsubscribe

* fix:  #657 hide cancelled orders

* fix: #657 sub only when id set

* fix: WIP: trying to unsub when order updated

* fix: #745 long/short instead of buy/sell

* fix: ensure observable defined

* fix: #657 remove redundant test

* Update libs/orders/src/lib/order-hooks/use-order-submit.ts

* fix: failing test due to resizeobserver loop limit exceeded

* fix: lint

* fix: #657 fix test resize observer loop limit exceeded

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-07-13 15:23:46 +01:00
Elmar
6db09974d6
Feat/621 a11y storybook add on (#705)
* 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
2022-07-07 12:01:03 +01:00
botond
836c232a1c
Feat/675: Git info (#683)
* feat: add network-switcher lib

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* feat: add network configuration files to static app

* feat: update environments to use config file instead of static node url

* refactor: split out network switcher utils

* refactor: split up environment hook

* fix: jsonify env variable for possible networks

* fix: add formatter file

* feat: add network loader component

* feat: add network loader to the trading app

* fix: assign correct global state to network swicther

* feat: add status modal

* feat: add network-switcher lib

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* fix: jsonify env variable for possible networks

* fix: add formatter file

* fix: assign correct global state to network swicther

* fix: failing tests from UI changes

* feat: add environment validation

* feat: add runtime validation for network configs

* fix: readd node urls to envs to avoid breaking the apps for now

* chore: rename network swicther lib to environmnet

* fix: lint

* feat: add tests for config hook

* feat: add environment hook tests

* fix: lint

* fix: lint

* feat: add environment hook tests

* feat: add storage tests

* fix: formet

* feat: improve loading states

* fix: format

* fix: use router instead of window location

* fix: rearrange network loader props and components

* fix: remove FC type

* fix: env validation

* fix: untangle returns in network loader

* fix: add teardown for env and localstorage

* fix: add custom to env networks

* fix: lint

* fix: format

* fix: lint

* fix: remove env provider from simple trading app

* fix: remove failing promise hacks

* fix: some leftover format files

* fix: remove network switcher from tsconf

* fix: move Networks to libs/environment

* fix: add defaults for ether env vars

* feat: add tests for default ether env vars

* fix: remove chain id env var from web3 container

* fix: remove chain id from the environment

* fix: format

* fix: lint token

* fix: lint env

* fix: add comment to callout hack

* fix: lint token again

* fix: remove skip

* fix: move addresses to token app

* fix: improve schema validation errors and fix token app

* fix: lint

* fix: format

* fix: format

* fix: add network loaders to apps

* fix: format

* fix: remove logs

* fix: cypress process errors

* fix: change network loader hierarchy in token

* fix: remove stray console.log

* fix: revert test changes in simple trading app

* fix: prefix env vars with NX

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* fix: improve schema validation errors and fix token app

* fix: format

* fix: disable lint rules for catch block any types

* fix: format again

* fix: remove redundant process.platform injections

* fix: format

* feat: add explorer footer

* fix: format

* feat: add custom executor for next

* feat: adjust footer links and add custom executors

* fix: lint and format

* fix: format again

* fix: add explicit github feedback url

* fix: create footer lib

* feat: add footer to token app

* fix: add compiled file to ignore

* fix: make lozenge styling more flexible when no variant specified

* fix: remove schema duplication for third party executors

* fix: add missing intent variant for the lozenge

* fix: move commit hash in footer down two positions

* fix: revert breaking schema removals

* fix: format

* chore: rename footer to network-info

* fix: format

Co-authored-by: Joe <joe@vega.xyz>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
2022-07-06 15:53:35 +00:00
Matthew Russell
8e6c066b99
Feat/462 fills table mvp (no pagination) (#645)
* feat: scaffold fills components

* feat: add query for fills and populate data in basic table

* feat: refactor portfolio page to use grid and add fills container

* feat: add infinite scroll for fills

* feat: try with data provider, get infinite scroll working

* chore: remove infinite scrolling as subsequent pr will add it

* chore: reorder columns

* chore: remove Autosizer from portfolio grid children as its not needed

* chore: move fills tab to the end

* feat: add storybook, format cells

* feat: add unit test for fills table

* feat: convert lib to next lib

* feat: add pagination variables to fills query to only get latest 300

* fix: fills data provider update function to return result of produce

* fix: yarn.lock

* fix: cypress run by moving test helpers

* fix: re add test helpers for unit tests

* fix: global connection tests

* fix: use fills from mocks

* feat: add update handler for fills

* chore: move value formatter functions into module scope
2022-06-30 09:52:25 +02:00
Joe Tsang
288a5d6268
Test/154 market summary (#643)
* chore: additional test ids

* test: additional test for market summary

* chore: move function inside describe block
2022-06-29 13:57:42 +01:00
m.ray
8e25108701
Feat/463 vega transaction component links to block explorer (#666)
* 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

* feat: #463 modify vega dialog to direct you to the block explorer transaction

* feat: #463 modify compile-environment.ts

* fix: #471 order list price set to display all decimals

* fix: #471 generate orders updates

* Update apps/trading/.env

* fix: #463 add test and remove explorer URL from trading/env.ts

* Update apps/trading/lib/config/env.ts

* fix: #463 update trading deal ticket

* fix: #463 fix test to check href

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
2022-06-29 13:55:49 +01:00
Sam Keen
2302ef4378
feat(#447): 447 - UI toolkit and theme updates
* 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>
2022-06-23 20:16:01 -07:00
Matthew Russell
d5727baffc
fix(#623): order fixes
* 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
2022-06-23 15:00:58 -07:00
m.ray
c78514714b
Fix/602 fix deal ticket component to be reused by both simple trading app and console v2 (#606)
* fix: [#602] fix container - use grid tabs inside trading leaving deal ticket container reusable

* fix: [#602] trade grid fixes tab bounds

* fix: [#602] different queries for deal ticket and info market

* fix: #602 generate deal ticket query fix for tests

* chore: [#602] add generate-market-info-query.ts

* fix: #602 add template side of 4 cols so that all components actually resize - fixes styling

* fix: #602 add aliasQuery
2022-06-22 20:08:12 +01:00
botond
69b19e4b7b
feat(#507): Node Discovery
* feat: add network-switcher lib

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* feat: add network configuration files to static app

* feat: update environments to use config file instead of static node url

* refactor: split out network switcher utils

* refactor: split up environment hook

* fix: jsonify env variable for possible networks

* fix: add formatter file

* feat: add network loader component

* feat: add network loader to the trading app

* fix: assign correct global state to network swicther

* feat: add status modal

* feat: add network-switcher lib

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* fix: jsonify env variable for possible networks

* fix: add formatter file

* fix: assign correct global state to network swicther

* fix: failing tests from UI changes

* feat: add environment validation

* feat: add runtime validation for network configs

* fix: readd node urls to envs to avoid breaking the apps for now

* chore: rename network swicther lib to environmnet

* fix: lint

* feat: add tests for config hook

* feat: add environment hook tests

* fix: lint

* fix: lint

* feat: add environment hook tests

* feat: add storage tests

* fix: formet

* feat: improve loading states

* fix: format

* fix: use router instead of window location

* fix: rearrange network loader props and components

* fix: remove FC type

* fix: env validation

* fix: untangle returns in network loader

* fix: add teardown for env and localstorage

* fix: add custom to env networks

* fix: lint

* fix: format

* fix: lint

* fix: remove env provider from simple trading app

* fix: remove failing promise hacks

* fix: some leftover format files

* fix: remove network switcher from tsconf

* fix: move Networks to libs/environment

* fix: add defaults for ether env vars

* feat: add tests for default ether env vars

* fix: remove chain id env var from web3 container

* fix: remove chain id from the environment

* fix: format

* fix: lint token

* fix: lint env

* fix: add comment to callout hack

* fix: lint token again

* fix: remove skip

* fix: move addresses to token app

* fix: improve schema validation errors and fix token app

* fix: lint

* fix: format

* fix: format

* fix: add network loaders to apps

* fix: format

* fix: remove logs

* fix: cypress process errors

* fix: change network loader hierarchy in token

* fix: remove stray console.log

* fix: revert test changes in simple trading app

* fix: prefix env vars with NX

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* fix: improve schema validation errors and fix token app

* fix: format

* fix: disable lint rules for catch block any types

* fix: format again

* fix: remove redundant process.platform injections

* fix: format

Co-authored-by: Joe <joe@vega.xyz>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
2022-06-21 16:20:53 -07:00
Matthew Russell
835f86d024
Fix/Trading grid layout fixes (#583)
* fix: move MarketList wait back

* fix: dont wait for MarketList query

* fix: move assertion to actual test body so other tests can run

* fix: ensure page rendered before checking url after redirect

* fix: grid layout

* fix: withdrawals test by giving explicit dates to mocked withdrawals so they are ordered correctly
2022-06-20 16:52:25 -07:00
Sam Keen
374faa0b74
fix(#586): theme switcher not working for all panels 2022-06-17 10:26:45 -07:00
m.ray
675716089a
feat: #155 trading full market details (#549)
* feat: [#155] move grid tab to ui-toolkit and add info component in the tabbed ticket

* feat: [#155] add accordion component + storybook

* feat: [#155] styling updates, unit tests and export ui-toolkit

* feat: [#155] generate deal ticket query and info-market.tsx updates

* feat: [#155] move grid tab to ui-toolkit and add info component in the tabbed ticket

* feat: [#155] add accordion component + storybook

* feat: [#155] styling updates, unit tests and export ui-toolkit

* feat: [#155] generate deal ticket query and info-market.tsx updates

* fix: [#155] styling updates to mimic figma

* fix: [#155] fix trading-e2e generate deal ticket query

* feat: [#155] remove open field, add omits configurable

* fix: [#155] row component in info market

* feat: market info/accordion styling tweaks

* fix: [#155] add risk models and fix readme

* fix: [#155] update  generate deal ticket query to fix test

* fix: [#155] fix cypress test data

Co-authored-by: PeteWilliams <me@petewilliams.info>
2022-06-17 15:56:42 +01:00
Dexter Edwards
bcaab22891
Feat/dockerize frontends (#388)
* 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

* add docker image for building explorer

* add arg

* env file changes

* add docker file to build env file

* add requirement for env file in explorer

* fix env file syntax

* containers functional

* default to testnet

* make env flag logic consistent in all places

* pre populate env file

* ensure working for all projects

* address PR comment

* generalising env for token

* invert config dependency from ui toolkit

* fix: merge issues

* docs: running containers documentation

* style: lint

* fix: env varibales not being added properly

* chore: fix merge issues

* chore: fix docker file to support new exectutors

* chore: set address on all contracts as a property

* feat: pull token from contract rather than relying on env var

* chore: fix typing

* chore: remove duplicated prop

* chore: don't use chainId

* style: lint

* style: lint

* Merge branch 'master' into feat/dockerize-frontends

* Merge remote-tracking branch 'origin/master' into feat/dockerize-frontends

* test: revert changes to explorer e2e file

* fix: creating client without base causing token to error

* test: fix tests erroring in before hook due to file not being found

* chore: remove node env from configurable flags

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-06-13 15:39:17 +01:00
Matthew Russell
ff8990c257
Fix/411 asset dropdown style (#535)
* fix: arrow missing from select box

* fix: select box styles on firefox
2022-06-10 16:12:51 -07:00
Matthew Russell
9941c9bfaa
Fix/trading app tests (#539)
* fix: deposits tests, also convert to basic cypress

* add new home tests which test redirect to trading page and markets page

* chore: replace portfolio page feature with raw cypress

* chore: replace market page feature with raw cypress tests

* chore: replace home page tests with global.ts for wallet connections

* chore: add raw cypress withdrawals tests with mocks

* fix: complete withdrawals prompt and add assertion for it

* chore: remove unnecessary cypress envs now that we are mocking assets

* chore: ignore lint errors temporarily

* chore: add mock for deposit page query, add wait for mocked queries to resolve

* fix: order of waiting for withdraw page query

* fix: validate vega wallet connection

* chore: remove rest of page objects and convert trading page feature to regular cypress

* fix: assertion on transaction dialog after withdrawal

* chore: split withdraw and withdrawals pages into separate files

* chore: split trading tests into own files, connect wallet once for deal ticket

* feat: convert home page tests to raw cypress
2022-06-10 12:00:02 -07:00
Dexter Edwards
9266ff4bd8
Feat/smart contracts update (#536)
* 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>
2022-06-10 11:36:38 +01:00
botond
ecda46caa5
Feat/6 Network Switcher (#502)
* feat: add network-switcher lib

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* fix: jsonify env variable for possible networks

* fix: add formatter file

* fix: assign correct global state to network swicther

* feat: add network-switcher lib

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* fix: jsonify env variable for possible networks

* fix: add formatter file

* fix: assign correct global state to network swicther

* fix: failing tests from UI changes

* fix: lint

* fix: lint

Co-authored-by: Joe <joe@vega.xyz>
Co-authored-by: Dexter <dexter.edwards93@gmail.com>
2022-06-10 10:15:38 +01:00
Matthew Russell
be3b416176
Fix/Default market and tabs navigation (#518)
* fix: dont use localstorage for navigation, remove query params for tabs

* chore: lint

* fix: revert to using url rather than data test id

* chore: lint

* chore: remove arrow down ref from markets page object
2022-06-08 09:47:31 +01:00
Matthew Russell
6b14221de3 fix: make scroll bars auto in trade header 2022-06-07 16:06:40 -07:00
Matthew Russell
e463bbe238
feat(#495): get smart contracts addresses from network params
* 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
2022-06-07 15:08:40 -07:00
botond
d4420d6038
Feat/248: portfolio layout (#476)
* feat: add base portfolio layout

* feat: add positions, order list and withdrawals to portfolio page

* feat: add account container to portfolio page plus wallet management improvments

* fix: remove duplication from portfolio page containers

* fix: format and lint

* fix: remove buggy wallet dialog from portfolio page

* fix: deposit e2e test navigation

* fix: temporarily go straight to withdrawal pages

* fix: formatting

* fix: add formatting

Co-authored-by: Joe <joe@vega.xyz>
2022-06-07 10:26:45 +01:00
m.ray
a65c52d7d4
feat: trading page market summary & select markets modal opening from market title & fix: positions table realised PnL (#505)
* feat: [#456] select markets modal opening from market title

* feat: add a global zustand store for managing connect dialogs and landing dialog

* feat: add tests

* feat: [#456] make arrow configurable

* feat: [#456] make arrow configurable

* feat: [#456] trading tab active only on portfolio

* chore: update tranches

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: [#445] shallow routing from index (#484)

* fix: [#445] shallow routing from index

* fix: [#445] use link to redirect to market - an attempt to fix reload

* fix: [#445] remove stretched link from last link - it makes all the other links unusable

* fix: [#445] fix lint on select market list - remove stretched link

* fix: [#456] put everything in landing folder to avoid conflicts

* fix: remove condition for cypress for auto connecting

* feat: [#456] add global store and fix href routing

* feat: [#456] add global store and fix href routing

* feat: [#456] add one more test

* feat: [#154] pull market data summary

* feat: [#154] move header above the trade grid child sections

* feat: [#154] flex oerflow and styling updates for market summary

* feat: [#154] fix styling

* fix: [154] fix cyp tests and styling

* fix: [#154] fix markets navigation cypress step

* fix: [#154] fix for navigate to markets link

* fix: failing tests from market change

* fix: [#154] set nav items based on market id and show last viewed market on landing

* fix: [#412] invalid decimal place on realised PnL field

* fix: [#154] remove redundant curly braces

* fix: [#154] show hyphen on volume if market data is undefined

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: dexturr <dexturr@users.noreply.github.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-06-06 17:19:56 +01:00
Matthew Russell
25b67009a6
feat: add a global zustand store for managing dialogs (#494)
* feat: add a global zustand store for managing connect dialogs and landing dialog

* feat: add tests

* fix: remove condition for cypress for auto connecting

* chore: fix assertion in tests for vega wallet text

* fix: add mock for landing dialog markets query

Co-authored-by: madalinaraicu <madalina@vegaprotocol.io>
2022-06-01 15:21:36 +01:00
botond
3a27172e04
feat(#175): ui-toolkit links (#453)
* 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>
2022-05-31 17:30:02 -07:00
m.ray
97b4ffb399
fix: [#445] shallow routing from index (#484)
* fix: [#445] shallow routing from index

* fix: [#445] use link to redirect to market - an attempt to fix reload

* fix: [#445] remove stretched link from last link - it makes all the other links unusable

* fix: [#445] fix lint on select market list - remove stretched link
2022-05-30 17:57:14 +01:00
Joe Tsang
66c18a2b1b
Test/425 withdrawals (#457)
* chore: improve assertions for deposits

* test: validation test passing

* test: withdrawal tests passing

* fix: test failures in CI

* fix: lint

* chore: add env variables

* fix: failing tests due to wallet service not running

* ci: pass automatic cnsent

* ci: init wallet in other directory

* ci: pass home string everywhere

* ci: config is already imported

* fix: failing deposit and nightly run

* ci: port over changes from pr run

* fix: failing network param tests

* fix: assertion

* fix: assertion one last time

Co-authored-by: Dexter <dexter.edwards93@gmail.com>
2022-05-27 10:23:07 +01:00
m.ray
9ab6337e42
Feat/305 add console v2 first view screen (#424)
* [#305] add initial landing dialog on markets page and fix some typos

* [#305] market-list utils and generate schema

* [#305] initial styling of the landing dialog and add arrows

* [#305] routing to markets and add hover and market list tests

* [#305] fix z-index on dialog overlay

* [#305] default market shoulde be oldest market that is currently trading in continuous mode

* [#305] refactor market-list library

* [#305] add arrow unit tests

* Update libs/market-list/src/lib/components/landing/landing-dialog.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/market-list/src/lib/components/landing/select-market-list.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* Update libs/market-list/src/lib/components/landing/select-market-list.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* test: fix failing tests from homepage change

* [#305] sort by id after sorting by date

* test: increase timeout for failing tests in CI

* [#305] destructuring all over the place and some code tweaks, arrows and percentage changes

* [#305] update sparkline to show colour

* [#305] fix order of market list

* [#305] stretchedLink class plus a-tag href for navigation - accessibility updates

* [#305] use href only and remove log

* [#305] use bignumber.js for price calculations

* [#305] change to bg-white/50 on dark mode overlay as asked from UX

* [#305] change to bg-white/50 on dark mode overlay as asked from UX

* [#305] toLocaleString fix

* [#305] toLocaleString fix

* [#305] add price-change-cell and use formatNumber

* [#305] add extra test for select market list

* Update apps/trading/specs/index.spec.tsx

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>

* [#305] use memo, sort by date and id lodash

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-05-23 13:21:54 +01:00
botond
a6a21bed46
Feat/427: Serve explicit environments (#433)
* feat: add env specific serve commands where appropriate for apps

* fix: typo in command call

* feat: add custom executor for serving apps

* chore: clean up project files and use the custom executor

* chore: patch readmes

* chore: split out logs into their own function

* fix: prevent overriding env when no flag passed in

* fix: add tsc to postinstall to take care of compiling the custom executors

* fix: remove the custom serve executor from trading
2022-05-23 10:56:11 +01:00
botond
66c8d195a2
Fix/429: app zindex (#438)
* fix: app zindex

* fix: remove redundant z-index from toggle buttons
2022-05-23 10:54:57 +01:00
Sam Keen
34502a7c7f
frontend-monorepo-436 Env var files 'devent' typo (#437) 2022-05-23 09:51:19 +01:00
Matthew Russell
d8bf887245
chore(#315): Convert token to use wallet lib
* 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
2022-05-17 09:04:41 -04:00
Dexter Edwards
107171d46a
renaming test files (#351)
* renaming test files

* add eslint plugin jest

* enable linting rule and additional rules

* fix a metric ton of linting errors

* fix lint errors

* remove export
2022-05-12 13:32:14 +01:00
Ditmir-Vega
6bccfaf8ab
Task/252 Eth wallet connection and deposit form validation tests (#309)
* 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>
2022-05-10 20:37:09 +01:00
Bartłomiej Głownia
19a9e9adb0
Fix global types imports in generated files (#386) 2022-05-09 13:14:59 +02:00
Dexter Edwards
9e82935658
Chore/more docs (#331)
* chore renable prettier md files

* remove duplicated information, add instructions on running formatting

* add more docs for other apps a libraries

* correct numbering

* Missing applications

* correction for serving

* more docs
2022-05-03 16:32:31 +01:00
Matthew Russell
1d8de701c9
Use types from web3-react library
export connectors to avoid needless data manipulation, use built in types from web3-react (#310)
2022-05-02 13:16:57 -04:00
Matthew Russell
3af4e354cd
Mock accounts for trading page (#311)
* 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
2022-04-29 14:24:15 +01:00