Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Release/2.25 #565

Merged
merged 22 commits into from
Jul 26, 2023
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
186c47b
chore(deps-dev): bump playwright from 1.35.0 to 1.35.1 (#527)
dependabot[bot] Jul 3, 2023
14d0c50
chore(deps-dev): bump enhanced-resolve from 5.14.1 to 5.15.0 (#528)
dependabot[bot] Jul 3, 2023
b08aff1
chore(deps-dev): bump @types/cytoscape from 3.19.9 to 3.19.10 (#529)
dependabot[bot] Jul 3, 2023
17d5db6
chore(deps): bump graphql from 16.6.0 to 16.7.1 (#538)
dependabot[bot] Jul 3, 2023
d9fcdfa
chore(deps): bump @apollo/client from 3.7.15 to 3.7.16 (#539)
dependabot[bot] Jul 3, 2023
877dccf
Merge remote-tracking branch 'origin/main' into develop
alfetopito Jul 13, 2023
efdca5c
fix(percentage-display): improve huge surplus display (#549)
alfetopito Jul 14, 2023
769aa63
test(formatPercentage): fix unit tests
alfetopito Jul 14, 2023
ad6ebfd
chore: show fullAppData if available (#550)
anxolin Jul 16, 2023
39dadea
chore(deps-dev): bump playwright from 1.35.1 to 1.36.1 (#554)
dependabot[bot] Jul 18, 2023
50b5251
chore(deps-dev): bump @babel/plugin-transform-runtime (#555)
dependabot[bot] Jul 18, 2023
ce607b0
chore(deps-dev): bump @babel/core from 7.22.5 to 7.22.9 (#553)
dependabot[bot] Jul 18, 2023
2ec40ea
Update explorer to v1 of app-data (#552)
anxolin Jul 18, 2023
b723737
Remove upload to IPFS (#558)
anxolin Jul 18, 2023
7afa539
Hide link to IPFS for new app-datas (#557)
anxolin Jul 18, 2023
66c6695
Simplify metadata logic (#559)
anxolin Jul 18, 2023
e9bd61a
chore(deps-dev): bump eslint-plugin-react from 7.32.2 to 7.33.0 (#562)
dependabot[bot] Jul 24, 2023
487bc2a
chore(deps-dev): bump eslint-plugin-storybook from 0.6.12 to 0.6.13 (…
dependabot[bot] Jul 24, 2023
fc07fe3
Handle appData errors (#566)
anxolin Jul 25, 2023
4fd2219
fix: small typo
nenadV91 Jul 25, 2023
2b707e1
fix: deep link graph views (#563)
alfetopito Jul 25, 2023
05fe569
chore: bump version to 2.25.0
nenadV91 Jul 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions getWebpackConfig.js
Original file line number Diff line number Diff line change
@@ -158,9 +158,6 @@ function getWebpackConfig({ apps = [], config = {}, envVars = {}, defineVars = {
assert(templatePath, '"templatePath" missing in config')
assert(logoPath, '"logoPath" missing in config')

// Log the apps
console.log('apps', apps)

// Generate one entry point per app
const entryPoints = apps.reduce((acc, app) => {
const { name } = app
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/explorer",
"version": "2.24.0",
"version": "2.25.0",
"description": "",
"main": "src/index.js",
"sideEffects": false,
@@ -46,9 +46,9 @@
"author": "",
"dependencies": {
"@apollo/client": "^3.1.5",
"@cowprotocol/app-data": "v0.1.0",
"@cowprotocol/app-data": "^1.0.2",
"@cowprotocol/contracts": "1.3.1",
"@cowprotocol/cow-sdk": "^2.0.6",
"@cowprotocol/cow-sdk": "^2.2.1",
"@fortawesome/fontawesome-svg-core": "^6.1.2",
"@fortawesome/free-regular-svg-icons": "^6.1.2",
"@fortawesome/free-solid-svg-icons": "^6.1.2",
2 changes: 1 addition & 1 deletion src/api/operator/types.ts
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ export type RawOrder = EnrichedOrder
*/
export type Order = Pick<
RawOrder,
'owner' | 'uid' | 'appData' | 'kind' | 'partiallyFillable' | 'signature' | 'class'
'owner' | 'uid' | 'appData' | 'kind' | 'partiallyFillable' | 'signature' | 'class' | 'fullAppData'
> & {
receiver: string
txHash?: string
21 changes: 11 additions & 10 deletions src/apps/explorer/components/TransactionsTableWidget/index.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import React, { useState, useEffect, useCallback } from 'react'
import React, { useCallback, useEffect, useState } from 'react'
import { faListUl, faProjectDiagram } from '@fortawesome/free-solid-svg-icons'
import { useHistory } from 'react-router-dom'

import { useQuery } from 'hooks/useQuery'
import { useQuery, useUpdateQueryString } from 'hooks/useQuery'
import { BlockchainNetwork, TransactionsTableContext } from './context/TransactionsTableContext'
import { useGetTxOrders, useTxOrderExplorerLink } from 'hooks/useGetOrders'
import RedirectToSearch from 'components/RedirectToSearch'
import { RedirectToNetwork, useNetworkId } from 'state/network'
import { Order } from 'api/operator'
import { TransactionsTableWithData } from 'apps/explorer/components/TransactionsTableWidget/TransactionsTableWithData'
import { TabItemInterface, TabIcon } from 'components/common/Tabs/Tabs'
import { TabIcon, TabItemInterface } from 'components/common/Tabs/Tabs'
import ExplorerTabs from '../common/ExplorerTabs/ExplorerTabs'
import { TitleAddress, FlexContainer, Title } from 'apps/explorer/pages/styled'
import { FlexContainer, Title, TitleAddress } from 'apps/explorer/pages/styled'
import { BlockExplorerLink } from 'components/common/BlockExplorerLink'
import { ConnectionStatus } from 'components/ConnectionStatus'
import { Notification } from 'components/Notification'
import { TransactionBatchGraph } from 'apps/explorer/components/TransanctionBatchGraph'
import CowLoading from 'components/common/CowLoading'
import { TAB_QUERY_PARAM_KEY } from 'apps/explorer/const'

interface Props {
txHash: string
@@ -33,7 +33,7 @@ const DEFAULT_TAB = TabView[1]

function useQueryViewParams(): { tab: string } {
const query = useQuery()
return { tab: query.get('tab')?.toUpperCase() || DEFAULT_TAB } // if URL param empty will be used DEFAULT
return { tab: query.get(TAB_QUERY_PARAM_KEY)?.toUpperCase() || DEFAULT_TAB } // if URL param empty will be used DEFAULT
}

const tabItems = (orders: Order[] | undefined, networkId: BlockchainNetwork, txHash: string): TabItemInterface[] => {
@@ -61,7 +61,7 @@ export const TransactionsTableWidget: React.FC<Props> = ({ txHash }) => {
const isZeroOrders = !!(orders && orders.length === 0)
const notGpv2ExplorerData = useTxOrderExplorerLink(txHash, isZeroOrders)

const history = useHistory()
const updateQueryString = useUpdateQueryString()

// Avoid redirecting until another network is searched again
useEffect(() => {
@@ -81,9 +81,10 @@ export const TransactionsTableWidget: React.FC<Props> = ({ txHash }) => {
setTabViewSelected(TabView[newTabViewName])
}, [])

useEffect(() => {
history.replace({ search: `?tab=${TabView[tabViewSelected].toLowerCase()}` })
}, [history, tabViewSelected])
useEffect(
() => updateQueryString(TAB_QUERY_PARAM_KEY, TabView[tabViewSelected].toLowerCase()),
[tabViewSelected, updateQueryString],
)

if (errorTxPresentInNetworkId && networkId != errorTxPresentInNetworkId) {
return <RedirectToNetwork networkId={errorTxPresentInNetworkId} />
18 changes: 4 additions & 14 deletions src/apps/explorer/components/TransanctionBatchGraph/hooks.ts
Original file line number Diff line number Diff line change
@@ -18,8 +18,7 @@ import {
PopperInstance,
ViewType,
} from 'apps/explorer/components/TransanctionBatchGraph/types'
import { useQuery } from 'hooks/useQuery'
import { useHistory } from 'react-router-dom'
import { useQuery, useUpdateQueryString } from 'hooks/useQuery'
import { Order } from 'api/operator'
import { useTransactionData } from 'hooks/useTransactionData'
import {
@@ -205,18 +204,9 @@ function useQueryViewParams(): { visualization: string } {
}

function useUpdateVisQuery(): (vis: string) => void {
const query = useQuery()
const history = useHistory()

// TODO: this is causing one extra re-render as the query is being updated when history is updated
// TODO: make it not depend on query
return useCallback(
(vis: string) => {
query.set(VISUALIZATION_PARAM_NAME, vis)
history.replace({ search: query.toString() })
},
[history, query],
)
const updateQueryString = useUpdateQueryString()

return useCallback((vis: string) => updateQueryString(VISUALIZATION_PARAM_NAME, vis), [updateQueryString])
}

export function useTxBatchData(
2 changes: 2 additions & 0 deletions src/apps/explorer/const.ts
Original file line number Diff line number Diff line change
@@ -53,3 +53,5 @@ export const SPECIAL_ADDRESSES = {
'0xa03be496e67ec29bc62f01a428683d7f9c204930': 'Solver Rewards Safe',
'0xca771eda0c70aa7d053ab1b25004559b918fe662': 'CoW DAO',
}

export const TAB_QUERY_PARAM_KEY = 'tab'
Loading