Commit Graph

49 Commits

Author SHA1 Message Date
Matthew Russell
72821dd183
chore(utils,react-helpers,data-provider): remove apollo deps from ui-toolkit (#3626) 2023-05-07 18:01:07 -07:00
Matthew Russell
b9c4057ce5
feat(oracles,trading): 3224 add oracle links to market info (#3297) 2023-03-31 09:06:21 +01:00
botond
528fd96721
feat(announcements): announcements (#3252)
Co-authored-by: Mikołaj Młodzikowski <mikolaj.mlodzikowski@gmail.com>
2023-03-29 15:20:49 +02:00
Matthew Russell
a796a38200
chore(datagrid,utils,react-helpers): rename token app, add utils, datagrid, i18n (#3022) 2023-02-28 10:56:29 -08:00
Dexter Edwards
b65db3cdad
chore: remove console lite (#2670) 2023-01-19 16:59:49 +01:00
Radosław Szpiech
13ab03c459
chore: remove liquidity-provision-dashobard-e2e as it is not maintained (#2589) 2023-01-11 18:02:16 +01:00
Radosław Szpiech
dd2e3a6556
chore: remove stats and stats-e2e by burning them to the scorched ground (#2586) 2023-01-11 17:45:08 +01:00
Dexter Edwards
dccc750154
fix(1758): data node being down (#1871)
* fix: timeout data node requests for node switcher

* chore: generate apollo client library

* chore: migrate console lite to use new apollo client package

* chore: migrate explorer across

* chore: remove completely unused file

* chore: migrate stats

* chore: migrate trading

* chore: migrate multisigner app

* chore: migrate token over

* chore: final migrations

* test: adjust tests for new behaviour

* fix: build script

* Update libs/apollo-client/src/lib/apollo-client.ts

* chore: fix conflicts

* fix: cache

* test: setup mocks before each test

* style: lint

* style: lint

* chore: resolve conflicts

* test: fix tests
2022-11-10 13:08:12 +00:00
Art
28b38c3ebf
feat: ledger entries (#1944) 2022-11-04 10:47:39 +00:00
Sam Keen
4272fefb0b
feat(#807): adds app for validator add and remove signer (#1402)
* Feat/807: ABI and classes for the contract methods

* Feat/807: Added a new multisig-signer app

* Feat/807: Added a new multisig-signer app

* Feat/800: Untested signer forms

* Feat/800: Moved reused bg video into ui-toolkit to use in multisig-signer project, and cleaned up some spacing that was overlooked in the stats theme changes

* Feat/800: Componentised a bit, made the app look ok

* Feat/800: Linting, prettifying, removing some unneeded tests, ensuring e2e tests run

* Feat/800: Bit of translation

* chore: fix type errors

* chore: some parts error handling

* feat: handle error and not found cases

* feat: add changes to remove signer form as well

* chore: rename component

* chore: fix type issues

* feat: add web3 connector logic

* feat: allow disconnecting and show connected eth wallet info

* Feat/800: Removed unused 'useApolloClient'

* Feat/800: Ensure bundle.nonce and bundle.signatures have '0x' prepended

* Feat/800: Removed unused e2e directory

* Feat/800: Removed unnecessary app test

* Feat/800: Removed unnecessary router

* Feat/800: Capturing GQL errors in Sentry

* Feat/800: Removing references to the unused e2e test directory

* Feat/807: Consistent react hook imports

* Feat/807: Removed unnecessary spreads

Co-authored-by: Dexter <dexter.edwards93@gmail.com>
2022-09-29 12:10:53 -07:00
malinantonsson
9169165a03
feat: lp dashboard setup (#1327)
* feat: generate new nx application

* feat: add env variables & render a headline

* feat: add netlify config

* feat: add cypress projectId and delete unused files
2022-09-15 08:37:02 -07:00
m.ray
d85c5d7c1f
chore: LP tooltips & move market-info lib (#1267)
* feat(#473): add positions metrics data provider

* feat(#473) add positions stats

* feat(#473) add positions stats

* feat(#473): add positions stats

* feat(#473): add positions stats

* feat(#473): position metrics, test and refactoring

* feat(#473): add unit tests to positions table

* feat(#473): fix spelling, order positions by updated at desc

* feat(#473): protect from division by 0

* feat(#473): fix trading positions e2e tests

* feat(#473): fix e2e data mocks

* feat(#473): post code review clean up

* feat(#993): dependencies handling in data provider

* feat(#993): fix e2e tests data mocks

* feat(#993): remove position metrics mocks, add market data market id

* feat: #994 add price monitoring bounds and candles update interface

* fix: move best bid price to diff section

* feat(#993): add missing mocks, fix combine function

* fix: add insurance pool and calc volume 24h

* feat: display some oracle min info, asset id, insurance pool, move open interest and 24hVol

* fix: add  market-info.cy.ts case

* fix: remove # from numbered price monitoring settings

* fix: add insurance pool test

* fix: format 24hvol

* feat(#993): set loading initially to true, add unit tests

* feat(#993): cleanup, add comments

* feat(#993): remove undefined from client type

* fix: remove indicativeVolume and oracleSpecBinding from market info

* feat(#993): cosmetic changes

* fix: add oracleSpecBinding back

* Update libs/deal-ticket/src/components/info-market.tsx

Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>

* feat: add initial queries

* fix: memo yesterday's timestamp

* fix: add back info

* fix: update query

* fix: add view full oracle details link and update mappings

* fix: regen code, make link reactnode, fix index.ts

* feat: add liquidity lib, refactor info market

* fix: remove liquidity query from deal-ticket

* feat:(#993): pass informaton about update callback cause

* fix: small ui tweaks

* fix: display in grid

* feat: navigate to oracle by termination id

* feat: #491 add use liquidity provision merging

* fix: remove logs, add extra check on my liquidity provision

* fix: type number trivially inferred from a number literal, remove type annotation

* fix: cypress tests and formatting for market info

* Update libs/deal-ticket/src/components/market-info/info-market.tsx

* fix: use position decimal places for stake and market value proxy

* fix: #491 use size/position decimal places for obligation, supplied and commitment amount

* fix: add size component and use decimal places

* fix: update readme liquidity

* fix: #491 add correct asset decimal formatters

* Update libs/deal-ticket/src/components/market-info/tooltip-mapping.tsx

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

* fix: make link instead of button to open liquidity

* fix: #491 add liquidity page, link to trading mode tooltip, tabs hidden or choose active

* fix: remove LP dialog, use only link to page

* fix: add market id in LP view

* fix: follow trade grid design

* fix: add one line tabs , remove link styling, remove any, add value formatters

* fix: remove falsy check LP undefined

* fix: keep date formatter in LP table

* fix: add generic type market info, hooks in body function

* fix: revert number formatters

* fix: use one param only in network params query

* fix:  use network param in web3 lib

* fix: move lp container to trading app

* fix: remove resizable panel

* feat: add header component, remove isEstimate

* chore: remove unnecessary type cast

* fix: fix build with children map clone element

* chore: lint

* fix: move use network params to react helpers

* fix: add const for LP tabs

* fix: fix formatting on LP page

* fix: only show tilde for liquidity monitoring auction end date

* fix: market id being rendered twice in market info

* chore: fix lint

* fix: types for generate withdraw form query

* chore: fix intermittent failing withdrawal test

* Update libs/deal-ticket/src/components/market-info/info-market.tsx

* fix: route to LP and update selected market

* fix: add market-info lib

* fix: add tooltips to header stat

* fix: add overflow-y on div within auto sizer

* fix: fix merge conflicts

* fix: size and dialog

* fix: format target stake and supplied stake

* fix: add tooltips ag-grid and fix decimals

* fix: overflow on both axes auto-sizer

* fix: remove symbol, add to commitment

* fix: update tooltips and headers after demo

* fix: network switcher background

* fix: remove any from market info

* fix: integration test

* fix: remove e2e test for risk factors for now until grpc error sorted

* fix: get liquidity panel  by test-id

* fix: fix market-info.cy.ts test

* fix: liquidity test

* f
ix: fix link data test id

Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-09-12 11:07:29 +02:00
m.ray
cae6162a7f
feat: liquidity provisions view (#1133)
* feat(#473): add positions metrics data provider

* feat(#473) add positions stats

* feat(#473) add positions stats

* feat(#473): add positions stats

* feat(#473): add positions stats

* feat(#473): position metrics, test and refactoring

* feat(#473): add unit tests to positions table

* feat(#473): fix spelling, order positions by updated at desc

* feat(#473): protect from division by 0

* feat(#473): fix trading positions e2e tests

* feat(#473): fix e2e data mocks

* feat(#473): post code review clean up

* feat(#993): dependencies handling in data provider

* feat(#993): fix e2e tests data mocks

* feat(#993): remove position metrics mocks, add market data market id

* feat: #994 add price monitoring bounds and candles update interface

* fix: move best bid price to diff section

* feat(#993): add missing mocks, fix combine function

* fix: add insurance pool and calc volume 24h

* feat: display some oracle min info, asset id, insurance pool, move open interest and 24hVol

* fix: add  market-info.cy.ts case

* fix: remove # from numbered price monitoring settings

* fix: add insurance pool test

* fix: format 24hvol

* feat(#993): set loading initially to true, add unit tests

* feat(#993): cleanup, add comments

* feat(#993): remove undefined from client type

* fix: remove indicativeVolume and oracleSpecBinding from market info

* feat(#993): cosmetic changes

* fix: add oracleSpecBinding back

* Update libs/deal-ticket/src/components/info-market.tsx

Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>

* feat: add initial queries

* fix: memo yesterday's timestamp

* fix: add back info

* fix: update query

* fix: add view full oracle details link and update mappings

* fix: regen code, make link reactnode, fix index.ts

* feat: add liquidity lib, refactor info market

* fix: remove liquidity query from deal-ticket

* feat:(#993): pass informaton about update callback cause

* fix: small ui tweaks

* fix: display in grid

* feat: navigate to oracle by termination id

* feat: #491 add use liquidity provision merging

* fix: remove logs, add extra check on my liquidity provision

* fix: type number trivially inferred from a number literal, remove type annotation

* fix: cypress tests and formatting for market info

* Update libs/deal-ticket/src/components/market-info/info-market.tsx

* fix: use position decimal places for stake and market value proxy

* fix: #491 use size/position decimal places for obligation, supplied and commitment amount

* fix: add size component and use decimal places

* fix: update readme liquidity

* fix: #491 add correct asset decimal formatters

* Update libs/deal-ticket/src/components/market-info/tooltip-mapping.tsx

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

* fix: make link instead of button to open liquidity

* fix: #491 add liquidity page, link to trading mode tooltip, tabs hidden or choose active

* fix: remove LP dialog, use only link to page

* fix: add market id in LP view

* fix: follow trade grid design

* fix: add one line tabs , remove link styling, remove any, add value formatters

* fix: remove falsy check LP undefined

* fix: keep date formatter in LP table

* fix: add generic type market info, hooks in body function

* fix: revert number formatters

* fix: use one param only in network params query

* fix:  use network param in web3 lib

* fix: move lp container to trading app

* fix: remove resizable panel

* feat: add header component, remove isEstimate

* chore: remove unnecessary type cast

* fix: fix build with children map clone element

* chore: lint

* fix: move use network params to react helpers

* fix: add const for LP tabs

* fix: fix formatting on LP page

* fix: only show tilde for liquidity monitoring auction end date

* fix: market id being rendered twice in market info

* chore: fix lint

* fix: types for generate withdraw form query

* chore: fix intermittent failing withdrawal test

* Update libs/deal-ticket/src/components/market-info/info-market.tsx

* chore: add another wait for market

Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-09-07 12:05:28 +01:00
Matthew Russell
c259622848
feat(#927) design update (#1201)
* 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>
2022-08-30 21:35:46 -07:00
Bartłomiej Głownia
93a5f911f5
feat(#993): derived data provider (#1047)
* feat(#473): add positions metrics data provider

* feat(#473) add positions stats

* feat(#473) add positions stats

* feat(#473): add positions stats

* feat(#473): add positions stats

* feat(#473): position metrics, test and refactoring

* feat(#473): add unit tests to positions table

* feat(#473): fix spelling, order positions by updated at desc

* feat(#473): protect from division by 0

* feat(#473): fix trading positions e2e tests

* feat(#473): fix e2e data mocks

* feat(#473): post code review clean up

* feat(#993): dependencies handling in data provider

* feat(#993): fix e2e tests data mocks

* feat(#993): remove position metrics mocks, add market data market id

* feat(#993): add missing mocks, fix combine function

* feat(#993): set loading initially to true, add unit tests

* feat(#993): cleanup, add comments

* feat(#993): remove undefined from client type

* feat(#993): cosmetic changes

* feat:(#993): pass informaton about update callback cause
2022-08-26 08:39:40 -07:00
macqbat
4ae410eaab
feat: [console-lite] - change app name (#1114)
* feat: [console-lite] - change app name

* feat: [console-lite] - change app name

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-08-23 16:02:08 +02:00
Sam Keen
c40d71e1ed
feat (#804): simple proposal form (#942)
* Feat/804: Routing and basic page setup

* Feat/804: Type definition for proposals - awaiting asset docs/changes

* Feat/804: New proposals lib

* Feat/804: Propose form and page

* Feat/804: Removing dud copied unit tests for now

* Feat/804: Added types for new asset proposal

* feat: handle new error types returned from wallet for proposals

* chore: rename lib to governance

* feat: move usage of hook into form component

* feat: some adjustments and test coverage

* chore: tidy up, remove tailwind config

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-08-05 12:01:46 +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
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
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
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
Dexter Edwards
d858d9cf8a
feat: port over smart contracts repository into the monorepo (#458) 2022-05-27 10:22:18 +01:00
Elmar
7266ac9b37
Feature/vega core (#376)
* 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
2022-05-12 10:56:21 +01:00
Matthew Russell
29cd7dd2e4
Feat/104 withdraws (#263)
* 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>
2022-04-26 19:51:39 -07:00
Bartłomiej Głownia
d0ec016adc
Feature/151 orderbook (#266)
* [#151] Add orderbook

* [#151] Add orderbook components

* [#151] Add market-depth data provider

* [#151] Add orderbook manager

* [#151] handle market depth updates in orderbook manager

* [#151] Fix PageQueryContainer usage of AsyncRenderer

* [#151] Move data handling logig out from orderbook manager

* [#151] Use mocked data, fix data issues

* [#151] Add compact order book data unit tests

* [#151] Add updateData unit tests

* [#151] Add updateCompactedData unit tests

* [#151] update cummulative vol on update, move data ref handling from effect to manager

* [#151] Update cummulative vol on update, fixes

* [#151] Optimieze orderbook ag-grid render

* [#151] Replace ag-grid with orderbook component

* [#151] Use react memo to optimize orderbook rendering

* [#151] Fix cummulative vol computation on compacted data update

* [#151] Add resolution controls

* [#151] Fix cumulative spelling mistake

* [#151] Use number instead of string for cumulative values

* [#151] Expose restart callback in useDataProvider hook

* [#151] Update empty cumulative values

* [#151] Add horizontal line under header in orderbook

* [#151] reuse orderbook data in market-depth chart

* [#151] restart market depth provider on sequenceNumber gap

* [#151] use throttle in orderbook and depth-chart

* [#151] Add comments, refactor data functions

* [#151] Add comments, refactor data functions

* [#151] move orderbook and depth-chart libs to market-depth
2022-04-26 17:26:28 +02:00
John Walley
ba19b5acca
Candle/depth chart switcher (#284) 2022-04-25 10:34:07 -07:00
Sam Keen
9591687a80
Feat/224 move token app into monorepo (#229)
* moved TFE into monorepo with some remaining errors

* moved TFE into monorepo with some remaining errors - further files

* add tailwind config, use etherscan link from toolkit, use web3 from lib

* make app compatible with react router 6

* remove vega keys from app state and use from state from lib

* comment out crowdin script injection

* convert all buttons to use ui toolkit buttons

* remove blueprint inputs and selects and replace with ui-toolkit

* remove css resets

* tidy button styles in wallet replace splash-screen with version from ui-toolkit

* various style fixes

* tidy up proposal list

* add valid key to route children

* Set custom port and config for token e2e tests

* added env title e2e test

* started some styling fixes - nav and home route

* Added 'h-auto' to button height regex check

* Added 'h-auto' to regex check to allow desired TFE button height

* Removed scss and used tailwind for heading component

* Woff files not woof :)

* Proper nav h1 font size

* Wallet card headings

* Vega wallet button styles

* Set project to use static hosted alpha font (cors being fixed separately)

* Eth wallet button styles (unfinished)

* Home route styles

* Staking route styles and title calculation

* Rewards route styles

* Vega wallet container button style

* Eth wallet disconnect button

* Connect dialog title colour and spacing

* Splash screen layout

* Fixed a bunch of linting errors

* Used 'Object.entries' instead of 'Array.from' to create iterable from object in 'use-search-params'

* Removed use of 'any' from 'use-search-params'

* Better simplification of 'use-search-params'

* Removed package.json duplication errors, set most up-to-date version from duplicate options

* Elvis for possible undefined in 'use-add-asset-to-wallet'

* Removed redundant files

* Removed old todo

* Removed package.json redundant packages

* Added dark class for dialog h1 text colour (required as the current scss gives a wrong default for this element)

* update useAddAsset to use new provider

* Ensure Jest has required methods

* tidy up package.json

* remove ts-ignores and use casts for dynamic grid imports

* remove unused code from token-e2e

* update to latest types from react 17

* Removed vegag wallet not running component as it should be handled by wallet lib

* fix typing of contract addresses

* type cast network string to Network enum in reduce

* remove comment, issue 270 created instead

* default associated wallet amounts to zero

* update comment

* delete unused staking-overview component, add note about withTranslation types to comment

* re add proposal dates

* enable source maps for build

* add rest of env files for networks

* remove crowdin script tags from index.html

* add testing-library/jest-dom to types in test tsconfig

* setup i18n for tests so that translations are used, proposal change table test

* delete unused translation files and config

* set sentry release to use commit ref

* delete dex liquidity pages

* remove unused useVegaLPStaking hook

* use found id so no non null assertion needed

* remove mocked graphql provider

* remove commented out breadcrumb component

* add comment and link to issue for syntax highlighter changes

* fix any types in token-input, add link to ui-toolkit input changes

* dont default allowance to zero as it affects rendering logic

* fix spacing between callouts on associate page

* adjust spacing between callout for association callout

* fix alignment of ethereum splash screen

* use ethereum connect dialog state for connect dialog

* add infura provider as default

* change from infura provider to JsonRpcProvider

* remove unused Ethereum config

* add custom webpack config to inject sentry plugin

* delete commented out code for pending stake

* add comment linking input elements issue for eth-address-input

* move useEagerConnect to libs/wallet, add logic for connecting state so token app can load after connection has succeeded or failed

* remove unused storage files, update web3 connector to render children if not actively connected

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-04-20 12:37:44 -07:00
John Walley
f721a21d0f
Feat/129 pennant chart (#214)
* initial commit for adding chartt lib with pennant chart

* add pennant package, fix dynamic import of chart

* use updated pennant library

* Create separate chart and depth-chart libs

* Remove leftover generated files

* Use more targeted queries and subscriptions

* Fix jestConfig value for depth-chart

* Add jest-canvas-mock

* Refactor updateDepthUpdate function

* Add updateDpethUpdate test

* Add jest-canvas-mock to chart tests

* Avoid using any type in test

* Use correct casing for gql queries and subscriptions

* Make ButtonRadio generic in option value type

* Add padding and margin to chart container

* Remove unused subscriptions and methods from data source

* Use correct React imports

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-04-08 10:49:45 -07:00
Matthew Russell
98c1fc82f7
Feat/152 Trade list MVP (#217)
* add trades lib with data provider

* add trades table and cell color logic

* ensure we only show last 50 rows

* add test for table columns and formatting

* update trades table to get cells using col-id

* fix linting

* use default function param for fetchpolicy
2022-04-07 06:41:57 -07:00
Bartłomiej Głownia
c573349f68
[#185] Add accounts table (#193)
* [#185] Add accounts table

* [#185] Add summary row to accounts table
2022-04-06 10:48:05 -07:00
Matthew Russell
f244cd07d4
Feat/103 deposits (#143)
* add web3 provider using web3-react package

* add env setup, add guard for incorrect chain id

* add lib for web3-provider

* make wallet and ethereum connect dialogs look more consistent

* add setup tests file for jest-dom

* remove chain id config and just use appChainId prop, add disconnect button to invalid chainId state

* switch handling of connect dialog state to the consuming app

* rename web3-provider package to just web3

* envs for each environment so we can specify chainId

* make web3container enforce connection before rendering childen

* add web3 provider using web3-react package

* make web3container enforce connection before rendering childen

* add container for getting network params

* Move ethereum config query to web3 container

* add basic deposit form elements

* add queries required for deposits, add asset default

* add bridge contract and deposit transaction

* break txhash

* restrict etherscan link props, use etherscan link in transaction dialogs

* use smart-contracts-sdk

* split hooks and components into different files, fix find deposit logic, add styles and progress for tx dialogs

* fix text colors for dark mode

* improve tx dialogs, rename deposit query

* position use buttons, fix select validation

* fix type errors after not being in strict mode, add allowance checking

* add deposit-limits component, fix types now that strict mode is enabled

* make contract hooks have a single instance

* split out dialogs into separate files, fix icon alignment

* improve error types for use transaction hook, add number save min and max for the amount input

* add validation for ethereum and vega addresses

* add unit test for deposit form component

* add icons and shared dialog styles so it better matches order transaction dialog

* fix underline class, reset finalized deposit

* fix type imports, use i18n function, regen types

* only pass contract address to token contract hook

* add vega env, refactor so retrieving asset contract address logic isn't duplicated

* add faucet functionality, combine dialogs into single transaction-dialog

* combine rendering logic into single func of transaction dialog, rever contract hooks to just useMemo

* use to field rather than connected key

* fix props and imports in deposit form test

* share faucetable condition, pass it to token contract

* pass contracts in as params to hooks to avoid multiple contract instances

* refetch balance in wallet after deposit, add comments

* use hook state for tracking deposit via partyid, add test for use ethereum transaction hook

* add deposits lib

* add last smart contract sdk package

* fix asset import in test

* tidy up ts-ignores

* pass arg for faucetable token contract

* add provider url to env vars and use in place of infura id, also update web3-connector to only allow the chain permitted by the app

* add type guard for erc20 assets

* fix intent shadow helper function, use arrow function for isEthereumError

* update etherscan link to use env vars for url base

* rename deposit related hooks to indicate read vs write calls

* move ethereum error class and helpers to react-helpers

* add use-ethereum-read-contract hook to contain fetch logic

* remove unused import

* move validation to lib, add hex check for vega public key

* use map for transaction modal states, pass confirmed prop to transaction dialog for deposits

* remove unused import for classnames
2022-04-06 10:34:51 -07:00
Joe Tsang
a459793f09
Task/Updated tests to pass when there are no transactions (#145)
* Updated tests to pass when there are no txs

* Add slack command to send messages to slack

* Re add library for Cypress

* Resolved PR comments

* Added TODOs for clarity

* Increase wait for block to update

* Increase to 3 seconds

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-04-04 18:20:33 +01:00
Bartłomiej Głownia
ad9344dd15 [#168] Add static app to host AlphaLyrae font 2022-03-31 09:11:29 +02:00
Matthew Russell
edce1c7869 rename graphql dir to types 2022-03-29 16:03:27 -07:00
Bartłomiej Głownia
30c990bb3e #128 Add positions library 2022-03-29 18:55:41 +02:00
Edd
23a3c8fdd3
Merge pull request #132 from vegaprotocol/feat/127-generalised-stats-page
frontend-monorepo-127 Generalize stats page to work for all environments
2022-03-25 11:43:35 +00:00
Matthew Russell
8e9c2e4080
Feat/105 Web3 Setup (#119)
* add deposit page

* add web3 provider using web3-react package

* add env setup, add guard for incorrect chain id

* add lib for web3-provider

* make wallet and ethereum connect dialogs look more consistent

* add setup tests file for jest-dom

* remove chain id config and just use appChainId prop, add disconnect button to invalid chainId state

* remove .env file for now, will complete as own ticket

* switch handling of connect dialog state to the consuming app

* rename web3-provider package to just web3

* envs for each environment so we can specify chainId

* remove fallback to testnet for apollo client creation

* make web3container enforce connection before rendering childen

* move infura id to env var
2022-03-25 00:44:10 -07:00
sam-keen
af5832fa9e Merge remote-tracking branch 'origin/master' into feat/127-generalised-stats-page
# Conflicts:
#	apps/stats/jest.config.js
#	libs/network-stats/src/config/types.ts
#	tsconfig.base.json
#	workspace.json
2022-03-24 12:21:44 +00:00
sam-keen
5d6147ec7e frontend-monorepo-127 Generalize stats page to work for all environments 2022-03-24 12:04:01 +00:00
Matthew Russell
6ad2a7676e
Feat/84 Order list (#89)
* 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
2022-03-23 12:08:10 -07:00
Sam Keen
05d53bbf4c
106 - migrate mainnet stats to monorepo (#107)
* Initial commit of generated mainnet-stats directory

* Migration partly complete

* Migration complete

* Vega logo now in ui toolkit

* Specified a port that stops conflicts with other e2e tests

* Extra config for swapping to port that stops conflicts with other e2e tests. Also file name case change

* Adding the Cypress project ID to allow recording

* fix test

* Mainnet stats manager moved into library

* Mainnet stats project now importing manager element from lib

* Block Explorer has mainnet stats on home route

* Styling tweak to stop mainnet stats tables trying to match heights

* Spacing alignment tweaks

* Changing header text and tests to align with other branches

* Correct header test for mainnet-stats app

* Correct h3 test for mainnet-stats app

* Fix linting issue

* fix casing issue for CI

* Corrected mistake in merge

Co-authored-by: Dexter <dexter.edwards93@gmail.com>
2022-03-23 17:40:15 +00:00
Bartłomiej Głownia
3e69e53c4e #29 Add market-list-table 2022-03-18 13:13:14 +01:00
Matthew Russell
313e6e1217
Feat/63 Deal ticket (#82)
* 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
2022-03-17 12:35:46 -07:00
Bartłomiej Głownia
8a829964be
Feature/38 data grid component (#77)
* Add ag-grid

* Add lazy loaded ag-grid component

* Add theme context, move VegaWallet to separate lib

* Fix trading app cypress configuration

* Lazy load ag-grid theme css files

* Encapsulate theme switch hook
2022-03-14 14:18:11 +01:00
Matthew Russell
bd77e15092 properly set up storage lib 2022-03-10 20:51:05 -08:00
Bartłomiej Głownia
290f5c68ad Extract tailwindcss config to libs 2022-02-23 16:29:07 -08:00
Dexter
159cdb6023 migrate stuff into new NX 2022-02-23 08:53:57 +00:00
Bartłomiej Głownia
355de1a32f Create a Mono-repo for DeFiUI + ui toolkit using nx 2022-02-11 15:02:11 +01:00