Skip to content

Commit

Permalink
feat: ➕ add export-to-csv dep
Browse files Browse the repository at this point in the history
feat: ✨ add download icon

feat: ✨ add navigation menu slots

feat: ✨ add csv utility

feat: 🏷️ improve dropdown menu types

refactor: ♻️ refactor Output component

refactored Output component to export formatting utils.

feat: ✨ add ExportHistoryDropdown component

feat: ✨ add export inside History page

added ExportHistoryDropdown component inside History page layout.

feat: 🚸 disable csv export on empty data

feat: 📈 add export history analytics

fix: 🐛 fix export history download

CT-525 Add liquidation position line to charts (dydxprotocol#331)

* liquidation line

* falsy val

Add transfer button to AccountInfoConnected Header (OTE-186) (dydxprotocol#332)

* Add transfer button to AccountInfoConnected Header (OTE-186)

* Organize imports

* Remove unused styling

* Remove unecessary key param

remove border (dydxprotocol#333)

Remove trading is live notification (dydxprotocol#334)

Handle BrowserRouter for testFlags (dydxprotocol#335)

Withdrawal Risk and Safety (dydxprotocol#296)

* 🚧 withdrwal-safety client calls

* 🚧 withdrawal gate and capacity

* ✏️ withdrawalGateLearnMore

* nits

* nits: Add fadedWarning and fix globalStyle type

* TransferType prop

* Add useEnvFeatures to gate fetch when unsupported on env

* Add telemetry log fn

* Add withdrawalGateLearnMore to v1/env.json

* Add Withdrawal help doc link

* Update withdrawalGateLearnMore

* Disable WithdrawalSafety fetches

Github action for syncing the release branch (dydxprotocol#319)

* Github action for syncing the release branch

* Update release to use tags for hotfix

* Update update-release.yml

* update

* update to use workflow token

update close order cell (dydxprotocol#338)

Updated otherMarketsData and Incremental improvements to Widget (dydxprotocol#326)

* new markets 2/23

* update format

* update numOracles

* new markets 2/23

* update format

* update numOracles

* new format of market data

* Update to use new otherMarket data

* fix new data format

* Filter existing proposals from New Market Widget

* bump v4-localization

* remove existing markets with invalid tickers

* update disclaimer

* add assets for new markets on the json

* add workflow that validates other market data

* clean up workflow yml

* fix LocalWallet import

* increase sleep

* sleep more

* filter by ticker and add retry

* Revert "filter by ticker and add retry"

This reverts commit 47bf20a.

* filter by ticker and add retry

* add baseAsset and omit from response

* latest clean run

* parallelize

* add validation on adjustByMarket

* fix adjsut by market parsing error

---------

Co-authored-by: jaredvu <[email protected]>
Co-authored-by: Tian Qin <[email protected]>

Fix transfer button style (dydxprotocol#339)

Market filters and New Market Widget Discoverability (dydxprotocol#329)

* init

* Add useQuery for Sparklines

* New sparkline call

* Add new tags

* Update labels

* nit: remove override

* Update Market tags, add market filter to Markets page

* 💄 Fix spacing between detail items

add portal json metadata and icon (dydxprotocol#344)

* add portal json metadata and icon

* use specific v4-chain commit

---------

Co-authored-by: Tian Qin <[email protected]>

Disable reduce-only (dydxprotocol#346)

fix release workflow (dydxprotocol#347)

Update prettier for import sorting, also run prettier on all src dir (dydxprotocol#345)

* Update prettier for import sorting, also run prettier on all src directories

* add git-blame-ignore-revs to ignore previous commit in git blame

Lower safe num oracles (dydxprotocol#350)

CT-640 Create Positions table Actions column (dydxprotocol#343)

* implement skeleton

* clean up unnecessary changes

* add to Positions table

* add key

* review comments

Add tsc to build script (dydxprotocol#348)

* typescript errors

* 🌐 tsc

* Add tsc to build script

* Add ReactNode

add AXL (dydxprotocol#352)

CT-653 Render Triggers Column skeleton (dydxprotocol#354)

* wip

* render triggers column in Positions table

* clean up

* unused import

* update to redirect FOK orders

* fix typing

* fix types round 2

* typo

* review comments

add assets for axl, meme, ocean, and add MEME tag (dydxprotocol#357)

* add assets for axl, meme, ocean, and add MEME tag

* bump v4-localization

---------

Co-authored-by: jaredvu <[email protected]>

style: update market filters component (dydxprotocol#356)

* style: update market filters component

* fix(marketfilter): add prop to hide propose new market button

* allow tags to be scrollable

* style(searchinput): remove clear button border/background

ensure one live websocket connection per app (dydxprotocol#361)

Add option to default to all markets in horizontal footer (dydxprotocol#349)

* Add option to default to all markets in horizontal footer

* Colocate state imports

* Consistently name 'other' section

* Colocate default enum

* Update lockfile

feat(positiontable): add column for margin (dydxprotocol#362)

* Add margin column

* Add PositionsMarginCell

* use cross/isolated string keys

* remove USD_DECIMALS since it is handled by Output

CT-655 Implement "View orders" onClick (dydxprotocol#355)

* wip

* render triggers column in Positions table

* clean up

* unused import

* update to redirect FOK orders

* fix typing

* fix types round 2

* typo

* implement onClick functionality

* add to overview; fix onclick behavior

* remove unused import

* review comments, replace arrow icon + add border

Adam/ote 207 user local storage exceeding limits (dydxprotocol#358)

* Clear abacus notifications from local storage if we exceed 50

* Don't persist AbacusGenerated notifications to LocalStorage

* Only clear notifications if AbacusGenerated exists

* touch up + prettier

---------

Co-authored-by: Bill He <[email protected]>

chore(contributions): add conventional commits to lint pr titles (dydxprotocol#351)

* commitlint init

* chore(husky): initialize husky pre-commit and enforce commit-msg

* chore(contributions): add commit lint information on contributions.md

* chore(contributing): update md

* chore(workflow): add commitlint github workflow

* chore(workflow): commit lint pr title

* do not lint commit msg, just pr

* remove commitlint config from eslintignore

* re-add dev deps

chore(newmarkets): astr, floki, flow, edit portal (dydxprotocol#364)

* 3/7/24 run

* 3/7/24 run - discretionary

* remove sushi

* synchronously validate tickers

---------

Co-authored-by: Tian Qin <[email protected]>

build(commitlint): Remove subject-case ENFORCEMENT (dydxprotocol#369)

* remove subject-case enforcement

* edit config

feat(radiobuttoncards): add new radio button cards component (dydxprotocol#368)

ungate trading rewards (dydxprotocol#363)

Revert "Adam/ote 207 user local storage exceeding limits (dydxprotocol#358)" (dydxprotocol#370)

This reverts commit 8446489.

chore(notification): Add Chaos Labs Season 2 Distribution notification (dydxprotocol#371)

* Add Season 2 Distribution notification

* update CTA

feat(sltp): ct-654 trigger column ui for partial close position + liquidation warnings (dydxprotocol#366)

* draft completed

* clean up

* liquidation logic fix

* remove log

* Review comments

feat(marginform): add form and dialog to adjust margin (dydxprotocol#367)

* First pass AdjustIsolatedMarginDialog

* use calculatePositionMargin

* remove unused styles

* consolidate diff output render

fix(tradeform): Change leverage buttons based on maxLeverage (dydxprotocol#373)

* Change leverage buttons based on maxLeverage

* extract if statement

ci(tests): Setup e2e browserstack testing CI (dydxprotocol#359)

* ci(tests): Add e2e browserstack testing CI

* fix

* debug

* only run for testnet and staging

* turn on all the tests

* merge jobs

* add checks

* add readme, exclude unit tests

* pnpm-lock

feat(notifications): use notification for connection errors (dydxprotocol#365)

* Use notification for connection errors

* remove code

* bump package

* fix type error

* fix type errors

* Disable trade and onboarding if chain disruption

* fix action

* bump loc

feat(aevo): add aevo, arkm (dydxprotocol#377)

* add aevo

* add assets for arkm and aevo

* add arkm asseticon and edit tag

feat(tradeform): Visual update for TradeForm with new Margin Mode and Leverage selection dialogs (dydxprotocol#372)

* First pass AdjustIsolatedMarginDialog

* use calculatePositionMargin

* remove unused styles

* desktop entrypoint and form

* skeleton adjust target leverage dialog

* Create basic Slider component

* Add SelectMarginMode and AdjustTargetLeverage forms and dialogs

* Update trade form and dialog depending on testflag

* Stretch cross/lev buttons on desktop

Only run e2e test for v4-testnet (dydxprotocol#378)

fix(onboarding): Add requestId to squid status (dydxprotocol#374)

* Add requestId to squid status

* smol refact

* address nit

add .nvmrc (dydxprotocol#375)

fix(e2e): remove @wdio/sync (dydxprotocol#382)

chore(onboarding): Add additional metadata to deposit events (dydxprotocol#380)

* add slippage and gas fee to deposit analytics

* add additional metadata

* fix tsc errors from undefined to be -1

* switch to be optional

validate that exchanges are unique in other market data validation (dydxprotocol#383)

feat(onboarding): Enable CCTP for Arbitrum (dydxprotocol#384)

feat(market): add BOME (dydxprotocol#386)

* add BOME

* add API3 kucoin

* add bome assets

Add install-local-abacus script. (dydxprotocol#387)

fix action type in profile page (dydxprotocol#379)

build: Fix clean build case in install-local-abacus (dydxprotocol#389)

feat(asset): add astr assets (dydxprotocol#391)

build: Trigger Vite restart when install-local-abacus is run. (dydxprotocol#390)

gating: use optimistic collat check for testnet (dydxprotocol#388)

feat(sltp): base ui for sltp edit modal (dydxprotocol#376)

* draft

* add view orders nav functionality

* remove testing changes

* fix the lock file

* update with new slider component

* review comments

* fix some bugs, hide advanced + CTA when no modifiable orders

fix(bug): globalThis reference error on bugsnag (dydxprotocol#353)

* fix globalThis reference error on bugsnag

* update polyfills

re-add polyfill (dydxprotocol#394)

chore(remove-notifs): Remove trigger for S2 distribution (dydxprotocol#395)

* Remove trigger for S2 distribution

* remove unused imports

bump abacus and v4-clients package for order/tx queue (dydxprotocol#392)

Add help link to env configs (dydxprotocol#396)

Add help link to env configs

use pessimistic collat check on testnet (dydxprotocol#400)

bump abacus for slippage validation update (dydxprotocol#403)

build: Enable Abacus logging in development mode. (dydxprotocol#404)

build: Enable external sourcemaps in Vite/Rollup to view Abacus source in Dev Tools (dydxprotocol#405)

Support multiple entry points with configurable HTML tags (dydxprotocol#398)

feat(performance): trading view kick off getBars / request candles sooner (dydxprotocol#399)

* remove markets dependency for loading candles

* separate indexer client out

* nits

* address feedback

* add initial price scale

* fix tv chart missing symbol error

* remove stray console.log

* bump abacus and add back settimeout

update entry-points build logic to allow for pnpm dev (dydxprotocol#409)

fix trading view chart error (dydxprotocol#408)

memo table data to avoid flickering (dydxprotocol#411)

connect wagmi on cta and not automatic for deposit (dydxprotocol#412)

fix: remove pingpongs from ws since no longer supported (dydxprotocol#414)

fix(tradingview): handle case when initial price scale doesnt need to be set (dydxprotocol#418)

* tradingview: handle case when initial price scale doesnt need to be set

build: Add v4-abacus to VSCode file watcher. (dydxprotocol#415)

feat(isolated-positions): Scaffold Unoponed Isolated Position cards (dydxprotocol#416)

* feat(isolated-positions): Scaffold Unoponed Isolated Position cards

* style(unopened-isolated-positions): backdrop-filter, vertical scroll

build: Add --clean flag to install-local-abacus (dydxprotocol#424)

feat(widget): add WIF (dydxprotocol#417)

* add WIF

* add ENA

* update celo ticker for coinbase

* increase sleep time before checking on-chain prices

* extend initializing delay to 300s

* remove tickers failing validation

* cross json data

* use commit without datadog

* print out failed proposal IDs

* use old commit

* remove tickers with price upate errors

---------

Co-authored-by: Tian Qin <[email protected]>

fix(orderbook): rows missing/duplicated in transition state (dydxprotocol#402)

* fix orderbook rows missing/duplicated in transition state

* address feedback + fix aggregation issue

update reduceonly and withdrawal safety feature flags (dydxprotocol#422)

feat(onboarding): Privy integration (dydxprotocol#425)

* feat(onboarding): Privy integration

* update localization and make VITE_PRIVY_APP_ID optional

* fix type

feat(closepositions): hook up close positions to tradebox close position dialog (dydxprotocol#407)

* functional

* Remove flag

* fix chart tvwidget error

* Remove unnecessary change

* review comments

* update strings

* review comments

bump abacus for market order slippage (dydxprotocol#429)

update status dot for connecting state and actually degraded (dydxprotocol#430)

fix(e2e): Temperorily skip e2e (dydxprotocol#401)

feat(sltp): Flag against conditional limit orders (dydxprotocol#420)

* flag limit orders

* fixes

* fix position check

* fix hook bug

* fix selector

* last time I'll clean up these selectors I swear

* fix merge conflict

* remove entry point changes

* fix for flickering?

* Review comment

* g typo

* fix hook dep

feat(sltp): hook up abacus values to sltp dialog (dydxprotocol#426)

* update entry-points build logic to allow for pnpm dev

* working changes

* remove test changes

* add disabled condition

* fixes

* flag limit orders

* fixes

* fix position check

* fix hook bug

* fix selector

* last time I'll clean up these selectors I swear

* remove unnecessary imports

* abacus version bump

* wip

* fix merge conflict

* squash

* remove entry point changes

* bump abacus hopefully last time

* fix for flickering?

* review

* review comments

* clean up unused import

---------

Co-authored-by: aforaleka <[email protected]>

chore: add net funding to positions table (dydxprotocol#434)

* add net funding to positions table

* show net funding only on trade / portfolio positions

* remove extra gap before reduce-only

feat: bump client and abacus for increased gtb for short term orders (dydxprotocol#427)

* bump client and abacus for increased gtb for short term orders

* feat(new-market-widget): handle isolated markets and bump v4-client (dydxprotocol#419)

* feat(new-market-widget): handle isolated markets and bump v4-client

* update-validate-other-market-data script

* Update to support [email protected]

* fix(type): fix type-error in newMarketMessageDetailsDialog

* fix(nits): remove unused vars

* fix(nits): update conditional, remove unused meta

* remove new markets for now

---------

Co-authored-by: Jared Vu <[email protected]>

chore(incentives): Update notification for incentives season 4 (dydxprotocol#436)

feat(sltp): re-enable percentage calculation on modal (dydxprotocol#432)

* update entry-points build logic to allow for pnpm dev

* working changes

* remove test changes

* add disabled condition

* fixes

* flag limit orders

* fixes

* fix position check

* fix hook bug

* fix selector

* last time I'll clean up these selectors I swear

* remove unnecessary imports

* abacus version bump

* wip

* fix merge conflict

* squash

* remove entry point changes

* bump abacus hopefully last time

* fix for flickering?

* review

* review comments

* clean up unused import

* add percentage, update abacus

* add clear button

* fix translations

* fix pnpm lock yaml lint

---------

Co-authored-by: aforaleka <[email protected]>

fix(sltp): bump abacus for updated perc calculation (dydxprotocol#439)

* bump v

* wrong version my bad

fix(marketWidget): hide marketType behind testflag (dydxprotocol#445)

* fix(marketWidget): hide marketType behind testflag

* add testflags

* tsignore

bump abacus and use optimistic collat check for staging and testnet (dydxprotocol#446)

feat(widget): json update (dydxprotocol#448)

* latest addition

* add FLR

* fix validate-other-market-data.ts

* remove marketType

* add FLR

* bump v4-client

* add marketId logging

* fix dydx

---------

Co-authored-by: Bill He <[email protected]>

fix(onboarding): Disable non CCTP withdrawals with featureflag (dydxprotocol#450)

* fix(onboarding): Disable non CCTP withdrawals with featureflag

* fix condition

chore: Update README with local abacus development instructions (dydxprotocol#452)

clean up trade form stage between market changes (dydxprotocol#453)

feat(sltp): enable notifications for sl/tp orders created through modal (dydxprotocol#443)

* needs to be cleaned up

* clean up types

* fix unique stringId

* update localization

* fix lock file

fix(sltp): fix positions tables in non trade views when sltp flag is on (dydxprotocol#447)

* needs to be cleaned up

* clean up types

* fix unique stringId

* update localization

* fix lock file

* fix columns

* review comment

* review comments #2

bump abacus version for better order events error tracking (dydxprotocol#454)

chore: bump localization + abacus versions for fixed sl/tp order params (dydxprotocol#455)

* update localization + abacus

* bump localization again

fix price (dydxprotocol#457)

fix(asset-info): add dydx to market config (dydxprotocol#458)

* fix(asset): dydx asset config

* use native token cmc link

chore(trade): add CTA to place limit order on liquidity error (dydxprotocol#462)

* render limit cta

* rename variable

* fix mobile

* lint

chore(notification): Add notification for s3 rewards distribution (dydxprotocol#460)

* Add notification for s3 rewards distribution

* remove comment

bump v (dydxprotocol#463)

chore: add position size to liquidation + entry lines (dydxprotocol#456)

* added position size

* clean up

* fix tick size decimals

* remove decimal ticks; this is set by priceScale

bumped (dydxprotocol#465)

feat: refresh withdrawals ui to add clarity around fees (OTE-276) (dydxprotocol#461)

* [chore] refresh withdrawals ui to add clarity around fees

* add cctp file i forgot

* add space after comma

* cleanup

* use styled row with gap. rename ExchangeRate style to more descriptive generic RowWithGap

* address comments. add localization, use proper token by address detection

* cleanup

* replace more l8n stuff

* bump l10n package. localize lowest fees highlighted text

* removing unused code

* remove collapsible details and migrate styling

* exclude non mainnet chain

* address comment

* merge conflicts

chore(sltp): update sltp/sltplimit to be flagged behind env.json instead of url params + enable sltp in all environments (dydxprotocol#467)

* update flags

* fix bump

* why is my translation non existent

* sometimes all you have to do is restart your computer

* fix circular dep

* ungate on mainnet

* switch pessimistic check to optimistic in mainnet

* remove non v1 env.json changes

chore: enable organize imports to remove unused imports (dydxprotocol#471)

* chore: enable organize imports to remove unused imports

* run organize imports on all files (dydxprotocol#473)

default all to true (dydxprotocol#475)

feat: order status [0/n] nits and fixes re existing notifications (dydxprotocol#474)

* notification nits

* feedback

feat: deposits UI revamp (OTE-277) (dydxprotocol#466)

* [chore] refresh withdrawals ui to add clarity around fees

* address comments. add localization, use proper token by address detection

* cleanup

* replace more l8n stuff

* bump l10n package. localize lowest fees highlighted text

* remove collapsible details and migrate styling

* exclude non mainnet chain

* add tooltips, use withdrawal message for subheader as placeholder

replace string with actual strings. use sourceChain.chainName for source chain param

pipe in chain name correctly

* lowest fee deposits tooltip text

* remove test code

* cleanup

* bump l10n v use new string

* move var to receipt component

feat(compliance): Compliance UI for read only, close only and Compliance configuration (dydxprotocol#433)

* Add compliance dialog

* address comments

* UI for various compliance states

* bump abacus, remove transfer

* update localization

* fix spacing

* bump localizatoin

* add testflag

* address comments

* fix lint

* fix merge

fix: move usdc to top of TokenSelectMenu dropdown (dydxprotocol#480)

* log things

* move usdc to top of list

feat: add assets and metadata for ETHFI, FLR, TON, and WIF (dydxprotocol#484)

* add assets and metadata

* add metadata

* update TON liquidity tier

feat: add lowest fees decorator text to SourceSelectMenu (dydxprotocol#483)

* feat: add lowest fees decorator text to SourceSelectMenu

* add clarifying comment

* lint

* conditionally render

reset input to trade every time (dydxprotocol#485)

chore(sltp): bump abacus v to pull in new analytics + change sl/tp duration to 90 days (dydxprotocol#490)

* bump abacus

* add toast duration

update json (dydxprotocol#487)

chore: refactor styles [App.tsx] (dydxprotocol#468)

* refactor styles poc

* remove incorrect and unused ref

* cleanup/lint

* useref to replace old ref

* replace stateful dialog area management with ref

* address comments

* remove unused import

fix: revert env.json placeholder (dydxprotocol#491)

feat: markets page revamp (dydxprotocol#442)

* feat: 💄 add new markets page header

* feat: 💄 add new market filter styles

* feat: ✨ add new component AssetTableCell

added new component AssetTableCell to replace MarketTableCell inside the markets table.

* feat: 💄 update oracle price cell style

* feat: 💄 change price and interest rate formatting

* feat: 💄 add  number output styles

added  number output styles for markets table columns.

* feat: ✨ add sparkline chart component

* feat: ✨ add daily sparkline inside market data

* feat: ✨ add price change chart

added price change chart inside markets table.

* feat: 💄 add new billboard style

* feat: ✨ expose getCandles and add limit

* fix: 💄 fix sparkline chart margin

* feat: 💄 add new billboard styles and data

* fix: 💄 fix sparkline chart overflow

* feat: ✨ add numia chain revenue service

* feat: ✨ implement getChainRevenue inside billboard

* refactor: ♻️ move markets stats inside a specific hook

* feat: 💄 add stats section layout

* fix: 💄 fix assetCell style

* feat: 💄 add stacked variant for AssetTableCell

* feat: ✨ add MarketsCompactTable setup

* fix: 💄 fix font size inside stacked variant

* feat: ✨ add listing and openInterest cells

added new cells inside MarketsCompactTable.

* feat: ✨ add market listing date

added market listing date inside the compact table.

* fix: 💄 fix MarketsCompactTable responsive behaviour

* feat: ✨ add fiat formatting

added fiat formatting for earned by stakers section.

* feat: ✨ add sorting prop

added sorting prop for MarketsCompactTable

* feat: ✨ add gainers/losers sorting

added markets stats sorting by gainers/losers.

* feat: ✨ add view all button

added view all button inside recently listed section.

* feat: ✨ add read more link

added read more link inside ExchangeBillboards component.

* feat: ✨ add learn more link

* feat: ✨ add global markets table filter

* fix: 💄 fix market compact table overflow

* refactor: ♻️ move markets stats inside a specific component

* refactor: 🔇 remove sparkline data log

* feat: ✨ add highlights toggle

* feat: ✨ improve markets losers search

* feat: ⬆️ upgrade @dydxprotocol/v4-localization

* feat: 💬 add translations

* feat: ✨ add formatZeroNumbers utility

* test: ✅ add tests for formatZeroNumbers utility

* feat: ✨ add compress zeros inside MarketsCompactTable

* feat: 💄 improve sub font size

* feat: ✨ remove daily sparkline chart

removed daily sparkline chart from markets table.

* feat: ✨ add currency auto check

added currency auto check inside formatZeroNumbers.

* feat: ✨ add punctuationSymbol return

added punctuationSymbol symbol inside formatZeroNumbers returns.

* feat: ✨ add CompressedNumberOutput component

* revert: ⏪ revert remove of daily sparkline chart

dydxprotocol@657ef20

* feat: 💬 add translations for input search

* feat: ✨ add MarketFilter compact layout

* fix: 🐛 fix AssetTableCell rendering

* feat: ✨ remove markets charts

removed 24h volume and open interest charts.

clean up order status icon (dydxprotocol#492)

Small cleanup (dydxprotocol#494)

chore(sltp): create notification for sltp (dydxprotocol#493)

* notification

* remove unnecessary css

feat: enable regular withdrawals for privy users [OTE-282] (dydxprotocol#477)

* feat: enable regular withdrawals for privy users [OTE-282]

* lint

* only unblock privy wallets for withdrawals, not deposits

* addres comment

* fix

feat(compliance): Integrate with geoblock api (dydxprotocol#464)

* Add compliance dialog

* temp

* UI for various compliance states

* bump abacus, remove transfer

* update localization

* fix spacing

* bump localizatoin

* add testflag

* Add compliance dialog

* address comments

* UI for various compliance states

* bump abacus, remove transfer

* update localization

* fix spacing

* bump localizatoin

* add testflag

* address comments

* Integrate with geoblock api

* post geoblock on form submit

* fix merge

* temp remove ismainnet geo check

* fix lint

* fix merge

* address comments

* use abacus for survey

* revert env

* add geo endpoint

* update strings

feat: order status [1/n] replace trade form loading CTA with toast (dydxprotocol#479)

* add order status notification replacing loading state

* nits

* address

* submitted -> submitting for new orders

feat: order status [2/n] notification preferences (dydxprotocol#481)

* order status notif preferences + refactor

* notification category

feat: order status [3/n] show place order error in order status notification (dydxprotocol#482)

* show order error in order status notification

feat: order status [4/n] place order flow on mobile screen (dydxprotocol#486)

* mobile order status flow

feat: order status [5/n] cancel order toasts (dydxprotocol#488)

* add cancel order notif

* cancel in order detail dialog

* fix short term order canceled becomes filled flow

* rename

refactor(market-revamp): sum staking rewards, update compact tables, reduce sparkline api call (dydxprotocol#498)

* refactor(market-styles): refactor Styled object

* refactor(output): add slotLeft

* refact(markets-revamp): use abacus sparklines, update compact tables, etc.

feat: Test the `otherMarketData.json` file against a live slinky instance (dydxprotocol#489)

* update dydx ref to latest tag

* trigger other-market-data validation on changes to script

* evaluate slinky metrics in ci

* use dydx v4-chain version with prometheus instance

* change ref back to dydxprotocol/v4-chain + nit

* linting

feat: show latest commit hash (dydxprotocol#469)

* feat: show latest commit hash

* add to help dialog

* selectable

change script to use relative pathing (dydxprotocol#495)

chore: re-enable e2e (dydxprotocol#500)

* chore: re-enable e2e

* test

bump client and abacus for default ioc market orders (dydxprotocol#501)

feat: add Statistics link to navigation header (dydxprotocol#472)

* Add Statistics link to navigation header

* Add link to env.json

* Update correct env.json

* Revert "Add link to env.json"

This reverts commit 19d20db.

* chore(env-links): add example

---------

Co-authored-by: jaredvu <[email protected]>

fix(sltp): Update triggerOrders to use new notifications; remove old trigger orders notifications (dydxprotocol#496)

* add

* use new func

* wip

* remove comment

* review comments, update abacus

chore(isolated-margin-inputs): hook up abacus setTradeValues and state (dydxprotocol#497)

* chore(isolated-margin-inputs): hook up abacus setTradeValues and state

* style(adjust-target-leverage-form): update styled object

* style(trade-form): update styled object

* fix(nits-style): fix nits and fix overflow for unoponenedIsolatedPositions

feat: update json with the latest data (dydxprotocol#499)

* update json

* update TON liquidity tier

* revert existing markets and sort by cmc rank

fix: make noble addres selectable (dydxprotocol#505)

* fix: make noble addres selectable

* address comment

feat: ui updates for eimf [OTE-299] (dydxprotocol#502)

* feat: ui updates for eimf

* ui updates for eimf

* use learnMoreLink configs instead of l10n

* typo

* cap leverage state by maxLeverage

* disable buttons larger than max leverage

fix(perf): add default pagination to all tables (dydxprotocol#507)

* paginate tables

* add import

fix: disable curve dao token icon (dydxprotocol#506)

* fix: disable curve dao token icon

* remove extra file.

update abacus (dydxprotocol#510)

chore: add referrer link from landing (dydxprotocol#504)

* chore: add referrer link from landing

* more accurate type

* add referrer to all onboarding analytics

* use utm source

* revert changes

* add referrer to every tracking action

fix: Fix set latest commit script (dydxprotocol#511)

* fix: Fix set latest commit script

* address comment

fix: prefer cctp validation to squid route validation (dydxprotocol#512)

feat: improve markets page (dydxprotocol#509)

* feat: ✨ change fiat formatting

changed fiat formatting from compact to expand inside exchange billboards.

* feat: ✨ improve market sparkline cache

* feat: ✨ improve chain revenue cache

fix: hardcoded gasfee from local testing (dydxprotocol#513)

chore: refresh positions table + other nits (dydxprotocol#508)

* refresh positions table + other nits

fix(perf): memoize fills table (dydxprotocol#515)

* memoize

* oops wrong v of abacus

chore: add web version to amplitude events (dydxprotocol#516)

* add tag

* clean up

* a little less brittle

* update e2e osx to Monterey

---------

Co-authored-by: Bill He <[email protected]>

feat(dev-3): add dev3 environment (dydxprotocol#519)

fix: Temporary default to Axelar USDC tokens on deposit while CCTP is down (dydxprotocol#514)

* fix: Temporary default to Axelar USDC tokens while CCTP is down

* address comment

fix: fix market dropdown table pagination (dydxprotocol#520)

* fix height calculation

* share a variable

fix: deposit value check (dydxprotocol#522)

* fix: deposit value check

* fix

* deboucned amount dependency array

* use bn instead of raw amount

fix: remove scrollArea style to fix safari mobile (dydxprotocol#524)

* fix: hack to get safari mobile working again

* remove unnecessary style

Revert "fix: Temporary default to Axelar USDC tokens on deposit while CCTP is down (dydxprotocol#514)" (dydxprotocol#523)

feat(new-preference): Add preference toggle for gas denom to be used when making transactions (dydxprotocol#521)

* bump v4-client

* allow user to select gas token

* fix

* update pnpm lock

* Address feedback

* remove added space

canceling toast should go from canceling -> canceled / error (dydxprotocol#529)

bump abacus (dydxprotocol#528)

chore: cleanup table component eslint errors and warnings [OTE-290] (dydxprotocol#476)

* chore: cleanup eslint ignore

* chore: cleanup table component

* use col props instead of referncing node directly

* ignore all components except table

* lint

* fix

fix: positions table close/action column title (dydxprotocol#532)

* fix positions table close/action column title

feat: update compliance strings (dydxprotocol#531)

* feat: update compliance strings

* fix tsc

* forgot to add file

* add date to config dialog

* address comments

fix stacked styling (dydxprotocol#539)

chore: add CCTPDepositOnly FF (dydxprotocol#540)

* chore: add cctpdepositonly FF

* make required ff

* cctp deposits only

* eaiser to read

chore: correctly type all Styled Components wrappers (dydxprotocol#534)

* compiles probably

* tinyfix simpler

* fix more errors

* small fixes

* fix pressed

* Fix notification

* remove unused

chore: Add latest version to web help dialog (dydxprotocol#536)

* added version

* review ocmments

chore: note in env file about deprecation (dydxprotocol#542)

* note in env file about deprecation

* update readme

chore: New es-lint rule, clean up some easy es-lint fixes (dydxprotocol#538)

* eslint add rule and make main good

* remove unnecessary

chore: cleaner handling of higher order function type inference (styled and forwardRef) (dydxprotocol#543)

* cleaner style types

* file

* Defaults and fix one more

fix(sltp): match order size slider value to input value (dydxprotocol#545)

* update abacus value to be saved

* update

* clean up

* clean up story

clena install: (dydxprotocol#547)

chore: remove eslint ignore for /pages, remove all unused styled component type references (dydxprotocol#544)

* Eslint fix

* remove

fix: pnl table flickering + limit toggles to available data (dydxprotocol#537)

* prevent pnl chart flickering + bump abacus to fetch less pnl

* remove toggle change logic to avoid buggy experience

* address feedback

* fix pnl visible data access

fix missing analytics data (dydxprotocol#555)

fix(selected-gas-denom): preserve gasDenom and set in chainTransactionProtocol (dydxprotocol#554)

* fix(selected-gas-denom): preserve selected-gas-denom and set within dydxChainTransactions

* add eslint-disable and fix circular dep

referrer (dydxprotocol#556)

chore(perf): update table pagination to be page based (dydxprotocol#530)

* wip

* wip

* fix scroll

* fix table typing

* fix default page size

* fix padding agian

* adjustment

* review comments

* oops

chore: eslint add lib (dydxprotocol#546)

* lib to eslint

* fix rest of it

* add it back

* respond to comments

chore: run lint-fix on /hooks (dydxprotocol#548)

* just lint fix

* that seems weird

update library (dydxprotocol#557)

chore: add logging for status tracking [1/n] (dydxprotocol#535)

* chore: add logging for status tracking

* add triggeredAt property for easier tracking

* prefer string litera

fix: remove noisy log (dydxprotocol#558)

* don't log there

* remove loud log

chore: apply eslint to /hooks (dydxprotocol#550)

* Get most of lib linting

* not satisfies, do rest of hooks

* cleaner name

* alias

* remove unnecessary

chore: run auto fixer on /components (dydxprotocol#551)

* apply auto fixer to components

* tiny fixes

update transition states for triggers form (dydxprotocol#563)

fix params iteration for test flags (dydxprotocol#564)

fix: rest header foreach (dydxprotocol#566)

fix: the transfer type ternery is not correct (dydxprotocol#570)

chore: remove hooks barrel file (dydxprotocol#569)

* remove hooks barrel

* remove unnecessary cycle ignores

fix top level views (dydxprotocol#552)

remove log (dydxprotocol#572)

chore: eslint more views (dydxprotocol#553)

chore: eslint the rest of easy views (dydxprotocol#560)
  • Loading branch information
DavideSegullo committed Jun 28, 2024
1 parent 73912d6 commit 81eb640
Show file tree
Hide file tree
Showing 534 changed files with 29,347 additions and 11,066 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ VITE_BASE_URL=

VITE_ALCHEMY_API_KEY=

VITE_PRIVY_APP_ID=

VITE_PK_ENCRYPTION_KEY=
VITE_ROUTER_TYPE=

VITE_V3_TOKEN_ADDRESS=
VITE_TOKEN_MIGRATION_URI=
VITE_NUMIA_BASE_URL=

AMPLITUDE_API_KEY=
AMPLITUDE_SERVER_URL=
Expand Down
16 changes: 8 additions & 8 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
vite-env.d.ts
polyfills.ts
vite.config.ts
commitlint.config.ts

# Temporarily ignore, we will slowly remove each directory as we fix files to follow ESLint rules
/src/components
/src/forms
/src/hooks
/src/lib
/src/main.tsx
/src/menus
/src/pages
/src/views
/src/views/forms

# components dir is being worked on
/src/components/*

# unignored components
!/src/components/Table.tsx
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["./scripts/*.js"]
"devDependencies": ["./scripts/*.js", "./__tests__/**/*.ts", "./src/lib/__test__/**/*.ts"]
}
],
"import/no-named-as-default": "off",
Expand All @@ -44,6 +44,7 @@
"no-use-before-define": "off",
"prefer-destructuring": "off",
"prettier/prettier": "error",
"react/display-name": "off",
"react/forbid-prop-types": "off",
"react/function-component-definition": [
"error",
Expand All @@ -60,9 +61,11 @@
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"react/sort-comp": "off",
"react/jsx-pascal-case": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/member-delimiter-style": [
"error",
{
Expand Down
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# prettier update
b5c3cd5bca0b775d3e471844f461e4a431e66df6
30 changes: 30 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint PR Title
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up pnpm
uses: dydxprotocol/setup-pnpm@v1

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- name: Install dependencies
run: |
pnpm install @commitlint/config-conventional
- name: Lint PR Title
run: |
echo "${PR_TITLE}" | pnpx commitlint --config commitlint.config.ts
env:
PR_TITLE: '${{ github.event.pull_request.title }}'
51 changes: 51 additions & 0 deletions .github/workflows/run-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: E2E Tests

on:
deployment_status:
jobs:
run-e2es:
runs-on: ubuntu-latest
if: >
github.event_name == 'deployment_status' &&
github.event.deployment_status.state == 'success'
steps:
- name: Check environment URL
id: check_env
run: |
if [[ "${{ github.event.deployment_status.environment_url }}" == *"v4-staging"* ]]; then
echo "::set-output name=should_run_tests::true"
else
echo "::set-output name=should_run_tests::false"
echo "This deployment does not require E2E tests. Exiting..."
fi
- name: Checkout
if: steps.check_env.outputs.should_run_tests == 'true'
uses: actions/checkout@v3

- name: Set up pnpm
if: steps.check_env.outputs.should_run_tests == 'true'
uses: dydxprotocol/setup-pnpm@v1

- name: Set up Node
if: steps.check_env.outputs.should_run_tests == 'true'
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- name: Install dependencies
if: steps.check_env.outputs.should_run_tests == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm install --loglevel warn
- name: Run e2e tests
if: steps.check_env.outputs.should_run_tests == 'true'
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
E2E_ENVIRONMENT_PASSWORD: ${{ secrets.E2E_ENVIRONMENT_PASSWORD }}
E2E_ENVIRONMENT_URL: ${{ github.event.deployment_status.environment_url }}
run: pnpm run wdio
44 changes: 44 additions & 0 deletions .github/workflows/update-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Workflow for Release

on:
push:
tags:
- 'release/v*'
- 'hotfix/v*'

jobs:
sync-release-branch:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOW_TOKEN }}

- name: Fetch all history
run: git fetch --unshallow || git fetch --all

- name: Determine Tag Type
id: tagtype
run: |
if [[ ${{ github.ref }} == refs/tags/release/v* ]]; then
echo "::set-output name=type::release"
elif [[ ${{ github.ref }} == refs/tags/hotfix/v* ]]; then
echo "::set-output name=type::hotfix"
fi
- name: Check out the release branch
run: |
git checkout release || git checkout -b release
- name: Sync release branch to tag
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
run: |
git reset --hard ${{ github.ref }}
git push -f origin release
52 changes: 52 additions & 0 deletions .github/workflows/validate-other-market-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Validate Other Market Data

on:
pull_request:
paths:
- 'public/configs/otherMarketData.json'
- 'scripts/validate-other-market-data.ts'

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up pnpm
uses: dydxprotocol/setup-pnpm@v1

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm install --loglevel warn
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.21

- name: Checkout v4-chain repo
uses: actions/checkout@v3
with:
repository: 'dydxprotocol/v4-chain'
ref: 'd4e0f0d1ac28f128c787e40c5a0cdc7c481e6c42'
path: 'v4-chain'

- name: Start v4 localnet
run: |
cd v4-chain/protocol
echo "Building v4-chain/protocol..."
make build
echo "Starting localnet..."
DOCKER_BUILDKIT=1 make localnet-startd
- name: Validate other market data
run: pnpx tsx scripts/validate-other-market-data.ts
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ dist-ssr
*.key
.env

index.html
entry_points/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand All @@ -30,3 +33,5 @@ dist-ssr
# Charting Library
public/tradingview
public/datafeed

local-abacus-hash
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm test
19 changes: 10 additions & 9 deletions .ladle/components.tsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
import '@/polyfills';

import { useEffect, useState } from 'react';

import '@/index.css';
import { GrazProvider } from 'graz';
import { QueryClient, QueryClientProvider } from 'react-query';
import { Provider } from 'react-redux';
import styled from 'styled-components';
import { WagmiConfig } from 'wagmi';
import { GrazProvider } from 'graz';
import { QueryClient, QueryClientProvider } from 'react-query';

import { SupportedLocales } from '@/constants/localization';

import { AccountsProvider } from '@/hooks/useAccounts';
import { AppThemeAndColorModeProvider } from '@/hooks/useAppThemeAndColorMode';
import { DydxProvider } from '@/hooks/useDydxClient';
import { DialogAreaProvider } from '@/hooks/useDialogArea';
import { DydxProvider } from '@/hooks/useDydxClient';
import { LocaleProvider } from '@/hooks/useLocaleSeparators';
import { PotentialMarketsProvider } from '@/hooks/usePotentialMarkets';
import { RestrictionProvider } from '@/hooks/useRestrictions';
import { SubaccountProvider } from '@/hooks/useSubaccount';

import { GlobalStyle } from '@/styles/globalStyle';

import { SelectMenu, SelectItem } from '@/components/SelectMenu';
import { SelectItem, SelectMenu } from '@/components/SelectMenu';

import { store } from '@/state/_store';
import {
AppColorMode,
AppTheme,
AppThemeSystemSetting,
AppColorMode,
setAppThemeSetting,
setAppColorMode,
setAppThemeSetting,
} from '@/state/configs';

import { setLocaleLoaded, setSelectedLocale } from '@/state/localization';
import { store } from '@/state/_store';

import { config } from '@/lib/wagmi';

import '@/index.css';
import './ladle.css';

const queryClient = new QueryClient();
Expand Down
2 changes: 2 additions & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
18
engine-strict=true
16 changes: 15 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,19 @@
"printWidth": 100,
"singleQuote": true,
"trailingComma": "es5",
"jsxBracketSameLine": false
"jsxBracketSameLine": false,
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrder": [
"^./polyfills$",
"^react$",
"<THIRD_PARTY_MODULES>",
"^@/(constants|abi)(.*)$",
"^@/(hooks|contexts)(.*)$",
"^@/(styles|icons)(.*)$",
"^@/(components|views|pages|layout)(.*)$",
"^@/state(.*)$",
"^@/lib(.*)$",
"^[./]"
],
"importOrderSeparation": true
}
14 changes: 12 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
{
"explorer.sortOrder": "mixed"
}
"explorer.sortOrder": "mixed",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"files.watcherExclude": {
"**/.git": true,
"**/node_modules/*": true,
"**/node_modules/@dydxprotocol/v4-abacus": false
},
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
}
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,32 @@ Pull requests are the best way to propose changes to the codebase (we use [Githu
3. Make sure your code lints.
4. Issue that pull request!

## We use [Conventional Commits](https://github.com/conventional-changelog/commitlint)
We use a commit-msg hook to check if your commit messages meet the conventional commit format.

In general the pattern mostly looks like this:

`type(scope?): subject` #scope is optional; multiple scopes are supported (current delimiter options: "/", "\" and ",")

### Real world examples can look like this:
`chore: run tests on travis ci`
`fix(server): send cors headers`
`feat(blog): add comment section`

Common types according to commitlint-config-conventional can be:

build
chore
ci
docs
feat
fix
perf
refactor
revert
style
test

## Any contributions you make will be under the same License
When you submit code changes, your submissions are understood to be under the same [License](https://github.com/dydxprotocol/v4-web/blob/master/LICENSE) that covers the project.

Expand Down
Loading

0 comments on commit 81eb640

Please sign in to comment.