Commit Graph

106 Commits

Author SHA1 Message Date
Matthew Russell
9ece19869d
chore(trading): update order subs to not use busevents (#2849) 2023-02-03 16:12:20 -08:00
m.ray
7f1e47d7fd
fix(trading): remove price flash cell from PNL (#2829) 2023-02-03 14:59:24 +00:00
m.ray
b40358a723
fix(trading): consolidate view as user mode (#2778) 2023-01-31 16:04:52 +00:00
Bartłomiej Głownia
00e319b3c6
chore: handle not found errors as correct response (#2759) 2023-01-27 18:35:45 -08:00
Bartłomiej Głownia
b1280c8285
fix: hide close button if openVolume is zero (#2768) 2023-01-27 18:44:20 +00:00
Bartłomiej Głownia
98b5260d93
feat: fix positions and margins providers update (#2753) 2023-01-27 09:39:39 +01:00
Matthew Russell
a016feab2a
fix: dont use current value in update callback for estimate queries (#2721) 2023-01-24 21:33:55 +00:00
m.ray
e4ada295e2
fix(#2345): positions table link to markets (#2652) 2023-01-19 13:53:10 -08:00
Art
5ccef2de5e
feat: deposit and deal ticket transaction stores and toasts (#2495) 2023-01-19 13:10:52 +01:00
Dexter Edwards
f5b345636c
feat: view apps as any pub key (#2548) 2023-01-19 11:16:21 +00:00
Bartłomiej Głownia
1a6266e2ec
chore: fix data and no data message update issues in trading data grids (#2620) 2023-01-17 15:01:24 +00:00
Bartłomiej Głownia
4608683bde
feat(2408): trading data grid snags (#2513)
* feat: trading data grid snags

* feat: fix e2e tests, fix use order list data avoid rerender condition
2023-01-11 15:43:52 +01:00
m.ray
bbdc64582a
feat(#2465): vega-pink across frontend-monorepo (#2476)
* feat(#2465): change red to vega pink

* feat(#2465): change red to vega pink part 2

* fix: update vega.red to vega.pink

* feat: color the charts

* feat: color the charts

* feat: color the charts

* fix: use dark pink and green

* fix: use dark pink and green

* feat(#2467): color long/short toggle and place order button

* fix: colors wick showing within candle

* fix: remove opacity from chart

* fix: use vega dark pink and green for vol cell

* fix: toggle and button colors

* feat(#2465): toggle peer checked text white

* fix: add liquidity supplied gap-2 in tooltip data grid

* fix: add indicator temporarily

* chore: update colors

* chore: update from x-dark to vega-x

* fix: rename symbols

* chore: update sell candles to only use stroke as they are solidly filled

* fix: remove use state

* fix: remove network account types

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2023-01-06 16:58:55 +00:00
Radosław Szpiech
6cb2e3a3cf
chore: move mocks next to graphql queries (#2469)
* chore: move mocks next to graphql queries

* chore: mock functions rework

* chore: clean up
2022-12-23 12:36:25 +01:00
Matthew Russell
0b4f918208
chore(#2412): refactor theme context (#2435)
* chore: switch theme to zustand, delete context

* chore: switch apps/componenets to consume the hook

* chore: update storybook theme usage to use documentElement

* chore: dry up theme switcher listener for storybooks

* feat: optional theme param to allow toggling

* chore: add additional check for matchMedia function

* chore: change block explorer test to use light theme as its the default

* chore: remove unused headerprops for multisig-signer

* chore: remove unused props from theme switcher component

* chore: dry up validateTheme func

* chore: remove unused props from explorer header test

* chore: use new theme switcher in account history container
2022-12-20 18:55:35 -08:00
macqbat
b9ff2388db
chore(2415): get rid of polling queries on deal ticket (#2427)
* chore: get rid of polling queries on dael ticket

* chore: get rid of polling queries on dael ticket - fix tests

* chore: get rid of polling queries on deal ticket - fix linter

* chore: get rid of polling queries on deal ticket - fix linter

* chore: get rid of polling queries on deal ticket - adjust int test

* chore: get rid of polling queries on deal ticket - adjust int test in console-lite

* chore: get rid of polling queries on deal ticket - adjust unit some test

* chore: get rid of polling queries on deal ticket - adjust unit some test

* chore: get rid of polling queries on deal ticket - clean up some redundant types

* chore: get rid of polling queries on deal ticket - clean up some redundant files
2022-12-20 10:01:10 +01:00
macqbat
7d5cc9b080
chore: change name of the column (#2420) 2022-12-15 13:38:55 +01:00
m.ray
817521bb08
feat(#1853): ledger entries date filtering (#2267)
* chore: update ledger entries columns

* fix: yarn generate types against stagnet3

* fix: orderbook decimal places issue  (#2235)

* fix: positions table fixes notional dp (#2144)

* fix: update decimals on position notional size

* fix: normalize values

* fix: fix positions unit tests

* fix: remove liquidation price

* fix: positions linting issue

* fix: remove liquidation price test

* fix: remove total summary row

* fix: remove comments

* fix: cypress test to not show trailing 0s

* fix: add back liq. price est as cell only

* fix: remove not used params

* chore: merge with release/testnet

* fix: orderbook dp

* Update libs/positions/src/lib/positions-table.spec.tsx

* feat(#1853): use date range filter

* feat(#1853): add date range filter to ledger entries on update

* chore(#1853): add extra checks

* fix: update types on stagnet3

* fix: add checkpoint balance restore

* fix(#1853): fix ledger generic make data provider cast in ledger entries

* fix(#1853): fix transfer type

* fix(#1853): remove TransferTypeMapping cast type

* fix(#1853): remove pagination filtering and use formatForInput from date

* fix(#1853): call filterChangedCallback in onChange method

* fix(#1853): remove subscription from ledger entries table

* fix(#1853): filterChangedCallback called in useEffect gets triggered also on reset

* fix: use-order-list-data hook order of params for makeInfiniteScrollGetRows

* fix(#1853): fix ledger build import all as schema

* fix(#1853): fix schema import

Co-authored-by: maciek <maciek@vegaprotocol.io>
Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
2022-12-14 09:43:16 +00:00
botond
2211abbd72
chore: cleanup type gen (#2362)
* chore: remove apollo type gen and clean up types lib

* fix: format

* fix: tests

* fix: format

* fix: hammer token types til sh*t turns green

* fix: format

* fix: apparently format again

* fix: lint

* fix: build-specs

* fix: format

* chore: regen types

* chore: regenerate types again

* fix: format
2022-12-08 21:13:30 +00:00
Dexter Edwards
3e75d64e0d
chore: regenerate types (#2295)
* chore: regenerate types

* chore: remove unneeded type helper

* test: fix test

* chore: add wait for wallet dialog to disappear

* chore: add wallet teardown

Co-authored-by: sam-keen <samuel.kleinmann@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-12-01 15:23:13 +00:00
m.ray
081c9f44ae
fix: orderbook decimal places issue (#2235) (#2237)
* fix: positions table fixes notional dp (#2144)

* fix: update decimals on position notional size

* fix: normalize values

* fix: fix positions unit tests

* fix: remove liquidation price

* fix: positions linting issue

* fix: remove liquidation price test

* fix: remove total summary row

* fix: remove comments

* fix: cypress test to not show trailing 0s

* fix: add back liq. price est as cell only

* fix: remove not used params

* chore: merge with release/testnet

* fix: orderbook dp

* Update libs/positions/src/lib/positions-table.spec.tsx
2022-11-28 15:15:18 +00:00
macqbat
642bc8072b
chore: fix removing closed positions (#2230) 2022-11-25 14:56:59 +00:00
m.ray
fe447167ca
fix(#2200): handle NotFound GraphQL errors in async renderer (#2204)
* fix(#2200): handle NotFound GraphQL errors in async renderer

* fix(#2200): data provider filter apollo graphQL not found error

* fix(#2200): update apollo-client to not report not found error link

* fix(#2200): fix log on not found error link

* fix(#2200): fix set error in data provider

* fix(#2200): extensions type access via index signature

* fix(#2200): log gql errors that are not NotFound and still throw error in data provider

* fix: remove unused import
2022-11-24 15:52:46 -08:00
m.ray
41646086e4
chore(#2179): update number formatters across frontend-monorepo (#2182)
* chore: update stagnet3 urls

* chore(#2179): remove normalized number formatter functions and update getNumberFormat

* fix(#2179): fix unit tests on all formatters

* fix(#2179): fix some cypress tests

* fix: fix  trading-accounts.cy.ts

* fix: update staking and wallet teardown tests

* chore: add e2e run-all command

* fix: wallet-eth test

* fix: fix tests in explorer and token

* fix: fix common.functions.js

* fix: fix common.functions.js in explorer

* fix(#2179): fix common.functions.js in explorer

* fix(#2179): fix common.functions.js in explorer

* fix(#2179): fix common.functions.js in explorer

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-11-22 18:14:16 +00:00
Bartłomiej Głownia
7c0bed2f14
fix(#2153): improve positions table updates (#2187) 2022-11-22 19:03:09 +01:00
m.ray
0189b9c94e
fix: fixes around formatting numbers and arrange edit order dialog (#2178)
* fix: update size and order edit dialog

* fix: update decimals on position notional size

* fix: normalize values

* fix: fix positions unit tests

* fix: remove liquidation price

* fix: positions linting issue

* fix: remove liquidation price test

* fix: remove total summary row

* fix: remove comments

* fix: cypress test to not show trailing 0s

* fix: add back liq. price est as cell only

* fix: remove not used params

* fix: positions formatting in select market and format account numbers

* fix: remove import

* fix: remove redundant comment

* fix: fix unit tests

* fix: fix cypress tests
2022-11-18 19:00:38 +00:00
Bartłomiej Głownia
98a3d2267b
fix(#2153): use correct decimal places for marginLevels (#2163) 2022-11-18 17:07:51 +00:00
m.ray
b1fe10e6d4
fix(#2144): fix positions table notional value and remove total row (#2155) 2022-11-17 21:35:29 +00:00
Art
a3df65952d
feat: toast component (1677) (#1998) 2022-11-15 15:26:13 +01:00
Edd
e598cd1247
chore: update explorer to use v2 queries (#2049)
* fix: migrate queries to latest apis
* fix: remove oracles section for now
* fix: dive in to fields correctly
* fix: update queries
* fix: fragment for stats fields
* fix: rename triple underscore generated
* chore: refactor types that have moved
* chore(explorer): disable e2e test that asserts json structure
2022-11-15 12:31:25 +00:00
Bartłomiej Głownia
25699b6283
feat(#1643): orders table filtering (#2000)
* feat(#1643): add grid set filter, amend filters in orders table

* feat(#1643): strictly type variables in orders data provider

* feat(#1643): add date range param to orders query

* feat(#1643): add date range filter

* feat(#1643): handle data provider updates after variables change in ag-grid infinite row model

* feat(#1643): fix unit tests

* feat(#1643): use DateRangeFilter in positions table instead of agDateColumnFilter

* feat(#1643): add date range filter support to orders data provider

* feat(#1643): fix update functions

* feat(#1643): remove sortable from orders list columns

* chore: remove console.log
2022-11-10 11:08:13 -08:00
botond
df8a22a19e
chore: migrate withdrawals lib (#2009)
* chore: cleanup lib types

* chore: migrate withdrawals

* fix: withdrawals query and types

* fix: types

* fix: orders build

* fix: withdraws build

* fix: format

* fix: more build stuff in withdrawal lib

* fix: format

* fix: more withdrawal builds

* fix: format

* fix: orders build again

* fix: remaining build errors

* fix: format

* fix: withdrawal tests

* fix: trick git to pick up file rename?

* fix: rename back to orders

* fix: rename generated file
2022-11-10 14:13:58 +00:00
Bartłomiej Głownia
e4baf5caee
chore(#1932): make positions table fill available space (#1933)
* chore(#1932): make positions table fill available space

* chore: switch console-lite e2e fron stagnet to testnet
2022-11-02 12:45:18 +01:00
Bartłomiej Głownia
3415c8d86c
feat(1646): add positions table sorting and filtering (#1920)
* feat(1646): add positions table sorting and filtering

* feat(1646): add positions table sorting and filtering - fixes
2022-11-02 08:01:40 +01:00
Bartłomiej Głownia
1862ebbc6c
fix: change way how summary row is updated to avoid rerender (#1910) 2022-10-31 13:57:26 -07:00
Bartłomiej Głownia
13a77d1583
fix: order positions by market name instead of updatedAt (#1902) 2022-10-28 16:14:29 +01:00
Art
633c2ae526
chore: updated order rejection reason mapping, types regen (1808) (#1845) 2022-10-25 11:07:54 +01:00
Bartłomiej Głownia
3bc9d3386b
chore: use queries from graphql file on orders lib (#1843) 2022-10-25 11:42:36 +02:00
Bartłomiej Głownia
17f93c2b7e
chore: add build-spec targets and execute on affected apps and libs on CI (#1745)
* chore: add build-spec targets and execute on affected apps and libs on CI

* chore: fix market-depth and react-helpers specs typings

* chore: fix ui-toolkit specs typings

* chore: fix trades specs typings

* chore: fix orders specs typings

* chore: fix deposits specs typings

* chore: fix deal-ticket specs typings

* feat: fix tsc on specs check

* feat: fix tsc on specs check

* feat: fix tsc on specs check

* feat: fix tsc on specs check

* feat: fix tsc on specs check - fix token app

* feat: fix tsc on specs check - fix positions lib

* feat: fix tsc on specs check - fix environment lib

* chore: fix failling build-spec in positions lib

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-10-25 09:41:16 +02:00
Matthew Russell
d0976bbd46
Feat/522 close position (#1762)
* feat: use close position hook and dialog setup

* chore: update wallet tx interface for batch market instruction

* feat: add usage of data provider to show relevant order information

* feat: render correctly formatted values in close position dialog

* feat: make vega tx dialog more flexibly by allowing custom ui for every state of the tx

* feat: adjust text alignment and spacing between active orders and order to close

* feat: add unit tests

* chore: remove stray log

* chore: fix lint

* chore: ignore ts error for formatter function of vesting chart

* feat: split components up, memozie variables

* feat: add shared loading state to prevent content popping in

* feat: add time in force label

* feat: move transaction result hook to wallet lib

* feat: prevent being able to close vega tx dialog, must reject tx

* chore: add test for useTransactionResult hook

* chore: fix positiosn test after hook relocation

* Revert "feat: prevent being able to close vega tx dialog, must reject tx"

This reverts commit d1ecda69c3c55822bb042320f82b2e1c3833b99a.

* chore: add check for order edge to be defined

* chore: remove close callback

* feat: use tx result state to determine dialog state

* chore: update close position hook to check for transaction result

* fix: readd types tif selection persistance

* feat: convert order event func to be async, use it in close position for more result context

* fix: rename utils

* chore: adjust error language

Co-authored-by: Madalina Raicu <madalina@raygroup.uk>
2022-10-24 19:16:15 +01:00
Bartłomiej Głownia
ba9ad40ad2
chore: use optional chaining for ag-grid api (#1810) 2022-10-20 21:17:36 -07:00
Art
8d2fe118ec
chore: single position table (1645) (#1749)
* chore: single position table (1645)

chore: single position table (1645)

* chore: tests fixed

* chore: remove unused withSummaryRow arg

* chore: use ag grid value formatter type helper

* chore: update console-lite to use value formatter params helper

* chore: fix e2e test by ignoring pinned row

Co-authored-by: Rado <szpiechrados@gmail.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-10-19 16:59:36 -07:00
Radosław Szpiech
50df63c858
test: added tests to cover submit orders ac (#1708)
* test: added tests to cover submit orders ac

* fix: unit tests

* fix: mock subscription fixed

* fix: typo

* fix: lint

* fix(1593): remove ag-grid api presence check from providder update callbacks

* fix: unit tests

Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
2022-10-12 09:55:23 +02:00
Bartłomiej Głownia
9dfe8789d1
fix(1649): don't use old data on rerender when data update from provider is handled by component (#1707) 2022-10-11 13:52:35 +02:00
macqbat
2bf614afd2
chore: remove old type gen in positions (#1619)
* chore: remove old type gen

* chore: remove old type gen - small fixes

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-10-05 11:30:42 +02:00
macqbat
406b69566f
Feat/1491 insert accounts and positions (#1515)
* feat: inserts of new item in positions

* feat: inserts of new item in positions - move select-market to app dir

* feat: inserts of new item in positions - add delta to update

* feat: inserts of new item in positions - fix e2e mocks

* feat: inserts of new item in positions - fix e2e mocks

* feat: inserts of new item in positions - adjust e2e mocks

* feat: inserts of new item in positions - adjust e2e tests

* feat: inserts of new item in positions - adjust e2e tests

* feat: inserts of new item in positions - adjust e2e trading tests

* feat: inserts of new item in positions - adjust e2e account tests

* feat: inserts of new item in positions - adjust e2e account tests

* feat: inserts of new item in positions - adjust e2e account tests

* feat: inserts of new item in accounts - manage inserting new accounts

* feat: inserts of new item in accounts - adjust console-lite tests

* feat: inserts of new item in accounts - adjust console-v2 tests

* feat: inserts of new item in accounts - adjust console-v2 tests

* feat: inserts of new item in accounts - clean up after merge

* feat: inserts of new item in accounts - fixes after feedback

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-10-04 10:37:31 +02:00
Matthew Russell
4ed623c84c
feat#873): wallet service v2 (#1349)
* feat: update connect dialog to handle api v2

* feat: better error handling

* feat: update to only use strings for pubkey, add json rpc connector

* feat: make json connector follow same patterns as rest connector

* feat: add ability to change wallet location

* feat: add chain id fetch

* feat: improve types

* feat: adjust send tx types

* chore: remove dialog title and chain check temporarily

* feat: additional UI and error handling

* feat: rename keypair and keypairs to pubKey and pubKeys

* feat: make rest and json rpc connectors return consistent data

* feat: rename derived ids more clearly

* feat: update send_transaction response type

* chore: fix tests after context name change

* feat: add utils for wallet, add encode tx func

* feat: return null if tx is rejected

* feat: fix up styles for connect buttons

* feat: handle wallet version check

* feat: add chain id check

* chore: rename select pub key function to match, fix tests

* fix: tests for rest connector form

* feat: add tests for json rpc flow

* feat: connect dialog changes

* chore: change status to enum to avoid magic strings

* feat: add custom icons and handle provided key name

* chore: update global wallet connection e2d tests

* chore: change zod validation to only expected required values

* chore: ignore new generated code files

* chore: fix typos and add translations

* chore: set hosted wallet via env var and only show if not mainnet

* feat: add functionality for try again button

* test: fix failing tests

* chore: fix lint and test

* chore: remove double import

* chore: make console-lite-e2e strict so json connector compiles correctly

* chore: make token e2e tsconfig strict

* chore: make stats-e2e tsconfig strict

* feat: update json rpc request namespace

* feat: simplify connector setup, support try again

* chore: remove comment

* fix: build errors

* chore: make chainId check optional based on presence of appChainId, mock request for tests

* chore: mock chain id request for all apps on all pages

* fix: footer border on small screens

* fix: use beforeEach for chainId query mock

* chore: remove optional chain check, prevent rendering until fetch is complete

* chore: update NX_VEGA_WALLET_URLs as the application now appends the base path, adjust token tests

* fix: token e2e test that checks for pubkey name

* chore: remove duplicated test, update wallet title assertion

* fix: token tests

* fix: token e2e assertions

* fix: withdraw test

* feat: enable json RPC for token

* fix: sendTx command now accpets pubkey as separate arg

* fix: test to use gui option temporarily

Co-authored-by: Dexter <dexter.edwards93@gmail.com>
2022-10-03 11:12:34 -07:00
m.ray
907a4e256e
feat(#847): collateral table, add breakdown (#1442)
* feat: #847 show progress bar, margin accounts, no used/deposited

* feat: #847 add collateral tables

* fix: #847 add deposit asset type and fix tests

* feat: #847 show deposited value, avaliable and percentage used

* fix: #847 add styling fixes

* fix: #847 add deposit new asset button

* fix: #847 remove disabledSelect
to fix withdraw and deposit dialogs

* fix: #847 remove global reward from incoming - needs to be party specific

* fix: #847 integration tests

* fix: #847 default select deposit & withdraw

* fix: #847 default select deposit & withdraw

* fix: #847 pass asset id as default value

* fix:  #847 use only bigint no bignumber, remove NaN check

* fix:  #847 update deposit-form.spec.tsx

* fix: revert update on account fields

* feat: add storybook set up

* chore: ignore apollo errors - to be reverted after API will be fixed

* fix: container moved, progress bar in helpers

* fix: #847 UI tweaks around accounts container

* feat: #847 added useDepositAsset and useWithdrawAsset

* fix: #847 fix progress bar in accounts and positions

* feat: #847 add storybook

* fix: #847 added tooltip and updated filtering

* chore: #847 add get account data test

* fix: #847 fix lint and type in account story

* fix:  #847 update data provider

* fix: #847 fix get account data dry & lp link

* fix: #847 fix breakdown table test

* fix: #847 account data provider test

* fix: #847 remove deposit new asset button - subscription does not display a
sset data

* fix: #847 add defaultValue in select otherwise default is not set up

* feat: #847 update data provider update method and tables

* fix: #847 fix accounts tests

* fix: #847 remove unused getRows

* fix: add decimals

* fix: #847 fix imports

* fix: update ids

* Update apps/trading/pages/liquidity/[marketId].page.tsx

* fix: #847 accounts update method check delta

* fix: #847 use vega value formatters and cell renderers

* fix: #847 fix imports

* fix: #847 handle new account else block comment

* fix: accounts and breakdown tables

* fix(#847): account data provider improvments

* fix: #847 fix formatters null check and add param

* fix: #847 fix withdraw test and mock the hook

* fix: #847 fix console lite grid select market test

* fix: console lite build

* fix: revert withdraw limits

* fix: remove redundant waitFor use vega cell renderer

* fix: breakdown display only use accounts

* fix: breakdown display only use accounts

* fix: updated accounts table

* fix: move update inside try useWithdrawAsset

* fix: update trading-accounts test

* fix: portfolio-page.test.ts

Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
2022-09-29 17:40:44 -07:00
Matthew Russell
8bffc05be2
fix: ensure sub is cancelled if dialog is closed (#1472)
* fix: ensure sub is cancelled if dialog is closed

* fix: pass transaction object in use proposal hooks
2022-09-28 12:34:49 -07:00
Bartłomiej Głownia
414b8ced13
chore: fix positions data provider restarts (#1509) 2022-09-27 15:02:48 -07:00