Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix constants publish [SLT-160] #3224

Merged
merged 24 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion docs/bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"prism-react-renderer": "^2.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"synapse-constants": "1.3.22"
"@synapsecns/synapse-constants": "1.5.6"
abtestingalpha marked this conversation as resolved.
Show resolved Hide resolved
},
"devDependencies": {
"typescript": "~5.2.2"
Expand Down
2 changes: 1 addition & 1 deletion docs/bridge/src/components/Routes.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BRIDGABLE_TOKENS, CHAINS } from 'synapse-constants'
import { BRIDGABLE_TOKENS, CHAINS } from '@synapsecns/synapse-constants'

const CHAINS_BY_ID = {}

Expand Down
2 changes: 1 addition & 1 deletion docs/bridge/src/components/USDC.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { USDC } from 'synapse-constants'
import { USDC } from '@synapsecns/synapse-constants'
console.log(0, USDC)

export const Test = () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/components/misc/AssetImage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Image from 'next/image'
import { TOKEN_HASH_MAP, AVWETH, USDC } from 'synapse-constants'
import { TOKEN_HASH_MAP, AVWETH, USDC } from '@synapsecns/synapse-constants'
import { getTokenAddressUrl } from '@urls'

export const AssetImage = ({ tokenAddress, chainId, className }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/components/misc/ChainImage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Image from 'next/image'
import { CHAINS } from 'synapse-constants'
import { CHAINS } from '@synapsecns/synapse-constants'
import { QuestionMarkCircleIcon } from '@heroicons/react/outline'

const CHAINS_BY_ID = CHAINS.CHAINS_BY_ID
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/components/misc/ChainInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from 'next/link'
import Image from 'next/image'
import { CHAINS } from 'synapse-constants'
import { CHAINS } from '@synapsecns/synapse-constants'
import { QuestionMarkCircleIcon } from '@heroicons/react/outline'
import { getChainUrl, getExplorerTxUrl } from '@urls'

Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/components/misc/MostActive.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TOKEN_HASH_MAP, CHAINS } from 'synapse-constants'
import { TOKEN_HASH_MAP, CHAINS } from '@synapsecns/synapse-constants'
import { getCoinTextColor } from '@utils/styles/coins'
import { getNetworkTextColor } from '@utils/styles/networks'
import { Grid } from '@components/tailwind/Grid'
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/components/misc/TokenOnChain.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TOKEN_HASH_MAP, CHAINS } from 'synapse-constants'
import { TOKEN_HASH_MAP, CHAINS } from '@synapsecns/synapse-constants'
import { getCoinTextColor } from '@utils/styles/coins'
import { getNetworkTextColor } from '@utils/styles/networks'
import { getChainUrl } from '@urls'
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/components/misc/ToolTip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ReactDOM from 'react-dom'
import { CHAINS } from 'synapse-constants'
import { CHAINS } from '@synapsecns/synapse-constants'
import { TableHeader } from '@components/TransactionTable/TableHeader'
import { ChainInfo } from '@components/misc/ChainInfo'
import { formatUSD } from '@utils/formatUSD'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react'
import { CHAINS } from 'synapse-constants'
import { CHAINS } from '@synapsecns/synapse-constants'
import TextField from '@mui/material/TextField'
import {
inputStyle,
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/components/pages/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { StandardPageContainer } from '@components/layouts/StandardPageContainer
import { BridgeTransactionTable } from '@components/BridgeTransaction/BridgeTransactionTable'
import { useLazyQuery, useQuery } from '@apollo/client'
import { SynapseLogoSvg } from '@components/layouts/MainLayout/SynapseLogoSvg'
import { CHAINS } from 'synapse-constants'
import { CHAINS } from '@synapsecns/synapse-constants'
import {
GET_BRIDGE_TRANSACTIONS_QUERY,
DAILY_STATISTICS_BY_CHAIN,
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"recharts": "^2.3.2",
"sharp": "^0.31.3",
"swr": "^1.3.0",
"synapse-constants": "^1.5.6",
"@synapsecns/synapse-constants": "^1.5.6",
abtestingalpha marked this conversation as resolved.
Show resolved Hide resolved
"tailwind-merge": "^1.3.0",
"tiny-warning": "^1.0.3",
"web-vitals": "^2.1.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/pages/chain/[chainId].tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from 'lodash'
import { useState, useEffect } from 'react'
import { useRouter } from 'next/router'
import { CHAINS } from 'synapse-constants'
import { CHAINS } from '@synapsecns/synapse-constants'
import { useLazyQuery, useQuery } from '@apollo/client'
import {
GET_BRIDGE_TRANSACTIONS_QUERY,
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/pages/token/[tokenAddress].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import _ from 'lodash'
import { useRouter } from 'next/router'
import { useState, useEffect } from 'react'
import { useSearchParams } from 'next/navigation'
import { TOKEN_HASH_MAP } from 'synapse-constants'
import { TOKEN_HASH_MAP } from '@synapsecns/synapse-constants'
import { useQuery } from '@apollo/client'
import { GET_BRIDGE_TRANSACTIONS_QUERY } from '@graphql/queries'
import { TRANSACTIONS_PATH, getChainUrl } from '@urls'
Expand Down
9 changes: 4 additions & 5 deletions packages/explorer-ui/pages/tx/[kappa].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ChainInfo } from '@components/misc/ChainInfo'
import { Error } from '@components/Error'
import { StandardPageContainer } from '@components/layouts/StandardPageContainer'
import { useRouter } from 'next/router'
import { CHAINS } from 'synapse-constants'
import { CHAINS } from '@synapsecns/synapse-constants'
import { GET_BRIDGE_TRANSACTIONS_QUERY } from '@graphql/queries'
import { API_URL } from '@graphql'
import { HorizontalDivider } from '@components/misc/HorizontalDivider'
Expand Down Expand Up @@ -39,12 +39,11 @@ export const BridgeTransaction = ({ queryResult }) => {

// Get time taken to complete tx w/ appropriate units.
const getTimeElapsedStr = (start, end) => {
const diff = end - start;
const diff = end - start
if (diff <= 0) {
return '1 second';
return '1 second'
}
return diff === 1 ? '1 second' : `${diff} seconds`;

return diff === 1 ? '1 second' : `${diff} seconds`
}
let content

Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/pages/txs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CHAINS } from 'synapse-constants'
import { CHAINS } from '@synapsecns/synapse-constants'
import { useState, useEffect } from 'react'
import { useLazyQuery } from '@apollo/client'
import { GET_BRIDGE_TRANSACTIONS_QUERY } from '@graphql/queries'
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/utils/addressToDecimals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TOKEN_HASH_MAP } from 'synapse-constants'
import { TOKEN_HASH_MAP } from '@synapsecns/synapse-constants'

export const addressToDecimals = ({ tokenAddress, chainId }) => {
let decimals =
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/utils/addressToSymbol.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TOKEN_HASH_MAP } from 'synapse-constants'
import { TOKEN_HASH_MAP } from '@synapsecns/synapse-constants'

export const addressToSymbol = ({ tokenAddress, chainId }) => {
if (
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/utils/classes/Token.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'lodash'
import { CHAINS } from 'synapse-constants'
import { CHAINS } from '@synapsecns/synapse-constants'

const ChainId = CHAINS.ChainId

Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/utils/styles/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
NOTE,
MIM,
AVWETH,
} from 'synapse-constants'
} from '@synapsecns/synapse-constants'

const COLOR_COIN_MAP = {
gray: [FRAX, GOHM, SDT, VSTA],
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/utils/styles/networks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CHAINS } from 'synapse-constants'
import { CHAINS } from '@synapsecns/synapse-constants'

const ChainId = CHAINS.ChainId

Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-ui/utils/urls/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CHAINS } from 'synapse-constants'
import { CHAINS } from '@synapsecns/synapse-constants'

