Commit Graph

451 Commits

Author SHA1 Message Date
Matthew Russell
b5788379a3
add build netlify command and netlify.toml for token dapp (#302) 2022-04-26 07:32:23 -07:00
Joe Tsang
ceab1cbac4
Test for accounts (#285) 2022-04-26 14:58:52 +01:00
Joe Tsang
cd343cc1fe
UI test for positions table (#290)
* Positions test passing with mocks

* Update position mocks with changes

* Use Cypress env for public key in mock
2022-04-26 14:20:31 +01:00
John Walley
021b78dcbb
chore(deps): update dependency pennant to v0.4.7 (#288) 2022-04-25 14:44:12 -07:00
Michael Campbell
388bbd961c
Update README with set up instructions (#279)
* Update README.md

* Update README.md

added detail about env vars and networks.

* Fix typo

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

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
2022-04-25 10:35:01 -07:00
John Walley
ba19b5acca
Candle/depth chart switcher (#284) 2022-04-25 10:34:07 -07:00
Bartłomiej Głownia
2cdf349641
Limit number of warnings in tests (#298) 2022-04-25 17:33:49 +01:00
Sam Keen
3354fbb0c2
frontend-monorepo-267 Reduce total staked to 2 decimal precision (#282)
* frontend-monorepo-267 Reduce total staked to 2 decimal precision

* Tweak to formatNumber to allow fixed decimal specificity

* Setting default value for the 'defaultPrecision' argument in the function signature of 'addDecimal'
2022-04-25 15:28:31 +01:00
Dexter Edwards
ce5d7bc15b
run nx format (#295) 2022-04-25 15:03:58 +01:00
Matthew Russell
037108b4d7
dont capitalize deterministic id as change is being made in data-node (#293) 2022-04-25 14:39:09 +01:00
Matthew Russell
899277e6d4
Fixes for workflows (#291)
* change to setting envars rather than passing in via CLI

* update nx to latest patch version

* add env files for token-e2e, fix lint and ts errors

* move generate functions to mocs for trading e2e to avoid violating boundary rules

* add jsx compiler option for trading-e2e

* downgrade nextjs

* add testing-library to types declaration where required
2022-04-22 17:51:18 -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
Sam Keen
f0e4aded3a
Feat / 94 toggle button (#223)
* Toggle button built ui-toolkit

* Rewrote controlled toggle button story without args

* Fixed ts args issue using ComponentStory element

* Wrapped controlled version of buttons in a form for Storybook to stop light and dark theme scope collisions

* More toggle tests

* Update libs/ui-toolkit/src/components/toggle/toggle.stories.tsx

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

* Displays checked state as text for controlled toggles in storybook

* Used classnames helper

* Added toggle to deal ticket

* Simplified the toggles array type to allow any number of toggles, removing the need for a cast

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
2022-04-20 12:58:50 +01:00
Daniel
4c350a74d0
feat: add .env file for vegacapsule in the explorer app and instruction to setup explorer app with vegacapsule (#269) 2022-04-20 12:08:18 +01:00
Joe Tsang
f0fdecb490
Test/234 switch public key (#254)
* Test for switching public key

* Add missing variable

* Add background step

* Fix yaml error

* Increase timeout for cy.wait

* Assert pub key using Cypress env variable

* Fix module error

* Add string

* Remove timeout

* Removed react-helper import and added Cypress env variable
2022-04-19 12:12:08 +01:00
Joe Tsang
09e4603eec
Test passing for trades list (#262)
* Test passing for trades list

* Remove log and change file to ts

* Update regex to include different date format
2022-04-19 10:57:08 +01:00
Joe Tsang
753cff95b9
Test/249 convert js files to ts (#255)
* Explorer-e2e files changed to ts

* Files on trading app converted

* Fix type error and update Cypress

* Remove Jquery type

* Update Cypress version in package.json
2022-04-14 09:33:20 +01:00
Edd
6079e2027d
Fix IPFS change detection
nx affected `head` was set to `master` instead of `HEAD`, which cause every commit to detect a change and deploy.

- Fix head argument for nx affected command
2022-04-13 09:35:09 +00:00
Joe Tsang
7aea742677
Test added for stats page (#199)
* Test added for stats page

* Removed implicit waits

* Switch to use Cypress env

* Fix lint error
2022-04-13 09:31:23 +01:00
Matthew Russell
49169e5755
Fix/Loader size, token refetch, order dialog and deposits subscription (#228)
* fix loader size, balance refresh after faucet and string interpolation of market name in order dialog

* fix ts errors

* remove ts-ignores

* remove 0x from pubkey before starting sub for deposit event

* add remove0x helper
2022-04-12 11:41:07 -07:00
Dexter Edwards
04669bf9ad
Fix/213 total staked not showing (#242)
* total staked should show

* format number correctly with the correct number of decimal places
2022-04-12 11:18:58 -07:00
Edd
1029c5bfa2
Update IPFS deploy step
Missing yarn install
2022-04-12 13:41:01 +00:00
Edd
d357ead26e
Merge pull request #250 from vegaprotocol/chore/fleek-nx-affected-fix
Fix IPFS deploy step
2022-04-12 14:37:50 +01:00
Matthew Russell
04872522d6
Task/229 Stub api in trading e2e (#211)
* add fixture for markets query

* stub graphql requests

* re-add assertion for tx hash, stub command/sync requests

* refactor to get tests to run with trading page mocked queries

* add test wallet credentials

* split up markets page from trading page

* add portfolio page feature, add market page scenarios

* move hasOperationName helper to support/index

* fix home-page.feature

* fix missing feature step

* Minor changes to BDD steps

* Use in object syntax to get better type safety on hasOperationName helper function

* remove bypass placing orders env var and usage in tests

* use UI_Trading_Test wallet publick key in command/sync mock

* move public key to cypress env

* replace fixtures with generator functions

* colocate query generators with queries

* add custom commands, add index files

* fix dodgy merge, remove duplicate market page feature

* make tsconfig for cypress lib match

* update tsconfig for explorer e2e so commands using merge work

* revert trading step to js

Co-authored-by: Joe <joe@vega.xyz>
2022-04-12 12:04:26 +01:00
Edd
e41f9f455c
Fix IPFS deploy step
After #244, and setting up the appropriate ENV var, I forgot to explicitly make it available in the build step that needs it.

- Update IPFS action
2022-04-12 10:13:20 +00:00
Edd
3db9546266
Merge pull request #244 from vegaprotocol/chore/fleek-nx-affected
Add conditional IPFS deployment for projects
2022-04-12 11:06:03 +01:00
Edd
ad4c7d88ff Review feedback: better affected detection that avoids collisions 2022-04-12 10:52:10 +01:00
Edd
d1e50208aa Review feedback: remove redundant check 2022-04-12 10:48:15 +01:00
Sam Keen
c81766dd20
Feat/183 explorer link colours (#203)
* shift to pink instead of yellow for light theme

* frontend-monorepo-183 Trial removing link colour entirely, just bold and underlined
2022-04-12 09:00:50 +01:00
Sam Keen
c588745819
Fix/233 Improved input legibility for placeholder and typed text (#236) 2022-04-11 17:02:16 -07:00
Edd
47f1f73582 Update workflow to remove pre-script nx affected 2022-04-11 18:55:59 +01:00
Edd
bfdb1e0b62 Rewrite ipfs-deploy to work differently
Feedback on the initial PR pointed out the flaw that just assuming
that the previous commit was HEAD~1 would be inaccurate, so this
rewrite instead fetches the appropriate commit for each Fleek project,
does the appropriate nx affected call, and triggers a deploy.

This allows for each project to independently get deployed only when
there is a change that affects it on master.

The script is written to have no dependencies, and lazily uses curl
instead of node http. It feels a bit icky, but for a build script feels
reasonable. Also as the header comment notes, it seems like an nx build
script would be more appropriate, but because it needs the appropriate
commit for each project, I resorted to a shell script.

- Rewrite ./tools/ipfs-deploy.js
2022-04-11 18:51:32 +01:00
Elmar
a170663564
Upgrade React Router Dom v6 (#247) 2022-04-11 18:10:36 +01:00
Joe Tsang
446f7b13d8
Additional tests in mobile resolution (#225)
* Additional tests in mobile resolution

* Update toggle variable name
2022-04-11 18:09:54 +01:00
Joe Tsang
e92408e31d
Test for market table (#238)
* Test for market table

* Remove old method

* Fix typo

* Add braces and curly lint
2022-04-11 16:35:38 +01:00
Edd
079d09e3d9 Hardcode commits to last master commit 2022-04-11 14:56:55 +01:00
Edd
0e13248bee Address review comments 2022-04-11 14:54:10 +01:00
Edd
62944b89cd
Remove redundant check
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
2022-04-11 14:45:45 +01:00
Edd
5ec6759ca1
Merge pull request #237 from vegaprotocol/feat/232-collapse-block-with-no-txs
Feat / 232 collapse block with no txs
2022-04-11 13:44:34 +01:00
Edd
32cef6ef0c Genericise tool name, add workflow 2022-04-11 12:42:22 +01:00
Edd
463bb2e360 Add fleek file for stats, and script to run it if affected 2022-04-11 12:12:40 +01:00
Edd
88604959f4 Remove unused publish step 2022-04-11 12:12:07 +01:00
Edd
3804e5398b
Merge pull request #241 from vegaprotocol/fix/240-test-error
Resolve circular dependency in tests
2022-04-11 11:58:58 +01:00
Dexter Edwards
c50bb19e97
change engines to allow anything about 16.14.0 (#235) 2022-04-11 11:58:40 +01:00
Dexter
9fcd79a1a3 resolve circular dependency 2022-04-11 10:04:21 +01: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
sam-keen
68761a270b collapse block with no txs 2022-04-08 13:46:59 +01:00
Matthew Russell
dbd0514515
Fix/177 add check for gridref.current.api before using methods (#215) 2022-04-07 15:27:34 -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
Edd
41303190f8
Remove custom ignore (#221) 2022-04-07 12:24:04 +01:00