Commit Graph

525 Commits

Author SHA1 Message Date
dexturr
e63e17f173 chore: update tranches
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-01 08:04:12 +00: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
botond
bf07dac445
feat(#372): fractional orders (#486)
* feat: add positionDecimalPlaces prop to market query and regenerate types

* feat: add stepper to order amount input

* feat: convert fractions back to integers when submitting the order

* refactor: move order transformations into hooks

* fix: formatting

* fix: simplify toDecimal calculation

* fix: remove redundant function for size calculation

* fix: add new prop to e2e test mock generator

* feat: add tests for order validation

* fix: lint

* chore: add validation to the simple trading app order form

* fix: lint
2022-05-31 15:20:01 -07:00
dexturr
707ccc0136 chore: update tranches
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-31 08:04:28 +00: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
dexturr
44630fcd6b chore: update tranches
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-30 08:04:23 +00:00
dexturr
dfa59afe60 chore: update tranches
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-29 08:04:24 +00:00
dexturr
4b01a62a83 chore: update tranches
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-28 08:04:03 +00:00
Dexter Edwards
29e6cb5074
feat: use new smart contracts sdk (#479) 2022-05-27 10:44:10 -07:00
Elmar
da0536f8a8
feat(console-lite): add portfolio screen and accounts container (#485) 2022-05-27 12:28:55 +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
Dexter Edwards
d858d9cf8a
feat: port over smart contracts repository into the monorepo (#458) 2022-05-27 10:22:18 +01:00
dexturr
a7df669f8a chore: update tranches
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-27 08:04:03 +00:00
dexturr
1381268271 chore: update tranches
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-26 08:04:47 +00:00
Dexter Edwards
96183bea36
Add capsule workflow (#278)
* begin capsule workflow

* remove workflow file we don't want to run while debugging

* vheckout all require repos

* checkout repos to a directory each

* correct branch names

* rename workflow

* fix incorrecr branch name

* begin building binaries

* typo

* remove tests we don't want running while debugging

* remove tests we don't want running while debugging

* typo

* incorrect path

* comment out frontend checkout

* don't install as not done in example script

* add required environement variables

* change paths

* comment out FEM checkout

* check binary built properly

* path stuff

* silly mistake

* use relaive path

* correct working directory

* fix all paths

* debugging

* bump go verion

* fix path

* fix all paths

* fix cannot find config error

* add back in fe stuff

* move cehckout to where it is used

* revert accidentally committed change

* try install over build

* use v3 of action

* export as per action

* debugging

* don't pass path to install

* chnage go install

* change order

* pwd

* pwd

* see what happens without dn

* don't use relative path

* build correct paths

* remove checks as working

* make epxlorer run against locla capsule

* fix incorrect env file

* fix tests

* fixing tests

* trying for green run

* trying for green run

* bump timeout

* check tm endpoints

* configure to use the second tender mint node

* ci: add logs out

* ci: change paht

* ci: set env var correctly

* ci: remove wait for blockChain request

* ci: make test value assertions more robust

* ci: make test value assertions more robust

* chore: minor typo

* ci: add back test and lint scripts

* ci: comment out unused pipeline for now

* ci: break up job into steps

* ci: run all tests and pray it works

* ci: just use local vega wallet

* ci: not building it any more, use go installed bin

* ci: derive hashes properly

* ci: move existing folow into nightly

* ci: run nightly for all tests

* ci: use install bins

* ci: add missing flag

* ci: gobin

* ci: debugging

* ci: echo gopath

* ci: wrong syntax?

* ci: one last time?

* ci: try something else

* ci: try other things

* ci: again

* ci: move var to github env

* ci: set gobin

* ci: syntax

* ci: test out nightly

* ci: switch back nightly to posix

* ci: force network bootstrap

* ci: fix stupid mistake, pass falg to command not name

* ci: put test back

* ci: run on push as well as on pr

* ci: always upload logs if possible

* ci: import config from capsule rather than testnet

* Update apps/explorer-e2e/cypress.json

* test: fix failing test now we are using binaries

* ci: correct URL
2022-05-25 11:05:13 +01:00
Dexter Edwards
d601c7f653
fix: use static tranches data (#454)
* fix: use static tranches data

* fix: lint

* refactor: use fetch rather than custom implementation

* fix: make error handling consistent for useTranches

* Revert "fix: make error handling consistent for useTranches"

This reverts commit 357cbc45f8.

* Revert "Revert "fix: make error handling consistent for useTranches""

This reverts commit 14f84608dd.

* fix: render loop
2022-05-25 10:50:38 +01:00
dexturr
4e5e2b4dc3 chore: update tranches
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-25 08:04:24 +00:00
Dexter Edwards
103793c6f6
Ci/fix auto commit (#451)
* ci: test branch is behaving the same as master

* chore: update tranches

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

* chore: update tranches

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

* ci: identical file

* chore: update tranches

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

* ci: set github token

* chore: update tranches

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

* ci: github env nessecary?

* chore: update tranches

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

* ci: move back to cron

Co-authored-by: dexturr <dexturr@users.noreply.github.com>
2022-05-24 10:19:44 +01:00
Dexter
523ed80be0 ci: put token in correct place [skip netlify] 2022-05-24 09:37:27 +01:00
Dexter
07939bc391 ci: test token access control fix for tranches query 2022-05-24 09:30:27 +01:00
Dexter
510d42a1cd ci: fix token 2022-05-24 09:28:31 +01:00
m.ray
13199ab006
fix: [#445] use markPrice if there is no candle last (#450) 2022-05-23 18:23:14 +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
Elmar
d9fccb137e
Feature/simple trading drawer (#435)
* feat(simple-trading-app): add drawer component to ui-toolkit

* feat(simple-trading-app): use drawer component and add navigation routes

* feat(simple-trading-app): move drawer out of ui-toolkit and into simple trading

* feat(simple-trading-app): remove suspense for now as nothing gets lazy loaded

* feat(simple-trading-app): add simple market list into routes
2022-05-23 10:43:08 +01:00
John Walley
497d3738ce
feat(charts): enable removing overlays (technical indicators) from chart (#407)
* chore(deps): update dependency pennant to v0.4.9

* Update pennant

* build: remove typo in lock file
2022-05-23 10:36:32 +01:00
Joe Tsang
aec94f0354
test: update test for network parameters table (#300) (#408)
* test: update test for network parameters table (#300)

* fix: lint
2022-05-23 10:32:05 +01:00
Joe Tsang
aa28f2cac1
chore: update readme and allow env file for local variables (#432)
* chore: update readme and allow env file for local variables
style: lint

* chore: resolved PR comments

* fix: lint and tests failures
2022-05-23 10:05:53 +01:00
Matthew Russell
38352c511f
Chore/315 remove blueprint from token dapp (#423)
* fix: nav colors

* chore: replace blueprint progress bar

* chore: remove blueprint overlay and no unused components

* feat: add radio group to ui-toolkit

* feat: adjust disabled opacity and use radio in forms on staking flow

* chore: rename RadioItem to just Radio

* chore: replace country selector with plain select

* fix: key prop warnings

* feat: convert token drawer from blueprint drawer to radix dialog

* chore: remove blueprint core and blueprint select dependencies

* fix: add missing data test id for header title

* fix: spacing on token disassociate page

* fix: missing key props on vesting chart

* feat: update radio button design

* style: radio button UI tweaks

Co-authored-by: PeteWilliams <me@petewilliams.info>
2022-05-23 10:04:15 +01:00
Sam Keen
34502a7c7f
frontend-monorepo-436 Env var files 'devent' typo (#437) 2022-05-23 09:51:19 +01:00
Dexter Edwards
29c3ed5180
fix: correct decimal places in network params table (#416) 2022-05-20 11:13:35 +01:00
macqbat
ef18ac8483
Feature/356 view a list of markets page and show additional useful information (#419)
* 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

* simple market app - simple market list - initial commit

* simple market app - simple market list - add some new changes

* Resolve conflicts after rebase
Initial commit after nx create

* Add stepper component to simple trading app

* simple market app - simple market list - remove wrongly added file after rebase

* simple market app - simple market list - proposals of layout frame and percent change calculation

* simple market app - simple market list - proposals of working solution

* feat: [simple-app] - simple market list - clean up gQL queries

* feat: [simple-app] - simple market list - indicate no auctionEnd

* feat: [simple-app] - simple market list - a bunch of changes after review feedback

* feat: [simple-app] - simple market list - get expire date from instrument tag

* feat: [simple-app] - simple market list - a bunch of small improvements

Co-authored-by: Elmar Gasimov <elmar@vegaprotocol.io>
Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-05-20 11:21:46 +02:00
botond
a352702bc5
Feat/Input prepend and append elements (#402)
* add custom element support to inputs

* use classnames instead of template literals
2022-05-20 09:42:11 +01:00
Ditmir-Vega
348badca2a
Test/add test for successful deposit (#399)
* add test for successful deposit

* update tests for deposits page to use magic strings

* remove unused variable

* used vegapublickey variable
2022-05-19 16:37:04 +01:00
Joe Tsang
5339788e87
test: increase timeout for token test (#428)
* test: increase timeout for token test

* fix: lint
2022-05-19 15:12:43 +01:00
botond
a89b2815ee
Fix/Use the rationale field on Proposals (#406)
* remove freeform from proposal query and replace it with the rationale field

* fix: regenerate types and fix proposal names getter

Co-authored-by: Botond <fekbot@gmail.com>
2022-05-19 12:12:13 +01:00
Sam Keen
4034e14120
frontend-monorepo-415 Explorer syntax highlighter CSS does not appear to be working (#418) 2022-05-17 15:40:29 +01:00
Matthew Russell
5a00ad8361
fix: flakey cypress test runs (#409)
* fix: wait for aggrid to render before asserting

* fix: mock markets manually and move wait for aggrid to init
2022-05-17 10:07:53 -04:00
botond
6800f22064
Feat/callout icon (#394)
* add icon prop to callout component

* add story example for custom icon node

* destructure props in fn args

* add accessibility props to callout icon

* remove redundant props

* add loading state to callout

* render loader first

* fix lint

Co-authored-by: Botond Fekete <fekbot@gmail.com>
2022-05-17 15:46:03 +02:00
John Walley
ad2d81eba3
chore(deps): update dependency pennant to v0.4.9 (#393) 2022-05-17 09:20:22 -04: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
b10432fdf3
Ci/generate tranches (#401)
* ci: generate tranches

* some tidying

* first run done locally

* ignore auto generated files for linting

* fix ignore
2022-05-17 13:26:04 +01:00
Dexter Edwards
04a9ef4ada
chore: add commit lint (#398) 2022-05-16 13:36:03 -04:00
John Walley
dca1af7391
Feat/246 Add candle chart controls (#281)
* Add candle chart controls

* Improve dropdown menu styling

* Use latest pennant version

* Use translation helper

* Square off highlighted corners
2022-05-13 14:08:32 +01:00
Sam Keen
492eef0fd0
Feat/304 token tailwind 2 (#396)
* remove staking page scss and invalid class for buttons

* remove pending stake and staking form scss

* make eith wallet buttons fill space

* convert app banner and app footer to tailwind

* remove low hanging fruit css

* add spacing back to home page

* fix spacings on various pages

* remove custom text helpers and replace with tailwind

* Loader component scss to tailwind

* Locked progress scss to tailwind

* Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html

* Page template scss to tailwind

* Splash error scss to tailwind

* Splash loader scss to tailwind

* Token-input scss to tailwind

* Stateful button scss to tailwind

* Transaction button scss to tailwind

* Transactions modal scss to tailwind

* Modal scss to tailwind and improved structure

* vega-wallet scss to tailwind

* wallet-card (and child components in other files tweaked) scss to tailwind

* Token details scss to tailwind

* Home scss to tailwind

* current-proposal-state scss to tailwind

* current-proposal-status scss to tailwind

* Tweak of modal scss to tailwind

* vote-buttons scss to tailwind

* vote-details scss to tailwind

* vote-progress scss to tailwind

* tranche-table scss to tailwind

* vesting-table scss to tailwind

* withdrawals scss to tailwind

* removed reliance on colors.scss from styles.scss

* convert tranche item scss

* delete unused colors and fonts scss files

* convert styles.scss to regular css

* Tweak to token e2e tests to account for classname removal

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 12:12:30 +01:00
Sam Keen
e0bcfe7bbe
Feat/231-explorer-infinite-loading-blocks (#306)
* Making a start with react-window-infinite-loader for the blocks infinite scrolling

* WIP block explorer infinte scroll

* WIP pairing

* pairing tidying

* Applied refetch url params more cleanly, moved useFetch to react-helpers lib

* Add notice of new blocks created since page load, some cleanup of blocks-infinite-list.tsx component

* Attempting a refresh of the 'new blocks' value in blocks-refetch.tsx

* Correctly updating state based on previous value

* Update libs/react-helpers/src/hooks/use-fetch.ts

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>

* Update libs/react-helpers/src/hooks/use-fetch.ts

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>

* Update apps/explorer/src/app/components/blocks/blocks-refetch.tsx

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>

* Cleanup from convos and PR

* Prettier formatting

* struggling with websocket tests

* struggling with websocket tests

* Progress on websocket tests for blocks-refetch.tsx

* Tests for blocks-refetch

* Tests for blocks-infinite-list

* Scroll test for blocks-infinite-list

* Defined NOOP in blocks-infinite-list.tsx

* Separate web sockets for each test

* Separate web sockets for each test

* Tweaked e2e tests to account for blocks taking longer to load

* fix tests

* Removed nx knowledge of empty simple-trading-app-e2e for now

* mock at use fetch level instead of at fetch level

* fix edge cases and add further tests

* fix failing e2e tests

* rename test

* Update apps/explorer-e2e/src/support/pages/blocks-page.ts

* Update apps/explorer-e2e/src/support/pages/blocks-page.ts

* rename

* test: use explicit wait for rather than times

* style: remove console

* test: correct env file

* Revert "test: correct env file"

This reverts commit d01d3cfa5e.

* think env var is incorrect

* correct env file

* fix flakiness

* add minor wait for test flakiness

* longer timeout

Co-authored-by: Dexter <dexter.edwards93@gmail.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 12:03:08 +01: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
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
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