Commit Graph

122 Commits

Author SHA1 Message Date
Dexter Edwards
4f3409c106
fix: broder colour wrong for tranches overview (#894) 2022-07-28 14:44:29 +01:00
Sam Keen
70aae5003d
Fix/898: Avatar images now only displaying if avatarUrl is valid (#899) 2022-07-28 14:43:17 +01:00
Matthew Russell
11be7aaa8a
refacotr: deposit manager (#867)
* refactor: deposit manager with a zustand store and refetching balances after contracts complete

* refactor: remove assetId query string functionality

* chore: remove unused import

* chore: add a comment with a link to code explanation

* refactor: capture errors from deposit value get functions

* refactor: add error handling for async perform funcs

* feat: add assets to react helpers for types and erc20 check
2022-07-28 13:23:59 +01:00
Radosław Szpiech
f1c3eab914
test(token): validations added for vega wallet widget (#885)
* test(token): validations added for vega wallet widget

* test: add missing vega wallet import

* test: add validation for url value

Co-authored-by: Rado <rado@vegaprotocol.io>
2022-07-27 16:46:30 +02:00
Sam Keen
e3dd73531c
Fix/872: Remove useThemeSwitcher from Token as it's redundant and was stripping dark class (#886) 2022-07-27 15:30:29 +01:00
Sam Keen
6382d3fb22
Fix/881: Removed testing message in proposals list voteStatus (#882) 2022-07-27 13:45:38 +02:00
Dexter Edwards
e275460c76
feat: allow default wallet url to be configured (#875)
* feat: allow default wallet url to be configured

* docs: add docs to environement package
2022-07-27 11:28:29 +01:00
Sam Keen
aa0be2b3e8
Feat/671 Proposal listings page (#733)
* frontend-monorepo-671: Removed old proposal list intro text

* frontend-monorepo-671: Proposals sorted into open and closed state

* frontend-monorepo-671: Proposals also sorted by date, and sorting functions memoized

* frontend-monorepo-671: Updated proposal header for new text and i18n support, updated test

* frontend-monorepo-671: Eth wallet connect button full width

* frontend-monorepo-671: Proposal tests for primary text fixed

* Frontend-monorepo-671: Updated proposal description and tests. Included translations

* Frontend-monorepo-671: Small structural refactor

* frontend-monorepo-715: Added required translations

* frontend-monorepo-715: Proposals list item details

* frontend-monorepo-715: Proposals list item styling

* frontend-monorepo-671: Tests for proposals-list-item-details.tsx

* frontend-monorepo-671: Tests and tweaks for proposals-list.tsx

* frontend-monorepo-671: Reusable test components pulled into test-helpers

* frontend-monorepo-671: Proposals list text filter and tests (partially working tests)

* frontend-monorepo-671: Refactoring generateProposal to clobber rather than merge old arrays

* frontend-monorepo-671: Readded commented out tests

* frontend-monorepo-671: Removed empty files

* frontend-monorepo-671: Made more use of generateProposal overrides

* frontend-monorepo-671: Run prettier

* frontend-monorepo-671: Fixed linting errors

* frontend-monorepo-671: PR suggestions

* frontend-monorepo-671: Used 'describe' and improved test descriptions

* frontend-monorepo-646: PR improvement

* frontend-monorepo-671: Tweak to basic cypress tests

* Frontend-monorepo-45: Adjusted proposal filter and tests to remove rationale

* Frontend-monorepo-45: Removed accidentally duplicated test

* frontend-monorepo-671: More clarity for freeform proposal header

* frontend-monorepo-671: resolve master

* frontend-monorepo-671: Added issue number in comment for proposal rationale

* frontend-monorepo-671: Added issue number in another comment for proposal rationale

* frontend-monorepo-671: Mock timers added for proposals-list-item-details.spec.tsx

* frontend-monorepo-671: Mock timers added for proposals-list.spec.tsx

* frontend-monorepo-671: Improved styling to differentiate open vs closed proposals

* Fixed previous incorrect resolution of master
2022-07-26 21:10:49 +01:00
Sam Keen
6f374264c0
Feat/45 - Validator list (#833)
* frontend-monorepo-45: Removed party data from validators table

* frontend-monorepo-45: Removed redundant query fields

* frontend-monorepo-45: Validator AG Grid working and fields formatted

* frontend-monorepo-45: Removed old node list tests (as now handled by AG Grid)

* Frontend-monorepo-45: Removed unwanted auto-added imports

* Frontend-monorepo-45: Fixing cypress tests

* Frontend-monorepo-45: Removed unnecessary class added as part of layout test

* Frontend-monorepo-45: Removed unnecessary refactor added as part of layout test

* Frontend-monorepo-45: Removed unnecessary grid export added as part of grid setup

* frontend-monorepo-45: Removed unwanted font-size and adjusted avatar size in proportion

* frontend-monorepo-45: Expanded node-list tests

* frontend-monorepo-45: Used toString on translations to make node list coldefs a bit clearer

* frontend-monorepo-45: Converted nodeFactory to use lodash merge and PartialDeep

* frontend-monorepo-45: Refactored so node list AG grid field names are decoupled from translations

* frontend-monorepo-45: Added refreshing when epoch changes

* frontend-monorepo-45: Used epoch data already passed to node list instead of a new query

* frontend-monorepo-45: Node list - used formatNumber from libs/react-helpers

* frontend-monorepo-45: formatNumber now accepts BigNumbers
2022-07-26 20:26:12 +01:00
Matthew Russell
b7f08def47
refactor: handle Ethereum dialog state from hook (#851)
* refactor: pass dialog down from hook

* feat: convert dialog to be returned as component

* chore: fix linting
2022-07-25 14:23:20 +01:00
Matthew Russell
e47298761a
Feat/Use callStatic to improve error messaging (#831)
* feat: make use max only use account balance, add custom max messages

* fix: withdraw threshold limit display

* feat: add callstatic to ethereum transaction hook

* feat: improve types for useTransaction hook

* chore: fix types and remove ts-ignore

* chore: convert all smart contract wrapper methods to match metaclass methods

* fix: this context for calling tx

* chore: fix comment and any type

* chore: typo

Co-authored-by: Edd <edd@vega.xyz>

Co-authored-by: Edd <edd@vega.xyz>
2022-07-25 09:48:19 +01:00
Matthew Russell
9ae2d6a8fa
chore: remove rationale field from proposals query (#817) 2022-07-19 17:31:46 +01:00
Matthew Russell
7c2a84805e
fix(#441): withdraw fixes
* chore: make sure etherscan links open in new tab

* fix: format withdrawal amount correctly in table

* fix: switch to use next Link element so page state not lost

* fix: calc deposit max validation using ethereum storage at

* fix: remaining amount in deposits and refetch allowance

* fix: page background in dark mode

* chore: disable autocomplete for ethaddress

* fix: bump ag grid row size so underline is shown on FF

* fix: expect correctly formatted withdrawal amount

* fix: missing react keys in maps

* fix: complete button text in test

* fix: use sentry/react, fix webpack config path
2022-07-18 22:11:53 +01:00
Sam Keen
936f849cef
Feat/Intro to staking page (#736)
* frontend-monorepo-646: Staking intro tweaked and tests amended

* frontend-monorepo-646: Sorting grid placements and setting a fixed width for the main content area on larger screens

* frontend-monorepo-646: Removing some redundant elements and tweaking some tests

* test: fixes ahead of ui changes

* test: lint

* test: remove unused import

* test: renabling tests

* test: fixes

* test: fixes to catch up with last PR

* test: removal of tests no longer required

* test: removal of unused import

* Update apps/token/src/i18n/translations/dev.json

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

* frontend-monorepo-646: Updated staking text

Co-authored-by: AndyWhiteVega <andy@vegaprotocol.io>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
2022-07-18 14:12:36 +01:00
candida-d
b80cbc916b
chore: add context to "no VEGA" message (#793) 2022-07-18 13:00:18 +01:00
Michael Campbell
ff68c878d0
rename and new links + taxt (#782) 2022-07-18 12:35:44 +01:00
AndyWhiteVega
85c3eff31e
Test/746 expand coverage of tfe tests (#759)
* test: adding extra checks within tests

* test: lint

* test: refactor to bring assertions inline with new wallet locators

* test: lint

* test: lint correction

* test: formatting for lint

* test: formatting for lint

* test: fix test and make use of common functions

* test: lint
2022-07-14 15:21:51 +01:00
Dexter Edwards
e0f01f530f
fix: white text on disconnect screen (#753)
* fix: white text on disconnect screen

* fix: white text on something went wrong page
2022-07-13 15:58:25 +00:00
Radosław Szpiech
f9a91938fb
test(token): eth wallet widget validations with wallet connected (#731)
* test(token): eth wallet widget validations with wallet connected

* test(token): change currency tests to be more readable

Co-authored-by: Rado <rado@vegaprotocol.io>
2022-07-11 15:32:32 +02:00
AndyWhiteVega
2757429018
Task/token flow tests (#695)
* test(token-e2e): initial commit

* test(token-e2e): lint

* test: function Enhancements

* test: linting

* test: remove custom command type decs

* test: more tests

* test: linting

* test: working with capsule still needs rounding issues sorting

* test: enhancements

* test: enhancements

* test: check enhancements

* test: add brdige logic

* test: share instance rather than recreating on each test

* test: minor bug fix, add comment

* test: ensure working against capsule

* test: teardown functions in place

* test: linting

* test: completion of first iteration of happy paths

* test: lint

* test: typo change

* test: tweaks

* test: fix merge issues

* test: lint

* test: env variable handling and cleanup

* test: lint

* test: enhancements to logging to aid debugging

* test: lint

* test: ehancements after feedback

* test: lint

* Update apps/token-e2e/src/support/wallet-teardown.functions.js

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

* test: skipping non-essential tests to reduce time

* test: typo

* test: ci test fails coz capsule runs quicker their - disabled this one check to help

* test: reduction of coverage to help PR time

* test: disable infinte scroll test since capsule blockchain data to small

* test: corrected test: staked tokens field value no longer in a fixed state

* test: clearup to stop test bleed across projects plus bugfix

* test: lint

* test: update .env for trading

* Revert "test: update .env for trading"

This reverts commit 741743e4d2.

Co-authored-by: Dexter <dexter.edwards93@gmail.com>
2022-07-08 11:48:51 +01:00
Dexter Edwards
c7e65080b7
Feat/score changes (#696)
* chore: add query and generate types for shwoing scores

* fix: add key prop

* chore: add tests for new functionality

* style: remove debug

* Update libs/types/apollo.config.js
2022-07-07 13:37:41 +01:00
Elmar
6db09974d6
Feat/621 a11y storybook add on (#705)
* chore(ui-toolkit): add aria label to icon for a11y (#621)

* chore(ui-toolkit): add labels for form-groups for a11y (#621)

* fix(ui-toolkit): fix form inputs storybook for a11y (#621)

* feat(ui-toolkit): add strict eslint a11y and components config (#621)

* chore(ui-toolkit): add translate t to form labels
2022-07-07 12:01:03 +01:00
Dexter Edwards
58799bb231
fix: etherscan links not opening in new tabs sometimes (#713) 2022-07-06 15:59:06 +00: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
Dexter Edwards
0d32ef61ed
chore: add better title based on old repo contents (#712) 2022-07-06 10:16:44 +01:00
Radosław Szpiech
acef1a8e24
Test/toke add withdraw page validations (#701)
* fix: always show heading on governance page

* test(token): added validation for withdraw and governance pages

* chore: remove semicolon

Co-authored-by: Dexter <dexter.edwards93@gmail.com>
Co-authored-by: Rado <rado@vegaprotocol.io>
2022-07-01 16:57:20 +02:00
Radosław Szpiech
457caf4e8c
test(token): add rewards page validations (#697)
Co-authored-by: Rado <rado@vegaprotocol.io>
2022-07-01 14:03:22 +02:00
Radosław Szpiech
18c857a0ce
test(token): added validations for staking page without wallets connected (#686)
* test(token): added validations for staking page without wallets connected

* chore: formatting

Co-authored-by: Rado <rado@vegaprotocol.io>
2022-07-01 12:39:20 +02:00
Sam Keen
b3ce40da7f
Feat/629 Clean up Token styling (#650)
* frontend-monorepo-629: Made nav consistent with TFE and added focus-visible states

* frontend-monorepo-629: Header icons working

* frontend-monorepo-629: Tweak of header spacing

* frontend-monorepo-629: Text styles and spacing on all routes bar governance

* frontend-monorepo-629: Minor tweaks to font styles

* frontend-monorepo-629: Removed import from older solution

* frontend-monorepo-629: Evened up wallet padding to better suit the new button shadow styles

* frontend-monorepo-629: White text and mono font where needed in the eth wallet

* frontend-monorepo-629: Set only page header to use alpha lyrae

* frontend-monorepo-629: More use of mono font for balances and some text alignment

* frontend-monorepo-629: Keypair name element only rendered when name present

* frontend-monorepo-629: Stopped header title overflow on small screens

* frontend-monorepo-629: Button height established with padding to allow longer button text without overflow

* frontend-monorepo-629: Mobile wallet title/key alignment improved for mobile

* frontend-monorepo-629: Associated vega in wallet dark mode on

* frontend-monorepo-629: Removed redundant classes on eth wallet connect button

* frontend-monorepo-629: Vega wallet spacing tweaks
2022-06-28 14:41:43 +01:00
Edd
b269ad16cf
chore: workaround for #641 - ignoreErrors on governance page (#642)
* chore: workaround for #641 - ignoreErrors on governance page

* chore: #641 comment on errorPolicy - this is to get around some backend issues

Co-authored-by: madalinaraicu <madalina@vegaprotocol.io>
2022-06-27 13:56:13 +01:00
Radosław Szpiech
ec2642e8b1
fix: classes added to make link looks like link (#639)
Co-authored-by: Rado <rado@vegaprotocol.io>
2022-06-24 16:26:16 +02:00
Radosław Szpiech
32d10af85c
test(token-e2e): add elements verification tests for home page (#616)
* test(token-e2e): add elements verification tests for home page

* test(token-e2e): change locators files names

* test(token-e2e): change title of describe block

* test: add some more validation

* test: eol fix

Co-authored-by: Rado <rado@vegaprotocol.io>
2022-06-24 15:24:49 +02:00
Sam Keen
3f076660ee
Feat/585 Port changes from TFE to Token (#628)
* frontend-monorepo-585: Ensure balances refreshed after disassociation

* frontend-monorepo-585: Add requested state to delegate transaction

* frontend-monorepo-585: Number of decimals can be misleading on vesting form

* frontend-monorepo-585: Decimals not show enough d.p. on vesting page

* frontend-monorepo-585: Render logic of current proposal status

* Update apps/token/.env

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

* Update apps/token/.env

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

* frontend-monorepo-585: Changes from PR

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
2022-06-24 10:24:59 +01:00
Dexter Edwards
994bb4cf2b
test: allow connecting to a local ganache node by signing transactions in browser (#595)
* test: allow connecting to a local ganache node by signing transactions in brower

* chore: update environment variables

* fix: disassocaition

* chore: remove redundant code

* chore: rewrite promise as async/await

* fix: approval amount too low

* chore: address PR comments

* test: fix tets

* revert changes to env file

* chore: changes as per pr comments
2022-06-24 10:07:05 +01:00
Sam Keen
2302ef4378
feat(#447): 447 - UI toolkit and theme updates
* feat: 447 Refactored 'progress' intent to be 'prompt' as now white. Added yellow 'selected' intent

* feat: 447 Colour consolidation

* feat: 447 Colour consolidation extra renaming

* feat: 447 Fixing specified red colours

* feat: 447 Removed unused darker red

* feat: 447 Documenting additional colours in storybook

* feat: 447 Buttons updated (except 'accent', which will probably get removed when navs built)

* feat: 447 Text inputs updated

* feat:frontend-monorepo-447: Trading nav

* feat:frontend-monorepo-447: Updated toggle button colours

* feat:frontend-monorepo-447: Custom checkboxes

* feat:frontend-monorepo-447: Tweaks to radio buttons

* feat:frontend-monorepo-447: Input dates get dark color scheme in dark mode

* feat:frontend-monorepo-447: Dropdown updates

* feat:frontend-monorepo-447: Icon menu

* feat:frontend-monorepo-447: Focus visual styles moved to focus-visible for radios and toggle

* feat:frontend-monorepo-447: Tweak to focus styles for text input and textarea

* feat:frontend-monorepo-447: Labeled input

* feat:frontend-monorepo-447: Labeled input description red when in error

* feat:frontend-monorepo-447: Tooltip visual update

* feat:frontend-monorepo-447: Added disabled state to checkbox

* feat:frontend-monorepo-447: Custom select with radix

* feat:frontend-monorepo-447: Reverted back to native Select for a11y concerns

* feat:frontend-monorepo-447: Added visual cue for dropdown items when multiple can be selected

* feat:frontend-monorepo-447: Removed shadow from buttons in Explorer where it looked wrong

* feat:frontend-monorepo-447: Added box shadow classes into tailwind theme

* feat:frontend-monorepo-447: Colour primitives documentation updated

* feat:frontend-monorepo-447: Cleaning up box shadow use further

* feat:frontend-monorepo-447: Intents util updated

* feat:frontend-monorepo-447: Dialog component updated

* feat:frontend-monorepo-447: Callout component updated

* feat:frontend-monorepo-447: Adjusted apps to handle toolkit changes

* feat:frontend-monorepo-447: Moved tabs to ui-toolkit and styled

* feat:frontend-monorepo-447: Fixed ui-toolkit tests

* feat:frontend-monorepo-447: Token eth wallet made dark to support new buttons

* feat:frontend-monorepo-447: Ran prettier

* frontend-monorepo-447: Simplified button class functions and exported for use on other elements

* frontend-monorepo-447: Used newly exported button classes on Link elements in eth-wallet

* frontend-monorepo-447: Moved trading nav from ui-toolkit to trading app

* frontend-monorepo-447: Simplified intents and updated stories

* frontend-monorepo-447: Using classnames in requested spot

* frontend-monorepo-447: Removed unnecessary 'asChild' prop on dropdown triggers

* frontend-monorepo-447: Made use of the XPrimitive Radix naming convention

* frontend-monorepo-447: Simplified types in 'getButtonClasses'

* frontend-monorepo-447: Added 'asChild' to dropdown trigger to avoid nested buttons

* frontend-monorepo-447: Moved input label and description into Formgroup component. Refactored based on tweaked structure

* frontend-monorepo-447: Externally linked input label

* frontend-monorepo-447: Adding correct text colours to Intent.None backgrounds

* frontend-monorepo-447: Improved intent function name

* frontend-monorepo-447: Removed new navbar until implementation ticket is picked up

* frontend-monorepo-447: using testing-library/user-event for tab click unit tests

* frontend-monorepo-447: Removed unused button import

* frontend-monorepo-447: Little extra use of classnames in form-group.tsx

* feat: make navbar pink for light mode

* fix: problem with theme not switching when dependent in js on theme value

* fix: bg of row hover

* fix: dont use vega pink for sell red

* fix: type error in generate orders func

* fix: lint

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-06-23 20:16:01 -07:00
m.ray
c78514714b
Fix/602 fix deal ticket component to be reused by both simple trading app and console v2 (#606)
* fix: [#602] fix container - use grid tabs inside trading leaving deal ticket container reusable

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

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

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

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

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

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

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* feat: add network configuration files to static app

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

* refactor: split out network switcher utils

* refactor: split up environment hook

* fix: jsonify env variable for possible networks

* fix: add formatter file

* feat: add network loader component

* feat: add network loader to the trading app

* fix: assign correct global state to network swicther

* feat: add status modal

* feat: add network-switcher lib

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* fix: jsonify env variable for possible networks

* fix: add formatter file

* fix: assign correct global state to network swicther

* fix: failing tests from UI changes

* feat: add environment validation

* feat: add runtime validation for network configs

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

* chore: rename network swicther lib to environmnet

* fix: lint

* feat: add tests for config hook

* feat: add environment hook tests

* fix: lint

* fix: lint

* feat: add environment hook tests

* feat: add storage tests

* fix: formet

* feat: improve loading states

* fix: format

* fix: use router instead of window location

* fix: rearrange network loader props and components

* fix: remove FC type

* fix: env validation

* fix: untangle returns in network loader

* fix: add teardown for env and localstorage

* fix: add custom to env networks

* fix: lint

* fix: format

* fix: lint

* fix: remove env provider from simple trading app

* fix: remove failing promise hacks

* fix: some leftover format files

* fix: remove network switcher from tsconf

* fix: move Networks to libs/environment

* fix: add defaults for ether env vars

* feat: add tests for default ether env vars

* fix: remove chain id env var from web3 container

* fix: remove chain id from the environment

* fix: format

* fix: lint token

* fix: lint env

* fix: add comment to callout hack

* fix: lint token again

* fix: remove skip

* fix: move addresses to token app

* fix: improve schema validation errors and fix token app

* fix: lint

* fix: format

* fix: format

* fix: add network loaders to apps

* fix: format

* fix: remove logs

* fix: cypress process errors

* fix: change network loader hierarchy in token

* fix: remove stray console.log

* fix: revert test changes in simple trading app

* fix: prefix env vars with NX

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

* fix: improve schema validation errors and fix token app

* fix: format

* fix: disable lint rules for catch block any types

* fix: format again

* fix: remove redundant process.platform injections

* fix: format

Co-authored-by: Joe <joe@vega.xyz>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
2022-06-21 16:20:53 -07:00
macqbat
52b7a2db59
Feat/359 console lite improve market list toolbar (#575)
* feat: [console-lite] - simple market list toolbar - fixes in unit tests

* feat: [console-lite] - simple market list toolbar - fixes in unit tests

* feat: [console-lite] - simple market list toolbar - fixes in unit tests

* feat: [console-lite] - simple market list toolbar - fixes in unit tests

* feat: [console-lite] - improve simple market list toolbar, improve int and unit test

* feat: [console-lite] - adjust int test

* feat: [console-lite] - add theme-lite, adjust css's to design

* feat: [console-lite] - remove redundant class name

* feat: [console-lite] - market list toolbar - change the concept - use router links

* feat: [console-lite] - market list toolbar - improve some css

* feat: [console-lite] - market list toolbar - improve some css, review feedback

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-06-21 11:21:22 +02:00
Matthew Russell
23df113ace
fix: memoize default provider to fix render loop (#584) 2022-06-20 16:26:27 +01:00
Dexter Edwards
bcaab22891
Feat/dockerize frontends (#388)
* feat: unhardcode contract addresses

* fix: linting and tests

* feat: switch contract usage in token app to use unhardcoded addresses

* chore: remove other usage of hard coded contract addresses

* feat: convert contracts to classes, update claim contract to fix circular dependency

* feat: add hard coded contract addresses to contracts page

* fix: misc tidy up

* chore: rename ethers big num conversion func

* fix: remove pending transactions modal

* chore: add single toBigNum function that can accept number string or EthersBignNumber

* chore: delete unused tranche helpers and decimals functions from smart contracts lib

* feat: add faucetable token class

* fix: reset tx state after early exit from approve tx

* feat: re add transaction modal using zustand store

* fix: loader colors for eth wallet

* fix: pass ethereum config to gurantee existence before tx execution

* add docker image for building explorer

* add arg

* env file changes

* add docker file to build env file

* add requirement for env file in explorer

* fix env file syntax

* containers functional

* default to testnet

* make env flag logic consistent in all places

* pre populate env file

* ensure working for all projects

* address PR comment

* generalising env for token

* invert config dependency from ui toolkit

* fix: merge issues

* docs: running containers documentation

* style: lint

* fix: env varibales not being added properly

* chore: fix merge issues

* chore: fix docker file to support new exectutors

* chore: set address on all contracts as a property

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

* chore: fix typing

* chore: remove duplicated prop

* chore: don't use chainId

* style: lint

* style: lint

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

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

* test: revert changes to explorer e2e file

* fix: creating client without base causing token to error

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

* chore: remove node env from configurable flags

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

* fix: select box styles on firefox
2022-06-10 16:12:51 -07:00
Bartłomiej Głownia
72f94d2e6d
feat(#500): colors fixes (#512)
* feat(#500): mute price decimal places

* feat(colors): remove alpha chanel from shades of gray

* feat(colors): simplify intent colors

* feat(colors): fix intent mapping

* feat(colors): fix lint issues

* feat(colors): fix lint issues
2022-06-10 16:07:44 +01:00
botond
71226e3d75
fix: network env var escaping (#541)
* fix: network env var escaping

* fix: remove logging
2022-06-10 13:59:55 +01:00
Dexter Edwards
9266ff4bd8
Feat/smart contracts update (#536)
* feat: add new bridge contract logic

* chore: remove unused contract from provider

* chore: remove minimum as no longer exists

* feat: use new withdrawals contract, but allow for old contract for token

* feat: power contracts selection by a flag

* style: lint

* Update libs/smart-contracts/src/contracts/collateral-bridge-new.ts

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

* chore: rename env var as per feedback

* chore: consistent varaible names as per PR comments

* chore: add back in checks for minimum as per PR comments

* style: formatting

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-06-10 11:36:38 +01:00
botond
ecda46caa5
Feat/6 Network Switcher (#502)
* feat: add network-switcher lib

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* fix: jsonify env variable for possible networks

* fix: add formatter file

* fix: assign correct global state to network swicther

* feat: add network-switcher lib

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* fix: jsonify env variable for possible networks

* fix: add formatter file

* fix: assign correct global state to network swicther

* fix: failing tests from UI changes

* fix: lint

* fix: lint

Co-authored-by: Joe <joe@vega.xyz>
Co-authored-by: Dexter <dexter.edwards93@gmail.com>
2022-06-10 10:15:38 +01:00
Matthew Russell
e463bbe238
feat(#495): get smart contracts addresses from network params
* feat: unhardcode contract addresses

* fix: linting and tests

* feat: switch contract usage in token app to use unhardcoded addresses

* chore: remove other usage of hard coded contract addresses

* feat: convert contracts to classes, update claim contract to fix circular dependency

* feat: add hard coded contract addresses to contracts page

* fix: misc tidy up

* chore: rename ethers big num conversion func

* fix: remove pending transactions modal

* chore: add single toBigNum function that can accept number string or EthersBignNumber

* chore: delete unused tranche helpers and decimals functions from smart contracts lib

* feat: add faucetable token class

* fix: reset tx state after early exit from approve tx

* feat: re add transaction modal using zustand store

* fix: loader colors for eth wallet

* fix: pass ethereum config to gurantee existence before tx execution

* chore: lint smart contracts lib

* chore: fix web3container to use children and not render prop

* chore: lint

* fix: use background to mock ethereum wallet to avoid mocking globally for every test

* chore: move web3 mock to common steps and call from withdrawals feature tests
2022-06-07 15:08:40 -07:00
Matthew Russell
a66be425be
fix(#315): misc styling and ui fixes for the token app
* chore: add callout loaders and input lozenges

* fix: text colors and nav heading

* fix: text color for home links

* chore: fix spacing of wallets

* chore: fix missing translation keys

* chore: add loader to pending associatino tx callout, fix spacing of text within callout

* chore: make sure etherscan links open in a new tab

* fix: redemption page

* fix: spacing of rewards tables list

* fix: link styles on withdraw page

* fix: styles for withdrawal table

* fix: footer links

* fix: staking page links and spacing

* fix: translations

* fix: spacing of callout title, spacing of staking connect step

* fix: vesting page title

* fix: proposals list spacing

* fix: proposal page and vote details

* chore: update translation of metamask wallet connection button

* chore: delete unused files

* chore: dont nest buttons inside  links

* chore: lint

* fix: title test after text change
2022-06-07 11:24:43 -07:00
Bartłomiej Głownia
29aa93dd3c
feat: update link to wallet guide in token app (#501) 2022-06-06 16:16:11 +01:00
botond
3a27172e04
feat(#175): ui-toolkit links (#453)
* feat: add enviromnemt provider to the ui-toolkit

* chore: replace etherscan links

* chore: wrap trading app into environment provider

* chore: move env provider to react-helpers and wrap every app

* chore: remove more env variables from libs and replace them with the env hook

* fix: lint

* fix: update readme with correct formatting command

* fix: warnings for web3 hook

* fix: wrap warning in conditional, print message only when env keys are missing

* fix: incorrect condition on deposit manager fauceting param

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

* fix: cleanup token app ethereum config

* chore: add better error handling to the useEnvironment hook

* fix: lint

* fix: formatting

* fix: more lint

* fix: throw error if required env variables are missing

* fix: remove default eth chain id

* fix: add back etherscan testid to withdrawals links

* fix: imports

* fix: try using babel jest for smart contracts test transpilation

* fix: uniform ts syntax

* chore: set resolveJsonModule in base tsconfig

* fix: add missing data-ids for etherscan links

Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-31 17:30:02 -07:00
Dexter Edwards
29e6cb5074
feat: use new smart contracts sdk (#479) 2022-05-27 10:44:10 -07: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
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
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
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
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
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
m.ray
319e14164d
Feat/324 sparkline component (#381)
* move colors in ui-toolkit/config

* fixing tests and add stories

* fixing some tests and edit story

* update sparkline story

* rename story templates for sparkline

* use tailwind colors and rename to *.spec.tsx

* use tailwind only

* remove test.tsx

* Update libs/tailwindcss-config/src/theme.js

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

* remove gray from tailwind and use black/40 and white/40 for strokeCurrent

Co-authored-by: madalinaraicu <“madalina@raygroup.uk”>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-09 18:19:19 +03:00
Bartłomiej Głownia
19a9e9adb0
Fix global types imports in generated files (#386) 2022-05-09 13:14:59 +02:00
Sam Keen
6eb52c9a65
Feat/304 token scss to tailwind - part 1 (#327)
* Converted app.scss

* Made a start converting styles.scss

* commenting out unused colours - test for now

* restoring font-family

* Added correct text colour and height to top level elements

* Eth connect button styling

* Truncated wallet key on staking screen (had been causing overflow)

* Tranches Scss to tailwind

* Withdraw form Scss to tailwind

* Part way done with staking Scss to tailwind

* Removed redundant containerClass prop from epoch-countdown

* Cleanup of colors part 1

* Ran prettier

* Changes from the MR - removed epoch-countdown styles (apart from blueprint, which has moved to styles.scss)

* Changes from mr - removed extra button size classes (to be replaced with a prop later)

* Changes from mr - allow Tailwind's default list styles. Added role="list" for accessibility

* Border-box applied via wildcard again

* MR tweaks

* Removing the eslint warning for using role="list" on unstyled lists

* Correctly naming the jsx-ally plugin in the eslintrc file so that rules were correctly applied

* Removed redundant 'list-none' classes as Tailwind applies this by default for lists
2022-05-09 00:53:02 +01:00
candida-d
1bb7c23c6e
Update docs links to new URLs (#379) 2022-05-06 13:09:01 +01:00
Dexter Edwards
9e82935658
Chore/more docs (#331)
* chore renable prettier md files

* remove duplicated information, add instructions on running formatting

* add more docs for other apps a libraries

* correct numbering

* Missing applications

* correction for serving

* more docs
2022-05-03 16:32:31 +01:00
Matthew Russell
1d8de701c9
Use types from web3-react library
export connectors to avoid needless data manipulation, use built in types from web3-react (#310)
2022-05-02 13:16:57 -04:00
m.ray
bd3268adf0
Feat/258 move key value table into monorepo (#320)
* move key-value-table to ui-toolkit and use tailwind

* add key-value-table to storybook

* override border width 1px from the styles of the app, remove td and th from children

* clone muted and numerical props to children elements

* proposal change table remove empty lines

* add Roboto mono to font-mono tailwind config

* remove labels and labelfor

* revert change on token-details-circulating

* export the whole components directory rather than explicitly individual components

* add classNames, add formatNumberPercentage, remove spans, add span in token details circulating

* data-testid=governance-proposal-enactmentDate and use span instead of div

* use custom spacing defined in tailwind & another README.md update for running cypress in watch mode

* update divs to span within the vesting table

* Update README.md

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

* borders and text visible on both dark and light themes

* add headingLevel and use dl instead of tables

* update styling for dl inline

* remove added grey from tailwind

* ignore md files

Co-authored-by: madalinaraicu <“madalina@raygroup.uk”>
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
2022-04-29 16:27:20 +03:00
Sam Keen
2b910aa04c
Feat/272 syntax highlighter from explorer to ui-toolkit and feat/216 added light theme and feat/283 add to token (#286)
* Moved syntax highlighter from explorer to ui-toolkit

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

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

* Added a light theme for syntax highlighter, added the styling for syntax highlighter to our custom classes

* Suboptimal but successful way of ensuring styling is applied to syntax highlighter

* Styling syntax highlighter with scss

* Fix failing test

* Back to applying styling via custom plugin, but with a wrapper on the syntax highlighter ensuring Tailwind doesn't cull the classes

* Preferred class name

* prettier formatting

Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-04-29 10:46:31 +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
Matthew Russell
b5788379a3
add build netlify command and netlify.toml for token dapp (#302) 2022-04-26 07:32:23 -07:00
Dexter Edwards
ce5d7bc15b
run nx format (#295) 2022-04-25 15:03:58 +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