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

To Production #798

Merged
merged 24 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
32b7bc2
fix: remove Language Selection component (#797)
SarjuHansaliya Sep 12, 2023
3fc2349
fix: removed intercom (#796)
prodesert22 Sep 12, 2023
c39a07f
feat: airdrop removed (#800)
bilalcorbacioglu Oct 13, 2023
8d81961
feat: Replace Pangolin components with Honeycomb components (#799)
SarjuHansaliya Oct 17, 2023
5a9f6b7
chore: update governance package
SarjuHansaliya Oct 18, 2023
bb6f6b5
feat: added elixirvault
bilalcorbacioglu Nov 7, 2023
95cfc24
fix: updated packages
bilalcorbacioglu Nov 7, 2023
7701a76
fix: update versions
SarjuHansaliya Nov 9, 2023
653e793
chore: try NODE_OPTIONS for build
SarjuHansaliya Nov 9, 2023
f57334c
fix: add vercel deployment
SarjuHansaliya Nov 11, 2023
9f8b3d2
fix: update honeycomb-provider package version (#805)
bilalcorbacioglu Nov 14, 2023
c0f9bcc
chore: update honeycomb elixir and swap package
SarjuHansaliya Nov 15, 2023
4c9a4bd
chore: udpate components
SarjuHansaliya Nov 20, 2023
fe8bd5e
chore: update components
SarjuHansaliya Nov 25, 2023
633b209
chore: update components
SarjuHansaliya Nov 27, 2023
df63b46
Merge branch 'master' of github.com:pangolindex/interface into dev
SarjuHansaliya Nov 28, 2023
65b7fa0
feat: update discord link
prodesert22 Dec 8, 2023
9f3c64f
Merge pull request #809 from prodesert22/master
prodesert22 Dec 8, 2023
1e41425
feat: update readme with new discord link
prodesert22 Dec 8, 2023
11d6121
Merge pull request #811 from prodesert22/dev
prodesert22 Dec 8, 2023
0278164
chore: update honeycomb & sdk (integrate thegraph subgraph url)
SarjuHansaliya Dec 13, 2023
6493f15
chore: update honeycomb components
SarjuHansaliya Dec 14, 2023
d564d2e
chore: update honeycomb & sdk
SarjuHansaliya Dec 15, 2023
034ea1a
chore: update honeycomb 1.0.0
SarjuHansaliya Dec 15, 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
50 changes: 50 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deployment

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

on:
push:

jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'yarn'

- name: Install Vercel CLI
run: npm install --global vercel@latest

### Production Deployment ###
- name: Pull Vercel Environment Information ( Production )
if: github.ref == 'refs/heads/master'
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts ( Production )
if: github.ref == 'refs/heads/master'
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel ( Production )
if: github.ref == 'refs/heads/master'
run: vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

### Preview Deployment ###
- name: Pull Vercel Environment Information ( Preview )
if: github.ref != 'refs/heads/master'
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts ( Preview )
if: github.ref != 'refs/heads/master'
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel ( Preview )
if: github.ref != 'refs/heads/master'
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ cypress/fixtures/example.json
.yalc
yalc.lock

dist
dist
.vercel
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ An open source interface for Pangolin -- a community-driven decentralized exchan
- Website: [pangolin.exchange](https://pangolin.exchange/)
- Interface: [app.pangolin.exchange](https://app.pangolin.exchange)
- Telegram: [Pangolin](https://t.me/pangolindexV2)
- Discord: [Pangolin](https://discord.com/invite/pangolindex)
- Discord: [Pangolin](https://discord.com/invite/CZttnRaYjK)
- Twitter: [@pangolindex](https://twitter.com/pangolindex)


Expand Down
38 changes: 0 additions & 38 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,6 @@
<title>Pangolin</title>
</head>
<body>
<script>
window.intercomSettings = {
app_id: 'uj2kwt4z'
}
</script>
<script>
;(function() {
var w = window
var ic = w.Intercom
if (typeof ic === 'function') {
ic('reattach_activator')
ic('update', w.intercomSettings)
} else {
var d = document
var i = function() {
i.c(arguments)
}
i.q = []
i.c = function(args) {
i.q.push(args)
}
w.Intercom = i
var l = function() {
var s = d.createElement('script')
s.type = 'text/javascript'
s.async = true
s.src = 'https://widget.intercom.io/widget/uj2kwt4z'
var x = d.getElementsByTagName('script')[0]
x.parentNode.insertBefore(s, x)
}
if (w.attachEvent) {
w.attachEvent('onload', l)
} else {
w.addEventListener('load', l, false)
}
}
})()
</script>
<div id="root"></div>
<script>
window.global = window
Expand Down
35 changes: 22 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,25 @@
"@ethersproject/strings": "5.6.1",
"@ethersproject/wallet": "5.6.2",
"@gnosis.pm/safe-apps-web3-react": "0.6.8",
"@honeycomb-finance/airdrop": "1.0.0",
"@honeycomb-finance/bridge": "1.0.0",
"@honeycomb-finance/core": "1.0.0",
"@honeycomb-finance/elixir": "1.0.0",
"@honeycomb-finance/governance": "1.0.0",
"@honeycomb-finance/honeycomb-provider": "1.0.0",
"@honeycomb-finance/pools": "1.0.0",
"@honeycomb-finance/portfolio": "1.0.0",
"@honeycomb-finance/sar": "1.0.0",
"@honeycomb-finance/shared": "1.0.0",
"@honeycomb-finance/state-hooks": "1.0.0",
"@honeycomb-finance/swap": "1.0.0",
"@honeycomb-finance/wallet-connectors": "1.0.0",
"@honeycomb-finance/walletmodal": "1.0.0",
"@metamask/jazzicon": "2.0.0",
"@pangolindex/components": "7.3.12",
"@pangolindex/exchange-contracts": "2.1.7",
"@pangolindex/exchange-contracts": "2.1.9",
"@pangolindex/governance": "1.2.0",
"@pangolindex/sdk": "5.3.7",
"@pangolindex/sdk": "5.3.8",
"@pangolindex/token-lists": "1.0.2",
"@pangolindex/web3-react-injected-connector": "1.0.1",
"@reach/dialog": "0.10.5",
"@reduxjs/toolkit": "1.8.0",
"@types/jest": "25.2.3",
Expand All @@ -45,7 +57,7 @@
"@types/testing-library__cypress": "5.0.9",
"@typescript-eslint/eslint-plugin": "4.6.0",
"@typescript-eslint/parser": "4.6.0",
"@vitejs/plugin-react": "^3.1.0",
"@vitejs/plugin-react": "4.1.0",
"@web3-react/abstract-connector": "6.0.7",
"@web3-react/core": "6.0.9",
"@web3-react/walletconnect-connector": "6.1.1",
Expand Down Expand Up @@ -85,7 +97,7 @@
"react-error-overlay": "6.0.9",
"react-feather": "2.0.9",
"react-markdown": "8.0.1",
"react-query": "3.34.16",
"react-query": "3.39.3",
"react-redux": "7.2.6",
"react-router-dom": "6.8.1",
"react-spring": "8.0.27",
Expand All @@ -97,11 +109,12 @@
"recharts": "2.1.13",
"redux-localstorage-simple": "2.4.1",
"remark-gfm": "3.0.1",
"rollup-plugin-node-polyfills": "0.2.1",
"serve": "11.3.2",
"start-server-and-test": "1.14.0",
"styled-components": "5.3.1",
"typescript": "4.9.5",
"vite": "^4.1.4",
"vite": "4.4.9",
"vite-plugin-svgr": "^2.4.0"
},
"resolutions": {
Expand All @@ -112,7 +125,8 @@
},
"scripts": {
"start": "vite",
"build": "tsc && vite build",
"build": "node ./scripts/build.js",
"vite:build": "tsc && NODE_OPTIONS=--max-old-space-size=8192 vite build",
"serve": "serve build -l 3000",
"version": "npm run build",
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx --fix",
Expand All @@ -136,11 +150,6 @@
"node_modules"
]
},
"browserslist": [
">0.2%",
"not dead",
"not op_mini all"
],
"license": "GPL-3.0-or-later",
"dependencies": {
"@babel/core": "^7.20.5",
Expand Down
31 changes: 31 additions & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* eslint-disable */
const { spawn } = require('child_process')

// console.log('setting NODE_OPTIONS to --max-old-space-size=8192')
// Step 1: Set the environment variable
// process.env.NODE_OPTIONS = '--max-old-space-size=8192'

// Step 2: Run the "yarn build" command
const yarnBuild = spawn('yarn', ['vite:build'], {
stdio: 'inherit', // This option will pipe the stdio of the child process to the parent, effectively displaying it in the terminal.
shell: true, // This option will run the command in a shell, allowing for environment variable expansion.
env: process.env // Pass the modified environment variables to the child process.
})

// Step 4: Handle errors (though with 'stdio: inherit', errors will be displayed automatically)
yarnBuild.on('error', error => {
console.error(`Error executing "yarn build": ${error}`)
})

yarnBuild.on('close', code => {
if (code !== 0) {
console.error(`"yarn build" exited with code ${code}`)
console.log('spawning another build')
spawn('yarn', ['vite:build'], {
stdio: 'inherit', // This option will pipe the stdio of the child process to the parent, effectively displaying it in the terminal.
shell: true, // This option will run the command in a shell, allowing for environment variable expansion.
env: process.env // Pass the modified environment variables to the child process.
})
}
})
/* eslint-enable */
2 changes: 1 addition & 1 deletion src/components/AccountDetails/Copy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from 'styled-components'
import useCopyClipboard from '../../hooks/useCopyClipboard'
import { LinkStyledButton } from '../../theme'
import { CheckCircle, Copy } from 'react-feather'
import { useTranslation } from '@pangolindex/components'
import { useTranslation } from '@honeycomb-finance/shared'

const CopyIcon = styled(LinkStyledButton)`
color: ${({ theme }) => theme.text3};
Expand Down
3 changes: 2 additions & 1 deletion src/components/AccountDetails/Transaction.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { useMemo } from 'react'
import styled from 'styled-components'
import { CheckCircle, Triangle } from 'react-feather'
import { getEtherscanLink, useAllTransactions as useAllTransactionsComponents } from '@pangolindex/components'
import { getEtherscanLink } from '@honeycomb-finance/shared'
import { useAllTransactions as useAllTransactionsComponents } from '@honeycomb-finance/state-hooks'
import { useChainId } from '../../hooks'
import { ExternalLink } from '../../theme'
import { useAllTransactions } from '../../state/transactions/hooks'
Expand Down
16 changes: 5 additions & 11 deletions src/components/AccountDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,10 @@ import { clearAllTransactions } from 'src/state/transactions/actions'
import { AutoRow } from '../Row'
import Copy from './Copy'
import Transaction from './Transaction'
import {
NearConnector,
useAllTransactionsClearer,
useTranslation,
getEtherscanLink,
shortenAddressMapping,
PangolinInjectedWallet,
injected,
useActiveWeb3React
} from '@pangolindex/components'
import { useAllTransactionsClearer } from '@honeycomb-finance/state-hooks'
import { NearConnector, injected } from '@honeycomb-finance/wallet-connectors'
import { HoneycombInjectedWallet } from '@honeycomb-finance/walletmodal'
import { useActiveWeb3React, useTranslation, getEtherscanLink, shortenAddressMapping } from '@honeycomb-finance/shared'
import Identicon from '../Identicon'
import { ExternalLink as LinkIcon } from 'react-feather'
import { LinkStyledButton, TYPE } from 'src/theme'
Expand Down Expand Up @@ -76,7 +70,7 @@ export default function AccountDetails({
const wallet = Object.values(supportedWallets).find(_wallet => _wallet.isActive)

function getStatusIcon() {
if (wallet instanceof PangolinInjectedWallet || wallet?.connector === injected) {
if (wallet instanceof HoneycombInjectedWallet || wallet?.connector === injected) {
return (
<IconWrapper size={16}>
<Identicon />
Expand Down
2 changes: 1 addition & 1 deletion src/components/AccountDetails/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from 'styled-components'
import { ReactComponent as Close } from '../../assets/svg/x.svg'
import { ButtonSecondary } from '../Button'
import { ExternalLink } from '../../theme'
import { Box } from '@pangolindex/components'
import { Box } from '@honeycomb-finance/core'

export const HeaderRow = styled(Box)`
${({ theme }) => theme.flexRowNoWrap};
Expand Down
2 changes: 1 addition & 1 deletion src/components/AccountDetailsModal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import styled from 'styled-components'
import AccountDetails from '../AccountDetails'
import { Modal } from '@pangolindex/components'
import { Modal } from '@honeycomb-finance/core'

const Wrapper = styled.div`
${({ theme }) => theme.flexColumnNoWrap}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Beta/ComingSoon/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react'
import { Text, useTranslation } from '@pangolindex/components'
import { useTranslation } from '@honeycomb-finance/shared'
import { Text } from '@honeycomb-finance/core'

import { Wrapper } from './styled'

const ComingSoon = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Beta/ComingSoon/styled.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box } from '@pangolindex/components'
import { Box } from '@honeycomb-finance/core'
import styled from 'styled-components'

export const Wrapper = styled(Box)`
Expand Down
3 changes: 2 additions & 1 deletion src/components/Beta/TransactionSubmitted/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useContext } from 'react'
import { Box, Text, Button, useTranslation, getEtherscanLink } from '@pangolindex/components'
import { Box, Text, Button } from '@honeycomb-finance/core'
import { useTranslation, getEtherscanLink } from '@honeycomb-finance/shared'
import { Root, Link } from './styled'
import { ArrowUpCircle } from 'react-feather'
import { useChainId } from 'src/hooks'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Beta/TransactionSubmitted/styled.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Text } from '@pangolindex/components'
import { Box, Text } from '@honeycomb-finance/core'
import styled from 'styled-components'

export const Root = styled(Box)`
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components'
import { darken } from 'polished'

import { Button } from '@pangolindex/components'
import { Button } from '@honeycomb-finance/core'

const Base = styled(Button)<{
padding?: string
Expand Down
3 changes: 2 additions & 1 deletion src/components/Header/Polling.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { useState, useEffect } from 'react'
import styled, { keyframes } from 'styled-components'
import { TYPE, ExternalLink } from '../../theme'
import { getEtherscanLink, useBlockNumber } from '@pangolindex/components'
import { getEtherscanLink } from '@honeycomb-finance/shared'
import { useBlockNumber } from '@honeycomb-finance/state-hooks'
import { useChainId } from '../../hooks'

const StyledPolling = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/URLWarning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from 'styled-components'
import { AlertTriangle, X } from 'react-feather'
import { useURLWarningToggle, useURLWarningVisible } from '../../state/user/hooks'
import { isMobile } from 'react-device-detect'
import { useTranslation } from '@pangolindex/components'
import { useTranslation } from '@honeycomb-finance/shared'

const PhishAlert = styled.div<{ isActive: any }>`
width: 100%;
Expand Down
Loading
Loading