const CHAINS_BY_ID = CHAINS.CHAINS_BY_ID

Expand Down
2 changes: 1 addition & 1 deletion packages/synapse-constants/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "synapse-constants",
"name": "@synapsecns/synapse-constants",
abtestingalpha marked this conversation as resolved.
Show resolved Hide resolved
"version": "1.5.6",
"description": "This is an npm package that maintains all synapse constants",
"main": "dist/cjs/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/synapse-constants/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default [
}),
codecovRollupPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: 'synapse-constants',
bundleName: '@synapsecns/synapse-constants',
uploadToken: process.env.CODECOV_TOKEN,
uploadOverrides: {
sha: process.env.GH_COMMIT_SHA,
Expand Down
12 changes: 1 addition & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14245,7 +14245,7 @@ copy-webpack-plugin@^11.0.0:
schema-utils "^4.0.0"
serialize-javascript "^6.0.0"

copyfiles@^2.3.0, copyfiles@^2.4.1:
copyfiles@^2.3.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5"
integrity sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==
Expand Down Expand Up @@ -32581,16 +32581,6 @@ symbol.prototype.description@^1.0.0:
has-symbols "^1.0.3"
object.getownpropertydescriptors "^2.1.7"

synapse-constants@1.3.22:
version "1.3.22"
resolved "https://registry.yarnpkg.com/synapse-constants/-/synapse-constants-1.3.22.tgz#e885e12870909b62b1484db007868b8b59648dd7"
integrity sha512-PnEuKh8LBujoqOW+VzbQPkAvDld0aBxQUcnN7f0HeSxoF43I5gHyTYngm86qmgf3D+9rPplrigYtVscIBR8NfQ==
dependencies:
"@codecov/webpack-plugin" "^0.0.1-beta.10"
copyfiles "^2.4.1"
ethers "5.7.2"
lodash "^4.17.21"

synchronous-promise@^2.0.15:
version "2.0.17"
resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.17.tgz#38901319632f946c982152586f2caf8ddc25c032"
Expand Down
Loading