merge main
This commit is contained in:
parent
4be50f2768
commit
01442822b0
|
@ -43,7 +43,7 @@ const AccountNameModal: FunctionComponent<AccountNameModalProps> = ({
|
|||
name
|
||||
)
|
||||
actions.fetchAllMangoAccounts(wallet)
|
||||
actions.reloadMangoAccount()
|
||||
await actions.reloadMangoAccount()
|
||||
onClose?.()
|
||||
notify({
|
||||
title: t('name-updated'),
|
||||
|
|
|
@ -1,23 +1,33 @@
|
|||
import React from 'react'
|
||||
import React, { useCallback } from 'react'
|
||||
import { FiveOhFive } from './FiveOhFive'
|
||||
import * as Sentry from '@sentry/react'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
const ErrorBoundary: React.FC<any> = (props) => {
|
||||
const postError = (error, componentStack) => {
|
||||
if (process.env.NEXT_PUBLIC_ERROR_WEBHOOK_URL) {
|
||||
try {
|
||||
fetch(process.env.NEXT_PUBLIC_ERROR_WEBHOOK_URL, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
content: `UI ERROR: ${error} : ${componentStack}`.slice(0, 1999),
|
||||
}),
|
||||
})
|
||||
} catch (err) {
|
||||
console.error('Error posting to notify webhook:', err)
|
||||
const { asPath } = useRouter()
|
||||
|
||||
const postError = useCallback(
|
||||
(error, componentStack) => {
|
||||
if (process.env.NEXT_PUBLIC_ERROR_WEBHOOK_URL) {
|
||||
try {
|
||||
fetch(process.env.NEXT_PUBLIC_ERROR_WEBHOOK_URL, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
content:
|
||||
`UI ERROR: (${asPath}) ${error} : ${componentStack}`.slice(
|
||||
0,
|
||||
1999
|
||||
),
|
||||
}),
|
||||
})
|
||||
} catch (err) {
|
||||
console.error('Error posting to notify webhook:', err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
[asPath]
|
||||
)
|
||||
|
||||
return (
|
||||
<Sentry.ErrorBoundary
|
||||
|
|
|
@ -90,6 +90,7 @@ const TopBar = () => {
|
|||
const { connected, publicKey } = useWallet()
|
||||
const mangoAccount = useMangoStore((s) => s.selectedMangoAccount.current)
|
||||
const initialLoad = useMangoStore((s) => s.selectedMangoAccount.initialLoad)
|
||||
const loading = useMangoStore((s) => s.selectedMangoAccount.loading)
|
||||
const router = useRouter()
|
||||
const [showAccountsModal, setShowAccountsModal] = useState(false)
|
||||
const [showSettingsModal, setShowSettingsModal] = useState(false)
|
||||
|
@ -132,7 +133,7 @@ const TopBar = () => {
|
|||
: ''}
|
||||
</span>
|
||||
{connected || pubkey ? (
|
||||
!initialLoad ? (
|
||||
!initialLoad && !loading ? (
|
||||
mangoAccount ? (
|
||||
<div
|
||||
className="default-transition flex items-center font-bold text-th-fgd-1 hover:text-th-fgd-3"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ReactNode, useEffect, useMemo, useState } from 'react'
|
||||
import { ReactNode, useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import dayjs from 'dayjs'
|
||||
import { MedalIcon } from './icons'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
|
@ -12,6 +12,25 @@ import { notify } from 'utils/notifications'
|
|||
const utc = require('dayjs/plugin/utc')
|
||||
dayjs.extend(utc)
|
||||
|
||||
const formatLeaderboardData = async (leaderboard) => {
|
||||
const walletPks = leaderboard.map((u) => u.wallet_pk)
|
||||
const profileDetailsResponse = await fetch(
|
||||
`https://mango-transaction-log.herokuapp.com/v3/user-data/multiple-profile-details?wallet-pks=${walletPks.toString()}`
|
||||
)
|
||||
const parsedProfileDetailsResponse = await profileDetailsResponse.json()
|
||||
|
||||
const leaderboardData = [] as any[]
|
||||
for (const item of leaderboard) {
|
||||
const profileDetails = parsedProfileDetailsResponse[item.wallet_pk]
|
||||
leaderboardData.push({
|
||||
...item,
|
||||
profile: profileDetails ? profileDetails : null,
|
||||
})
|
||||
}
|
||||
|
||||
return leaderboardData
|
||||
}
|
||||
|
||||
const LeaderboardTable = ({ range = '29' }) => {
|
||||
const { t } = useTranslation('common')
|
||||
const [pnlLeaderboardData, setPnlLeaderboardData] = useState<any[]>([])
|
||||
|
@ -24,23 +43,6 @@ const LeaderboardTable = ({ range = '29' }) => {
|
|||
const [leaderboardType, setLeaderboardType] = useState<string>('total-pnl')
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
const formatLeaderboardData = async (leaderboard) => {
|
||||
const walletPks = leaderboard.map((u) => u.wallet_pk)
|
||||
const profileDetailsResponse = await fetch(
|
||||
`https://mango-transaction-log.herokuapp.com/v3/user-data/multiple-profile-details?wallet-pks=${walletPks.toString()}`
|
||||
)
|
||||
const parsedProfileDetailsResponse = await profileDetailsResponse.json()
|
||||
const leaderboardData = [] as any[]
|
||||
for (const item of leaderboard) {
|
||||
const profileDetails = parsedProfileDetailsResponse[item.wallet_pk]
|
||||
leaderboardData.push({
|
||||
...item,
|
||||
profile: profileDetails ? profileDetails : null,
|
||||
})
|
||||
}
|
||||
return leaderboardData
|
||||
}
|
||||
|
||||
const fetchPnlLeaderboard = async () => {
|
||||
setLoading(true)
|
||||
try {
|
||||
|
@ -63,7 +65,7 @@ const LeaderboardTable = ({ range = '29' }) => {
|
|||
}
|
||||
}
|
||||
|
||||
const fetchPerpPnlLeaderboard = async () => {
|
||||
const fetchPerpPnlLeaderboard = useCallback(async () => {
|
||||
setLoading(true)
|
||||
try {
|
||||
const response = await fetch(
|
||||
|
@ -83,9 +85,9 @@ const LeaderboardTable = ({ range = '29' }) => {
|
|||
notify({ type: 'error', title: t('fetch-leaderboard-fail') })
|
||||
setLoading(false)
|
||||
}
|
||||
}
|
||||
}, [range, t])
|
||||
|
||||
const fetchSpotPnlLeaderboard = async () => {
|
||||
const fetchSpotPnlLeaderboard = useCallback(async () => {
|
||||
setLoading(true)
|
||||
const response = await fetch(
|
||||
`https://mango-transaction-log.herokuapp.com/v3/stats/spot-pnl-leaderboard?start-date=${dayjs()
|
||||
|
@ -100,7 +102,7 @@ const LeaderboardTable = ({ range = '29' }) => {
|
|||
setSpotPnlLeaderboardData(leaderboardData)
|
||||
|
||||
setLoading(false)
|
||||
}
|
||||
}, [range])
|
||||
|
||||
useEffect(() => {
|
||||
if (leaderboardType === 'total-pnl') {
|
||||
|
@ -239,7 +241,7 @@ const AccountCard = ({ rank, acc, rawPnl, profile, pnl }) => {
|
|||
lightest: '#EFBF8D',
|
||||
}
|
||||
return (
|
||||
<div className="relative" key={acc}>
|
||||
<div className="relative">
|
||||
{profile ? (
|
||||
<button
|
||||
className="absolute left-[118px] bottom-4 flex items-center space-x-2 rounded-full border border-th-fgd-4 px-2 py-1 hover:border-th-fgd-2 hover:filter"
|
||||
|
|
|
@ -8,7 +8,6 @@ import { ElementTitle } from './styles'
|
|||
import Button from './Button'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import { LinkButton } from 'components'
|
||||
import { sign } from 'tweetnacl'
|
||||
import bs58 from 'bs58'
|
||||
|
||||
const ImgWithLoader = (props) => {
|
||||
|
@ -59,8 +58,6 @@ const NftProfilePicModal = ({ isOpen, onClose }) => {
|
|||
})
|
||||
const message = new TextEncoder().encode(messageString)
|
||||
const signature = await signMessage(message)
|
||||
if (!sign.detached.verify(message, signature, publicKey.toBytes()))
|
||||
throw new Error('Invalid signature!')
|
||||
|
||||
const requestOptions = {
|
||||
method: 'POST',
|
||||
|
@ -106,8 +103,6 @@ const NftProfilePicModal = ({ isOpen, onClose }) => {
|
|||
})
|
||||
const message = new TextEncoder().encode(messageString)
|
||||
const signature = await signMessage(message)
|
||||
if (!sign.detached.verify(message, signature, publicKey.toBytes()))
|
||||
throw new Error('Invalid signature!')
|
||||
|
||||
const requestOptions = {
|
||||
method: 'POST',
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
import React from 'react'
|
||||
import { CheckCircleIcon, XIcon } from '@heroicons/react/solid'
|
||||
import Modal from './Modal'
|
||||
import Button from './Button'
|
||||
import useLocalStorageState from '../hooks/useLocalStorageState'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
export const SEEN_SERUM_COMP_KEY = 'seenSerumCompInfo'
|
||||
|
||||
const SerumCompModal = ({
|
||||
isOpen,
|
||||
onClose,
|
||||
}: {
|
||||
isOpen: boolean
|
||||
onClose?: (x) => void
|
||||
}) => {
|
||||
const [, setSeenSerumCompInfo] = useLocalStorageState(SEEN_SERUM_COMP_KEY)
|
||||
const router = useRouter()
|
||||
|
||||
const handleFindOutMore = () => {
|
||||
setSeenSerumCompInfo(true)
|
||||
router.push('/win-srm')
|
||||
}
|
||||
|
||||
return (
|
||||
<Modal isOpen={isOpen} onClose={onClose}>
|
||||
<Modal.Header>
|
||||
<div className="flex flex-col items-center">
|
||||
<div className="flex items-center justify-center space-x-4">
|
||||
<img
|
||||
className={`h-10 w-auto`}
|
||||
src="/assets/icons/srm.svg"
|
||||
alt="next"
|
||||
/>
|
||||
<XIcon className="h-5 w-5 text-th-primary" />
|
||||
<img
|
||||
className={`h-12 w-auto`}
|
||||
src="/assets/icons/logo.svg"
|
||||
alt="next"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Modal.Header>
|
||||
<h1 className="relative m-auto mb-2 w-max">Win a Share in 400k SRM</h1>
|
||||
<p className="text-center">
|
||||
40k SRM are up for grabs every week until 12 Sep
|
||||
</p>
|
||||
<div className="mt-4 space-y-2 border-t border-th-bkg-4 pt-4">
|
||||
<div className="flex items-center text-th-fgd-1">
|
||||
<CheckCircleIcon className="mr-1.5 h-6 w-6 flex-shrink-0 text-th-green" />
|
||||
<p className="mb-0 text-th-fgd-1">
|
||||
40k SRM distributed proportionally to everyone who contributes at
|
||||
least 1% of total spot volume for both maker and taker
|
||||
</p>
|
||||
</div>
|
||||
{/* <div className="flex items-center text-th-fgd-1">
|
||||
<CheckCircleIcon className="mr-1.5 h-6 w-6 flex-shrink-0 text-th-green" />
|
||||
<p className="mb-0 text-th-fgd-1">
|
||||
10k SRM for the top 10 traders by spot PnL
|
||||
</p>
|
||||
</div> */}
|
||||
</div>
|
||||
<Button className="mt-6 w-full" onClick={() => handleFindOutMore()}>
|
||||
Find Out More
|
||||
</Button>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
|
||||
export default SerumCompModal
|
|
@ -4,7 +4,7 @@ import Modal from './Modal'
|
|||
import { ElementTitle } from './styles'
|
||||
import Button, { LinkButton } from './Button'
|
||||
import Input, { Label } from './Input'
|
||||
import useMangoStore from '../stores/useMangoStore'
|
||||
import useMangoStore, { ENDPOINTS } from '../stores/useMangoStore'
|
||||
import useLocalStorageState from '../hooks/useLocalStorageState'
|
||||
import Select from './Select'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
|
@ -21,8 +21,16 @@ require('dayjs/locale/ru')
|
|||
require('dayjs/locale/zh')
|
||||
require('dayjs/locale/zh-tw')
|
||||
|
||||
const NODE_URLS = [
|
||||
{ label: 'Triton (RPC Pool)', value: 'https://mango.rpcpool.com' },
|
||||
const RPC_URLS = [
|
||||
{
|
||||
label: 'Syndica',
|
||||
value:
|
||||
'https://solana-api.syndica.io/access-token/4ywEBJNxuwPLXXU9UlMK67fAMZBt1GLdwuXyXSYnoYPn5aXajT8my0R5klXhYRkk/rpc',
|
||||
},
|
||||
{
|
||||
label: 'Triton (RPC Pool)',
|
||||
value: 'https://mango-mango-d092.mainnet.rpcpool.com/',
|
||||
},
|
||||
{ label: 'Genesys Go', value: 'https://mango.genesysgo.net' },
|
||||
{
|
||||
label: 'Project Serum',
|
||||
|
@ -45,9 +53,9 @@ export const LANGS = [
|
|||
{ locale: 'zh', name: 'chinese', description: 'simplified chinese' },
|
||||
]
|
||||
|
||||
const CUSTOM_NODE = NODE_URLS.find((n) => n.label === 'Custom')
|
||||
const CUSTOM_RPC = RPC_URLS.find((n) => n.label === 'Custom')
|
||||
|
||||
export const NODE_URL_KEY = 'node-url-key-0.8'
|
||||
export const RPC_URL_KEY = 'rpc-url-key-0.11'
|
||||
export const DEFAULT_MARKET_KEY = 'defaultMarket-0.3'
|
||||
export const ORDERBOOK_FLASH_KEY = 'showOrderbookFlash'
|
||||
export const DEFAULT_SPOT_MARGIN_KEY = 'defaultSpotMargin'
|
||||
|
@ -63,10 +71,7 @@ const SettingsModal = ({ isOpen, onClose }) => {
|
|||
const [settingsView, setSettingsView] = useState('')
|
||||
const { theme } = useTheme()
|
||||
const [savedLanguage] = useLocalStorageState('language', '')
|
||||
const [rpcEndpointUrl] = useLocalStorageState(
|
||||
NODE_URL_KEY,
|
||||
NODE_URLS[0].value
|
||||
)
|
||||
const [rpcEndpointUrl] = useLocalStorageState(RPC_URL_KEY, ENDPOINTS[0].url)
|
||||
|
||||
const [defaultMarket] = useLocalStorageState(
|
||||
DEFAULT_MARKET_KEY,
|
||||
|
@ -83,7 +88,7 @@ const SettingsModal = ({ isOpen, onClose }) => {
|
|||
)
|
||||
|
||||
const rpcEndpoint =
|
||||
NODE_URLS.find((node) => node.value === rpcEndpointUrl) || CUSTOM_NODE
|
||||
RPC_URLS.find((node) => node.value === rpcEndpointUrl) || CUSTOM_RPC
|
||||
|
||||
const savedLanguageName = useMemo(() => {
|
||||
const matchingLang = LANGS.find((l) => l.locale === savedLanguage)
|
||||
|
@ -253,11 +258,11 @@ const RpcEndpointSettings = ({ setSettingsView }) => {
|
|||
const { t } = useTranslation('common')
|
||||
const actions = useMangoStore((s) => s.actions)
|
||||
const [rpcEndpointUrl, setRpcEndpointUrl] = useLocalStorageState(
|
||||
NODE_URL_KEY,
|
||||
NODE_URLS[0].value
|
||||
RPC_URL_KEY,
|
||||
ENDPOINTS[0].url
|
||||
)
|
||||
const rpcEndpoint =
|
||||
NODE_URLS.find((node) => node.value === rpcEndpointUrl) || CUSTOM_NODE
|
||||
RPC_URLS.find((node) => node.value === rpcEndpointUrl) || CUSTOM_RPC
|
||||
|
||||
const handleSetEndpointUrl = (endpointUrl) => {
|
||||
setRpcEndpointUrl(endpointUrl)
|
||||
|
@ -276,7 +281,7 @@ const RpcEndpointSettings = ({ setSettingsView }) => {
|
|||
onChange={(url) => handleSelectEndpointUrl(url)}
|
||||
className="w-full"
|
||||
>
|
||||
{NODE_URLS.map((node) => (
|
||||
{RPC_URLS.map((node) => (
|
||||
<Select.Option key={node.value} value={node.value}>
|
||||
<span>{node.label}</span>
|
||||
</Select.Option>
|
||||
|
|
|
@ -15,7 +15,6 @@ import {
|
|||
ExternalLinkIcon,
|
||||
ChevronDownIcon,
|
||||
ReceiptTaxIcon,
|
||||
GiftIcon,
|
||||
} from '@heroicons/react/solid'
|
||||
import { useRouter } from 'next/router'
|
||||
import AccountOverviewPopover from './AccountOverviewPopover'
|
||||
|
@ -153,14 +152,6 @@ const SideNav = ({ collapsed }) => {
|
|||
pagePath="/fees"
|
||||
hideIconBg
|
||||
/>
|
||||
<MenuItem
|
||||
active={pathname === '/win-srm'}
|
||||
collapsed={false}
|
||||
icon={<GiftIcon className="h-4 w-4" />}
|
||||
title="Spot Trading Comp"
|
||||
pagePath="/win-srm"
|
||||
hideIconBg
|
||||
/>
|
||||
<MenuItem
|
||||
collapsed={false}
|
||||
icon={<LightBulbIcon className="h-4 w-4" />}
|
||||
|
|
|
@ -18,6 +18,7 @@ import { PerpTriggerOrder } from '../@types/types'
|
|||
import { useTranslation } from 'next-i18next'
|
||||
import useLocalStorageState from '../hooks/useLocalStorageState'
|
||||
import { useWallet, Wallet } from '@solana/wallet-adapter-react'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
export interface ChartContainerProps {
|
||||
container: ChartingLibraryWidgetOptions['container']
|
||||
|
@ -36,24 +37,36 @@ export interface ChartContainerProps {
|
|||
}
|
||||
|
||||
const SHOW_ORDER_LINES_KEY = 'showOrderLines-0.1'
|
||||
const TRADE_EXECUTION_LIMIT = 100
|
||||
|
||||
const TVChartContainer = () => {
|
||||
const { t } = useTranslation(['common', 'tv-chart'])
|
||||
const { theme } = useTheme()
|
||||
const { width } = useViewport()
|
||||
const { wallet, publicKey } = useWallet()
|
||||
const { wallet, publicKey, connected } = useWallet()
|
||||
const [chartReady, setChartReady] = useState(false)
|
||||
const [showOrderLinesLocalStorage, toggleShowOrderLinesLocalStorage] =
|
||||
useLocalStorageState(SHOW_ORDER_LINES_KEY, true)
|
||||
const [showOrderLines, toggleShowOrderLines] = useState(
|
||||
showOrderLinesLocalStorage
|
||||
)
|
||||
const [showTradeExecutions, toggleShowTradeExecutions] = useState(false)
|
||||
|
||||
const setMangoStore = useMangoStore.getState().set
|
||||
const mangoAccount = useMangoStore.getState().selectedMangoAccount.current
|
||||
const selectedMarketConfig = useMangoStore((s) => s.selectedMarket.config)
|
||||
const actions = useMangoStore((s) => s.actions)
|
||||
const isMobile = width ? width < breakpoints.sm : false
|
||||
const mangoClient = useMangoStore.getState().connection.client
|
||||
const selectedMarketName = selectedMarketConfig.name
|
||||
const tradeExecutions = useMangoStore((s) => s.tradingView.tradeExecutions)
|
||||
const tradeHistoryAndLiquidations = useMangoStore(
|
||||
(s) => s.tradeHistory.parsed
|
||||
)
|
||||
const tradeHistory = tradeHistoryAndLiquidations.filter(
|
||||
(t) => !('liqor' in t)
|
||||
)
|
||||
const [cachedTradeHistory, setCachedTradeHistory] = useState(tradeHistory)
|
||||
|
||||
// @ts-ignore
|
||||
const defaultProps: ChartContainerProps = useMemo(
|
||||
|
@ -103,6 +116,9 @@ const TVChartContainer = () => {
|
|||
deleteLines()
|
||||
drawLinesForMarket(openOrders)
|
||||
}
|
||||
if (showTradeExecutions) {
|
||||
setCachedTradeHistory(tradeHistory)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
@ -162,7 +178,10 @@ const TVChartContainer = () => {
|
|||
defaultProps.container as ChartingLibraryWidgetOptions['container'],
|
||||
library_path: defaultProps.libraryPath as string,
|
||||
locale: 'en',
|
||||
enabled_features: ['hide_left_toolbar_by_default', 'study_templates'],
|
||||
enabled_features: [
|
||||
'hide_left_toolbar_by_default',
|
||||
publicKey ? 'study_templates' : '',
|
||||
],
|
||||
disabled_features: [
|
||||
'use_localstorage_for_settings',
|
||||
'timeframes_toolbar',
|
||||
|
@ -206,30 +225,81 @@ const TVChartContainer = () => {
|
|||
const tvWidget = new widget(widgetOptions)
|
||||
tvWidgetRef.current = tvWidget
|
||||
|
||||
// Create order lines and trade executions buttons
|
||||
tvWidgetRef.current.onChartReady(function () {
|
||||
const button = tvWidgetRef?.current?.createButton()
|
||||
if (!button) {
|
||||
return
|
||||
}
|
||||
createOLButton()
|
||||
createTEButton()
|
||||
setChartReady(true)
|
||||
button.textContent = 'OL'
|
||||
if (showOrderLinesLocalStorage) {
|
||||
button.style.color =
|
||||
theme === 'Dark' || theme === 'Mango'
|
||||
? 'rgb(242, 201, 76)'
|
||||
: 'rgb(255, 156, 36)'
|
||||
} else {
|
||||
button.style.color =
|
||||
theme === 'Dark' || theme === 'Mango'
|
||||
? 'rgb(138, 138, 138)'
|
||||
: 'rgb(138, 138, 138)'
|
||||
}
|
||||
button.setAttribute('title', t('tv-chart:toggle-order-line'))
|
||||
button.addEventListener('click', toggleOrderLines)
|
||||
})
|
||||
//eslint-disable-next-line
|
||||
}, [theme, isMobile, publicKey])
|
||||
|
||||
const createOLButton = () => {
|
||||
const button = tvWidgetRef?.current?.createButton()
|
||||
if (!button) {
|
||||
return
|
||||
}
|
||||
button.textContent = 'OL'
|
||||
if (showOrderLinesLocalStorage) {
|
||||
button.style.color =
|
||||
theme === 'Dark' || theme === 'Mango'
|
||||
? 'rgb(242, 201, 76)'
|
||||
: 'rgb(255, 156, 36)'
|
||||
} else {
|
||||
button.style.color =
|
||||
theme === 'Dark' || theme === 'Mango'
|
||||
? 'rgb(138, 138, 138)'
|
||||
: 'rgb(138, 138, 138)'
|
||||
}
|
||||
button.setAttribute('title', t('tv-chart:toggle-order-line'))
|
||||
button.addEventListener('click', toggleOrderLines)
|
||||
}
|
||||
const createTEButton = () => {
|
||||
const button = tvWidgetRef?.current?.createButton()
|
||||
if (!button) {
|
||||
return
|
||||
}
|
||||
button.textContent = 'TE'
|
||||
if (showTradeExecutions) {
|
||||
button.style.color =
|
||||
theme === 'Dark' || theme === 'Mango'
|
||||
? 'rgb(242, 201, 76)'
|
||||
: 'rgb(255, 156, 36)'
|
||||
} else {
|
||||
button.style.color =
|
||||
theme === 'Dark' || theme === 'Mango'
|
||||
? 'rgb(138, 138, 138)'
|
||||
: 'rgb(138, 138, 138)'
|
||||
}
|
||||
button.setAttribute('title', t('tv-chart:toggle-trade-executions'))
|
||||
button.addEventListener('click', toggleTradeExecutions)
|
||||
}
|
||||
|
||||
function cycleShowTradeExecutions() {
|
||||
toggleShowTradeExecutions((prevState) => !prevState)
|
||||
sleep(1000).then(() => {
|
||||
toggleShowTradeExecutions((prevState) => !prevState)
|
||||
})
|
||||
}
|
||||
|
||||
function toggleTradeExecutions() {
|
||||
toggleShowTradeExecutions((prevState) => !prevState)
|
||||
if (
|
||||
this.style.color === 'rgb(255, 156, 36)' ||
|
||||
this.style.color === 'rgb(242, 201, 76)'
|
||||
) {
|
||||
this.style.color =
|
||||
theme === 'Dark' || theme === 'Mango'
|
||||
? 'rgb(138, 138, 138)'
|
||||
: 'rgb(138, 138, 138)'
|
||||
} else {
|
||||
this.style.color =
|
||||
theme === 'Dark' || theme === 'Mango'
|
||||
? 'rgb(242, 201, 76)'
|
||||
: 'rgb(255, 156, 36)'
|
||||
}
|
||||
}
|
||||
|
||||
function toggleOrderLines() {
|
||||
toggleShowOrderLines((prevState) => !prevState)
|
||||
if (
|
||||
|
@ -310,7 +380,6 @@ const TVChartContainer = () => {
|
|||
price: number,
|
||||
wallet: Wallet
|
||||
) => {
|
||||
const mangoAccount = useMangoStore.getState().selectedMangoAccount.current
|
||||
const mangoGroup = useMangoStore.getState().selectedMangoGroup.current
|
||||
const marketConfig = useMangoStore.getState().selectedMarket.config
|
||||
const askInfo =
|
||||
|
@ -660,6 +729,98 @@ const TVChartContainer = () => {
|
|||
return subscription
|
||||
}, [chartReady, showOrderLines, selectedMarketName])
|
||||
|
||||
const drawTradeExecutions = (trades) => {
|
||||
const newTradeExecutions = new Map()
|
||||
trades
|
||||
.filter((trade) => {
|
||||
return trade.marketName === selectedMarketName
|
||||
})
|
||||
.slice(0, TRADE_EXECUTION_LIMIT)
|
||||
.forEach((trade) => {
|
||||
try {
|
||||
const arrowID = tvWidgetRef
|
||||
.current!.chart()
|
||||
.createExecutionShape()
|
||||
.setTime(dayjs(trade.loadTimestamp).unix())
|
||||
.setDirection(trade.side)
|
||||
.setArrowHeight(6)
|
||||
.setArrowColor(
|
||||
trade.side === 'buy'
|
||||
? theme === 'Mango'
|
||||
? '#AFD803'
|
||||
: '#5EBF4D'
|
||||
: theme === 'Mango'
|
||||
? '#E54033'
|
||||
: '#CC2929'
|
||||
)
|
||||
if (arrowID) {
|
||||
try {
|
||||
newTradeExecutions.set(
|
||||
`${trade.seqNum}${trade.marketName}`,
|
||||
arrowID
|
||||
)
|
||||
} catch (error) {
|
||||
console.log('couldnt set newTradeExecution')
|
||||
}
|
||||
} else {
|
||||
console.log(
|
||||
`Could not create execution shape for trade ${trade.seqNum}${trade.marketName}`
|
||||
)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(`could not draw arrow: ${error}`)
|
||||
}
|
||||
})
|
||||
return newTradeExecutions
|
||||
}
|
||||
|
||||
const removeTradeExecutions = (tradeExecutions) => {
|
||||
if (chartReady && tvWidgetRef?.current) {
|
||||
for (const val of tradeExecutions.values()) {
|
||||
try {
|
||||
val.remove()
|
||||
} catch (error) {
|
||||
console.log(
|
||||
`arrow ${val.seqNum}${val.marketName} could not be removed`
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
setMangoStore((s) => {
|
||||
s.tradingView.tradeExecutions = new Map()
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
showTradeExecutions ? cycleShowTradeExecutions() : null
|
||||
}, [selectedMarketName, mangoAccount?.publicKey])
|
||||
|
||||
useEffect(() => {
|
||||
if (tvWidgetRef && tvWidgetRef.current && chartReady) {
|
||||
setCachedTradeHistory(tradeHistory)
|
||||
}
|
||||
}, [connected, showTradeExecutions])
|
||||
|
||||
useEffect(() => {
|
||||
if (cachedTradeHistory.length !== tradeHistory.length) {
|
||||
setCachedTradeHistory(tradeHistory)
|
||||
}
|
||||
}, [mangoAccount?.publicKey, tradeHistory])
|
||||
|
||||
useEffect(() => {
|
||||
removeTradeExecutions(tradeExecutions)
|
||||
if (
|
||||
showTradeExecutions &&
|
||||
tvWidgetRef &&
|
||||
tvWidgetRef.current &&
|
||||
chartReady
|
||||
) {
|
||||
setMangoStore((s) => {
|
||||
s.tradingView.tradeExecutions = drawTradeExecutions(cachedTradeHistory)
|
||||
})
|
||||
}
|
||||
}, [cachedTradeHistory, selectedMarketName])
|
||||
|
||||
return (
|
||||
<div id={defaultProps.container as string} className="tradingview-chart" />
|
||||
)
|
||||
|
|
|
@ -40,7 +40,7 @@ export const MangoAccountLookup = () => {
|
|||
<div className="w-full max-w-[360px] pt-2">
|
||||
<Input
|
||||
type="text"
|
||||
error={isInvalid}
|
||||
error={isInvalid ? 'is invalid' : ''}
|
||||
value={value}
|
||||
onChange={(e) => setValue(e.target.value)}
|
||||
/>
|
||||
|
|
10
package.json
10
package.json
|
@ -4,8 +4,8 @@
|
|||
"license": "MIT",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"dev": "NODE_OPTIONS=\"--max_old_space_size=4096\" next dev",
|
||||
"devnet": "NEXT_PUBLIC_CLUSTER=devnet NEXT_PUBLIC_ENDPOINT=https://mango.devnet.rpcpool.com/ NEXT_PUBLIC_GROUP=devnet.4 next dev",
|
||||
"dev": "next dev",
|
||||
"devnet": "NEXT_PUBLIC_CLUSTER=devnet NEXT_PUBLIC_ENDPOINT=https://mango.devnet.rpcpool.com/ NEXT_PUBLIC_GROUP=devnet.2 next dev",
|
||||
"testnet": "NEXT_PUBLIC_CLUSTER=testnet NEXT_PUBLIC_ENDPOINT=https://api.testnet.solana.com NEXT_PUBLIC_GROUP=testnet.0 next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
|
@ -19,7 +19,7 @@
|
|||
"postinstall": "tar -xzC public -f vendor/charting_library.tgz;tar -xzC public -f vendor/datafeeds.tgz"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blockworks-foundation/mango-client": "^3.6.17",
|
||||
"@blockworks-foundation/mango-client": "^3.6.19",
|
||||
"@headlessui/react": "^0.0.0-insiders.2dbc38c",
|
||||
"@heroicons/react": "^1.0.0",
|
||||
"@jup-ag/react-hook": "^1.0.0-beta.22",
|
||||
|
@ -42,7 +42,7 @@
|
|||
"intro.js": "^4.2.2",
|
||||
"intro.js-react": "^0.5.0",
|
||||
"lodash": "^4.17.21",
|
||||
"next": "^12.1.0",
|
||||
"next": "~12.2.0",
|
||||
"next-i18next": "^10.4.0",
|
||||
"next-themes": "^0.1.1",
|
||||
"rc-slider": "^9.7.5",
|
||||
|
@ -95,7 +95,7 @@
|
|||
"big.js": "6.1.1",
|
||||
"bn.js": "5.1.3",
|
||||
"@solana/buffer-layout": "4.0.0",
|
||||
"@solana/web3.js": "1.47.3",
|
||||
"@solana/web3.js": "1.62.0",
|
||||
"@project-serum/serum": "0.13.65",
|
||||
"@project-serum/anchor": "0.23.0",
|
||||
"@project-serum/sol-wallet-adapter": "0.2.6",
|
||||
|
|
|
@ -167,8 +167,7 @@ function App({ Component, pageProps }) {
|
|||
? WalletAdapterNetwork.Mainnet
|
||||
: WalletAdapterNetwork.Devnet,
|
||||
options: {
|
||||
// TODO: register Mango Markets to https://cloud.walletconnect.com/ and obtain projectId
|
||||
// projectId: 'e899c82be21d4acca2c8aec45e893598',
|
||||
projectId: 'f3d38b197d7039c03c345f82ed68ef9b',
|
||||
metadata: {
|
||||
name: 'Mango Markets',
|
||||
description: 'Mango Markets',
|
||||
|
|
|
@ -13,6 +13,7 @@ import {
|
|||
ExclamationCircleIcon,
|
||||
GiftIcon,
|
||||
LinkIcon,
|
||||
PencilIcon,
|
||||
SwitchHorizontalIcon,
|
||||
TrashIcon,
|
||||
UsersIcon,
|
||||
|
@ -425,6 +426,17 @@ export default function Account() {
|
|||
</button>
|
||||
</Menu.Item>
|
||||
) : null}
|
||||
<Menu.Item>
|
||||
<button
|
||||
className="flex w-full flex-row items-center rounded-none py-0.5 font-normal focus:outline-none md:hover:cursor-pointer md:hover:text-th-primary"
|
||||
onClick={() => setShowNameModal(true)}
|
||||
>
|
||||
<div className="flex items-center">
|
||||
<PencilIcon className="mr-1.5 h-4 w-4" />
|
||||
{t('edit-account-name')}
|
||||
</div>
|
||||
</button>
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<button
|
||||
className="flex w-full flex-row items-center rounded-none py-0.5 font-normal focus:outline-none md:hover:cursor-pointer md:hover:text-th-primary"
|
||||
|
|
|
@ -13,7 +13,6 @@ import { actionsSelector, marketConfigSelector } from '../stores/selectors'
|
|||
import { PublicKey } from '@solana/web3.js'
|
||||
import dayjs from 'dayjs'
|
||||
import { tokenPrecision } from 'utils'
|
||||
import SerumCompModal, { SEEN_SERUM_COMP_KEY } from 'components/SerumCompModal'
|
||||
import AccountIntro from 'components/AccountIntro'
|
||||
|
||||
export async function getStaticProps({ locale }) {
|
||||
|
@ -34,11 +33,6 @@ export async function getStaticProps({ locale }) {
|
|||
|
||||
const PerpMarket: React.FC = () => {
|
||||
const [alphaAccepted] = useLocalStorageState(ALPHA_MODAL_KEY, false)
|
||||
const [seenSerumCompInfo, setSeenSerumCompInfo] = useLocalStorageState(
|
||||
SEEN_SERUM_COMP_KEY,
|
||||
false
|
||||
)
|
||||
|
||||
const setMangoStore = useMangoStore((s) => s.set)
|
||||
const marketConfig = useMangoStore(marketConfigSelector)
|
||||
const actions = useMangoStore(actionsSelector)
|
||||
|
@ -147,12 +141,6 @@ const PerpMarket: React.FC = () => {
|
|||
{!alphaAccepted && (
|
||||
<AlphaModal isOpen={!alphaAccepted} onClose={() => {}} />
|
||||
)}
|
||||
{!seenSerumCompInfo && alphaAccepted ? (
|
||||
<SerumCompModal
|
||||
isOpen={!seenSerumCompInfo && alphaAccepted}
|
||||
onClose={() => setSeenSerumCompInfo(true)}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
<AccountIntro />
|
||||
</>
|
||||
|
|
|
@ -34,7 +34,6 @@ import { Label } from 'components'
|
|||
import Select from 'components/Select'
|
||||
import EmptyState from 'components/EmptyState'
|
||||
import { handleWalletConnect } from 'components/ConnectWalletButton'
|
||||
import { sign } from 'tweetnacl'
|
||||
import bs58 from 'bs58'
|
||||
import Loading from 'components/Loading'
|
||||
import InlineNotification from 'components/InlineNotification'
|
||||
|
@ -745,8 +744,6 @@ const EditProfileModal = ({
|
|||
})
|
||||
const message = new TextEncoder().encode(messageString)
|
||||
const signature = await signMessage(message)
|
||||
if (!sign.detached.verify(message, signature, publicKey.toBytes()))
|
||||
throw new Error('Invalid signature!')
|
||||
|
||||
const requestOptions = {
|
||||
method: 'POST',
|
||||
|
|
|
@ -1,544 +0,0 @@
|
|||
import { useEffect, useMemo, useState, useCallback } from 'react'
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
import useMangoStore from '../stores/useMangoStore'
|
||||
import { mangoGroupSelector } from '../stores/selectors'
|
||||
import { formatUsdValue } from '../utils'
|
||||
import { notify } from '../utils/notifications'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import EmptyState from '../components/EmptyState'
|
||||
import {
|
||||
CurrencyDollarIcon,
|
||||
InformationCircleIcon,
|
||||
LinkIcon,
|
||||
XIcon,
|
||||
} from '@heroicons/react/solid'
|
||||
import { Row, Table, Td, Th, TrBody, TrHead } from '../components/TableElements'
|
||||
import AccountsModal from '../components/AccountsModal'
|
||||
import { useViewport } from '../hooks/useViewport'
|
||||
import { breakpoints } from '../components/TradePageGrid'
|
||||
import useMangoAccount from '../hooks/useMangoAccount'
|
||||
import { useWallet } from '@solana/wallet-adapter-react'
|
||||
import { handleWalletConnect } from 'components/ConnectWalletButton'
|
||||
import Tooltip from 'components/Tooltip'
|
||||
import Tabs from 'components/Tabs'
|
||||
import dayjs from 'dayjs'
|
||||
import utc from 'dayjs/plugin/utc'
|
||||
|
||||
dayjs.extend(utc)
|
||||
|
||||
export async function getStaticProps({ locale }) {
|
||||
return {
|
||||
props: {
|
||||
...(await serverSideTranslations(locale, [
|
||||
'common',
|
||||
'delegate',
|
||||
'referrals',
|
||||
'profile',
|
||||
])),
|
||||
// Will be passed to the page component as props
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
const TABS = ['maker', 'taker']
|
||||
|
||||
export default function SerumComp() {
|
||||
const { t } = useTranslation(['common', 'referrals'])
|
||||
const mangoGroup = useMangoStore(mangoGroupSelector)
|
||||
const { mangoAccount } = useMangoAccount()
|
||||
const { wallet, connected } = useWallet()
|
||||
const [showAccountsModal, setShowAccountsModal] = useState(false)
|
||||
const [activeTab, setActiveTab] = useState('maker')
|
||||
const [makerData, setMakerData] = useState<any>([])
|
||||
const [takerData, setTakerData] = useState<any>([])
|
||||
const [pnlData, setPnlData] = useState<any>([])
|
||||
// const [accountPnlData, setAccountPnlData] = useState<any>([])
|
||||
// const [accountPnl, setAccountPnl] = useState(0)
|
||||
const { width } = useViewport()
|
||||
const isMobile = width ? width < breakpoints.sm : false
|
||||
|
||||
const startDay = dayjs()
|
||||
.utc()
|
||||
.hour(0)
|
||||
.minute(0)
|
||||
.subtract((new Date().getUTCDay() + 6) % 7, 'day')
|
||||
|
||||
const endDay = startDay.add(startDay.get('day') + 6, 'day')
|
||||
|
||||
const fetchVolumeData = async () => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
'https://mango-transaction-log.herokuapp.com/v3/stats/serum-volume-leaderboard'
|
||||
)
|
||||
const parsedResponse = await response.json()
|
||||
setMakerData(parsedResponse.volumes[0].mango_accounts)
|
||||
setTakerData(parsedResponse.volumes[1].mango_accounts)
|
||||
} catch {
|
||||
notify({ type: 'error', title: 'Failed to fetch competition data' })
|
||||
}
|
||||
}
|
||||
|
||||
const fetchSpotPnlData = async () => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`https://mango-transaction-log.herokuapp.com/v3/stats/serum-pnl-leaderboard`
|
||||
)
|
||||
const parsedResponse = await response.json()
|
||||
setPnlData(parsedResponse.participants)
|
||||
} catch {
|
||||
notify({ type: 'error', title: 'Failed to fetch competition data' })
|
||||
}
|
||||
}
|
||||
|
||||
// const fetchAccountPnlData = async (mangoAccountPk: string) => {
|
||||
// try {
|
||||
// const response = await fetch(
|
||||
// `https://mango-transaction-log.herokuapp.com/v3/stats/account-performance-detailed?mango-account=${mangoAccountPk}&start-date=${startDay.format(
|
||||
// 'YYYY-MM-DD'
|
||||
// )}`
|
||||
// )
|
||||
// const parsedResponse = await response.json()
|
||||
// const entries: any = Object.entries(parsedResponse).sort((a, b) =>
|
||||
// b[0].localeCompare(a[0])
|
||||
// )
|
||||
// setAccountPnlData(entries)
|
||||
// } catch {
|
||||
// notify({ type: 'error', title: 'Failed to fetch account PnL' })
|
||||
// }
|
||||
// }
|
||||
|
||||
// useEffect(() => {
|
||||
// if (accountPnlData.length) {
|
||||
// const currentPnl =
|
||||
// accountPnlData[0][1].pnl - accountPnlData[0][1].perp_pnl
|
||||
// const startPnl =
|
||||
// accountPnlData[accountPnlData.length - 1][1].pnl -
|
||||
// accountPnlData[accountPnlData.length - 1][1].perp_pnl
|
||||
// setAccountPnl(currentPnl - startPnl)
|
||||
// }
|
||||
// }, [accountPnlData])
|
||||
|
||||
// useEffect(() => {
|
||||
// if (mangoAccount) {
|
||||
// fetchAccountPnlData(mangoAccount.publicKey.toString())
|
||||
// }
|
||||
// }, [mangoAccount])
|
||||
|
||||
useEffect(() => {
|
||||
fetchVolumeData()
|
||||
fetchSpotPnlData()
|
||||
}, [])
|
||||
|
||||
const handleTabChange = (tabName) => {
|
||||
setActiveTab(tabName)
|
||||
}
|
||||
|
||||
const handleConnect = useCallback(() => {
|
||||
if (wallet) {
|
||||
handleWalletConnect(wallet)
|
||||
}
|
||||
}, [wallet])
|
||||
|
||||
const filterForQualified = (accounts) => accounts.filter((a) => a.qualifies)
|
||||
|
||||
const volumeTableData = useMemo(() => {
|
||||
if (makerData.length && takerData.length) {
|
||||
return activeTab === 'maker'
|
||||
? filterForQualified(makerData)
|
||||
: filterForQualified(takerData)
|
||||
}
|
||||
return []
|
||||
}, [makerData, takerData, activeTab])
|
||||
|
||||
const accountMakerVolume = useMemo(() => {
|
||||
if (mangoAccount && makerData.length) {
|
||||
const found = makerData.find(
|
||||
(acc) => acc.mango_account === mangoAccount.publicKey.toString()
|
||||
)
|
||||
return found
|
||||
? found
|
||||
: {
|
||||
mango_account_volume: 0,
|
||||
ratio_to_total_volume: 0,
|
||||
qualifies: false,
|
||||
}
|
||||
}
|
||||
return null
|
||||
}, [mangoAccount, makerData])
|
||||
|
||||
const accountTakerVolume = useMemo(() => {
|
||||
if (mangoAccount && takerData.length) {
|
||||
const found = takerData.find(
|
||||
(acc) => acc.mango_account === mangoAccount.publicKey.toString()
|
||||
)
|
||||
return found
|
||||
? found
|
||||
: {
|
||||
mango_account_volume: 0,
|
||||
ratio_to_total_volume: 0,
|
||||
qualifies: false,
|
||||
}
|
||||
}
|
||||
return null
|
||||
}, [mangoAccount, takerData])
|
||||
|
||||
// const accountPnlQualifies = useMemo(() => {
|
||||
// if (mangoAccount && pnlData.length) {
|
||||
// const found = pnlData
|
||||
// .slice(0, 10)
|
||||
// .find((acc) => acc.mango_account === mangoAccount.publicKey.toString())
|
||||
// return found
|
||||
// }
|
||||
// return null
|
||||
// }, [mangoAccount, pnlData])
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-12">
|
||||
<div className="col-span-12 py-6 lg:col-span-10 lg:col-start-2">
|
||||
<div className="mb-2 flex items-center justify-center space-x-4">
|
||||
<img
|
||||
className={`h-10 w-auto`}
|
||||
src="/assets/icons/srm.svg"
|
||||
alt="next"
|
||||
/>
|
||||
<XIcon className="h-5 w-5 text-th-primary" />
|
||||
<img
|
||||
className={`h-12 w-auto`}
|
||||
src="/assets/icons/logo.svg"
|
||||
alt="next"
|
||||
/>
|
||||
</div>
|
||||
<div className="mb-4 flex flex-col items-center border-b border-th-bkg-3 pb-4">
|
||||
<h1 className="relative mb-2 w-max text-center">
|
||||
Win a Share in 400k SRM
|
||||
</h1>
|
||||
<p className="mb-4 text-lg text-th-fgd-2">
|
||||
40k SRM are up for grabs every week until 12 Sep
|
||||
</p>
|
||||
</div>
|
||||
<h2 className="mb-2">How it Works</h2>
|
||||
<ul className="list-disc pl-3">
|
||||
<li className="mb-1 text-base">
|
||||
Trade any spot market on Mango each week from Mon 00:00 UTC to the
|
||||
following Mon 00:00 UTC
|
||||
</li>
|
||||
<li className="mb-1 text-base">
|
||||
At the end of the week the traders who contribute at least 1% of
|
||||
total volume for both maker (limit orders) and taker (market orders)
|
||||
will win a proportianate share of 40k SRM
|
||||
</li>
|
||||
{/* <li className="text-base">
|
||||
Also, the top 10 traders by PnL will win a share of 10k SRM
|
||||
</li> */}
|
||||
</ul>
|
||||
</div>
|
||||
<div className="col-span-12 lg:col-span-10 lg:col-start-2">
|
||||
{connected ? (
|
||||
mangoAccount ? (
|
||||
<div className="grid grid-cols-2 md:gap-4">
|
||||
<div className="col-span-2">
|
||||
<h2 className="mb-4 md:mb-0">
|
||||
Your Account{' '}
|
||||
<span className="text-sm font-normal text-th-fgd-3">
|
||||
({`${startDay.format('D MMM')} – ${endDay.format('D MMM')}`}
|
||||
)
|
||||
</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div className="col-span-2 border-t border-th-bkg-3 p-4 md:col-span-1 md:border-b">
|
||||
<p className="mb-1">Maker Volume</p>
|
||||
<span className="text-2xl font-bold lg:text-4xl">
|
||||
{formatUsdValue(accountMakerVolume?.mango_account_volume)}
|
||||
</span>
|
||||
<div
|
||||
className={`mt-3 w-max rounded-full border ${
|
||||
accountMakerVolume?.qualifies
|
||||
? 'border-th-green'
|
||||
: 'border-th-red'
|
||||
} py-1 px-3 text-th-fgd-1`}
|
||||
>
|
||||
<div className="flex">
|
||||
<span className="font-bold">
|
||||
{(
|
||||
accountMakerVolume?.ratio_to_total_volume * 100
|
||||
).toFixed(1)}
|
||||
%
|
||||
</span>
|
||||
<span className="mx-1 text-th-fgd-4">|</span>
|
||||
<span className="flex items-center text-th-fgd-3">
|
||||
{accountMakerVolume?.qualifies
|
||||
? 'Qualified'
|
||||
: 'Unqualified'}
|
||||
<Tooltip
|
||||
content="Percentage of total maker volume needs to be 1% or greater to qualify"
|
||||
placement={'bottom'}
|
||||
>
|
||||
<InformationCircleIcon className="ml-1.5 h-4 w-4 text-th-fgd-4 hover:cursor-help" />
|
||||
</Tooltip>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-span-2 border-t border-th-bkg-3 p-4 md:col-span-1 md:border-b">
|
||||
<p className="mb-1">Taker Volume</p>
|
||||
<span className="text-2xl font-bold lg:text-4xl">
|
||||
{formatUsdValue(accountTakerVolume?.mango_account_volume)}
|
||||
</span>
|
||||
<div
|
||||
className={`mt-3 w-max rounded-full border ${
|
||||
accountTakerVolume?.qualifies
|
||||
? 'border-th-green'
|
||||
: 'border-th-red'
|
||||
} py-1 px-3 text-th-fgd-1`}
|
||||
>
|
||||
<div className="flex">
|
||||
<span className="font-bold">
|
||||
{(
|
||||
accountTakerVolume?.ratio_to_total_volume * 100
|
||||
).toFixed(1)}
|
||||
%
|
||||
</span>
|
||||
<span className="mx-1 text-th-fgd-4">|</span>
|
||||
<span className="flex items-center text-th-fgd-3">
|
||||
{accountTakerVolume?.qualifies
|
||||
? 'Qualified'
|
||||
: 'Unqualified'}
|
||||
<Tooltip
|
||||
content="Percentage of total taker volume needs to be 1% or greater to qualify"
|
||||
placement={'bottom'}
|
||||
>
|
||||
<InformationCircleIcon className="ml-1.5 h-4 w-4 text-th-fgd-4 hover:cursor-help" />
|
||||
</Tooltip>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* <div className="col-span-3 border-y border-th-bkg-3 p-4 md:col-span-1">
|
||||
<p className="mb-1">PnL</p>
|
||||
<span className="text-2xl font-bold lg:text-4xl">
|
||||
{formatUsdValue(accountPnl)}
|
||||
</span>
|
||||
<div
|
||||
className={`mt-3 w-max rounded-full border ${
|
||||
accountPnlQualifies ? 'border-th-green' : 'border-th-red'
|
||||
} py-1 px-3 text-th-fgd-1`}
|
||||
>
|
||||
<div className="flex">
|
||||
<span className="flex items-center text-th-fgd-3">
|
||||
{accountPnlQualifies ? 'Qualified' : 'Unqualified'}
|
||||
<Tooltip
|
||||
content="You need to be in the top 10 for spot PnL to qualify"
|
||||
placement={'bottom'}
|
||||
>
|
||||
<InformationCircleIcon className="ml-1.5 h-4 w-4 text-th-fgd-4 hover:cursor-help" />
|
||||
</Tooltip>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
) : (
|
||||
<div className="col-span-12 flex items-center justify-center rounded-md border border-th-bkg-3 p-6">
|
||||
<EmptyState
|
||||
buttonText={t('create-account')}
|
||||
icon={<CurrencyDollarIcon />}
|
||||
onClickButton={() => setShowAccountsModal(true)}
|
||||
title={t('no-account-found')}
|
||||
disabled={!wallet || !mangoGroup}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
) : (
|
||||
<div className="col-span-12 flex items-center justify-center rounded-md border border-th-bkg-3 p-6">
|
||||
<EmptyState
|
||||
buttonText={t('connect')}
|
||||
disabled={!wallet || !mangoGroup}
|
||||
icon={<LinkIcon />}
|
||||
onClickButton={handleConnect}
|
||||
title={t('connect-wallet')}
|
||||
desc="Connect your wallet to see your competition status"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="col-span-12 pt-8 lg:col-span-10 lg:col-start-2">
|
||||
<h2 className="mb-4">Current Results</h2>
|
||||
<Tabs activeTab={activeTab} onChange={handleTabChange} tabs={TABS} />
|
||||
{activeTab === 'maker' || activeTab === 'taker' ? (
|
||||
volumeTableData.length ? (
|
||||
!isMobile ? (
|
||||
<Table>
|
||||
<thead>
|
||||
<TrHead>
|
||||
<Th>Rank</Th>
|
||||
<Th>Account</Th>
|
||||
<Th>Volume</Th>
|
||||
<Th>% of Total Volume</Th>
|
||||
<Th>Current SRM Prize</Th>
|
||||
</TrHead>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volumeTableData.map((a, i) => (
|
||||
<TrBody key={a.mango_account}>
|
||||
<Td>#{i + 1}</Td>
|
||||
<Td>
|
||||
<a
|
||||
className="default-transition block"
|
||||
href={`/account?pubkey=${a.mango_account}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>{`${a.mango_account.slice(
|
||||
0,
|
||||
5
|
||||
)}...${a.mango_account.slice(-5)}`}</a>
|
||||
</Td>
|
||||
<Td>{formatUsdValue(a.mango_account_volume)}</Td>
|
||||
<Td>{(a.ratio_to_total_volume * 100).toFixed(1)}%</Td>
|
||||
<Td className="flex items-center">
|
||||
<img
|
||||
className={`mr-1.5 h-4 w-auto`}
|
||||
src="/assets/icons/srm.svg"
|
||||
alt="next"
|
||||
/>
|
||||
{a.srm_payout.toLocaleString(undefined, {
|
||||
maximumFractionDigits: 1,
|
||||
})}
|
||||
</Td>
|
||||
</TrBody>
|
||||
))}
|
||||
</tbody>
|
||||
</Table>
|
||||
) : (
|
||||
volumeTableData.map((a, i) => (
|
||||
<Row key={a.mango_account}>
|
||||
<div className="flex w-full justify-between text-left">
|
||||
<div className="flex items-center space-x-3">
|
||||
<span className="font-bold">#{i + 1}</span>
|
||||
<div>
|
||||
<a
|
||||
className="default-transition block"
|
||||
href={`/account?pubkey=${a.mango_account}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>{`${a.mango_account.slice(
|
||||
0,
|
||||
5
|
||||
)}...${a.mango_account.slice(-5)}`}</a>
|
||||
<p className="mb-0">{`${formatUsdValue(
|
||||
a.mango_account_volume
|
||||
)} | ${(a.ratio_to_total_volume * 100).toFixed(
|
||||
1
|
||||
)}%`}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p className="mb-0 flex items-center text-th-fgd-1">
|
||||
<img
|
||||
className={`mr-1.5 h-4 w-auto`}
|
||||
src="/assets/icons/srm.svg"
|
||||
alt="next"
|
||||
/>
|
||||
{a.srm_payout.toLocaleString(undefined, {
|
||||
maximumFractionDigits: 1,
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
</Row>
|
||||
))
|
||||
)
|
||||
) : null
|
||||
) : null}
|
||||
{activeTab === 'pnl' ? (
|
||||
pnlData.length ? (
|
||||
!isMobile ? (
|
||||
<Table>
|
||||
<thead>
|
||||
<TrHead>
|
||||
<Th>Rank</Th>
|
||||
<Th>Account</Th>
|
||||
<Th>PnL</Th>
|
||||
<Th>Current SRM Prize</Th>
|
||||
</TrHead>
|
||||
</thead>
|
||||
<tbody>
|
||||
{pnlData.slice(0, 10).map((a, i) => (
|
||||
<TrBody key={a.mango_account}>
|
||||
<Td>#{i + 1}</Td>
|
||||
<Td>
|
||||
<a
|
||||
className="default-transition block"
|
||||
href={`/account?pubkey=${a.mango_account}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>{`${a.mango_account.slice(
|
||||
0,
|
||||
5
|
||||
)}...${a.mango_account.slice(-5)}`}</a>
|
||||
</Td>
|
||||
<Td>{formatUsdValue(a.spot_pnl)}</Td>
|
||||
<Td className="flex items-center">
|
||||
<img
|
||||
className={`mr-1.5 h-4 w-auto`}
|
||||
src="/assets/icons/srm.svg"
|
||||
alt="next"
|
||||
/>
|
||||
{i === 0
|
||||
? '3,500.0'
|
||||
: i === 1
|
||||
? '2,000.0'
|
||||
: i === 2
|
||||
? '1,500.0'
|
||||
: '500.0'}
|
||||
</Td>
|
||||
</TrBody>
|
||||
))}
|
||||
</tbody>
|
||||
</Table>
|
||||
) : (
|
||||
pnlData.slice(0, 10).map((a, i) => (
|
||||
<Row key={a.mango_account}>
|
||||
<div className="flex w-full justify-between text-left">
|
||||
<div className="flex items-center space-x-3">
|
||||
<span className="font-bold">#{i + 1}</span>
|
||||
<div>
|
||||
<a
|
||||
className="default-transition block"
|
||||
href={`/account?pubkey=${a.mango_account}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>{`${a.mango_account.slice(
|
||||
0,
|
||||
5
|
||||
)}...${a.mango_account.slice(-5)}`}</a>
|
||||
<p className="mb-0">{formatUsdValue(a.spot_pnl)}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p className="mb-0 flex items-center text-th-fgd-1">
|
||||
<img
|
||||
className={`mr-1.5 h-4 w-auto`}
|
||||
src="/assets/icons/srm.svg"
|
||||
alt="next"
|
||||
/>
|
||||
{i === 0
|
||||
? '3,500.0'
|
||||
: i === 1
|
||||
? '2,000.0'
|
||||
: i === 2
|
||||
? '1,500.0'
|
||||
: '500.0'}
|
||||
</p>
|
||||
</div>
|
||||
</Row>
|
||||
))
|
||||
)
|
||||
) : null
|
||||
) : null}
|
||||
</div>
|
||||
{showAccountsModal ? (
|
||||
<AccountsModal
|
||||
onClose={() => setShowAccountsModal(false)}
|
||||
isOpen={showAccountsModal}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -134,6 +134,7 @@
|
|||
"disconnect": "Disconnect",
|
||||
"done": "Done",
|
||||
"edit": "Edit",
|
||||
"edit-account-name": "Edit Account Name",
|
||||
"edit-columns": "Edit Columns",
|
||||
"edit-name": "Edit Name",
|
||||
"edit-nickname": "Edit the public nickname for your account",
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
"outside-range": "Order Price Outside Range",
|
||||
"slippage-accept": "Please use the trade input form if you wish to accept the potential slippage.",
|
||||
"slippage-warning": "Your order price ({{updatedOrderPrice}}) is greater than 5% {{aboveBelow}} the current market price ({{selectedMarketPrice}}) indicating you might incur significant slippage.",
|
||||
"toggle-order-line": "Toggle order line visibility"
|
||||
"toggle-order-line": "Toggle order line visibility",
|
||||
"toggle-trade-executions": "Toggle trade execution visibility"
|
||||
}
|
|
@ -134,6 +134,7 @@
|
|||
"disconnect": "Desconectar",
|
||||
"done": "Hecho",
|
||||
"edit": "Editar",
|
||||
"edit-account-name": "Edit Account Name",
|
||||
"edit-columns": "Edit Columns",
|
||||
"edit-name": "Actualizar nombre",
|
||||
"edit-nickname": "Edite el apodo público de su cuenta",
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
"outside-range": "Order Price Outside Range",
|
||||
"slippage-accept": "Please use the trade input form if you wish to accept the potential slippage.",
|
||||
"slippage-warning": "Your order price ({{updatedOrderPrice}}) is greater than 5% {{aboveBelow}} the current market price ({{selectedMarketPrice}}) indicating you might incur significant slippage.",
|
||||
"toggle-order-line": "Toggle order line visibility"
|
||||
"toggle-order-line": "Toggle order line visibility",
|
||||
"toggle-trade-executions": "Toggle trade execution visibility"
|
||||
}
|
|
@ -134,6 +134,7 @@
|
|||
"disconnect": "Disconnect",
|
||||
"done": "Done",
|
||||
"edit": "Edit",
|
||||
"edit-account-name": "Edit Account Name",
|
||||
"edit-columns": "Edit Columns",
|
||||
"edit-table-columns": "Edit Table Columns",
|
||||
"edit-name": "Edit Name",
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
"outside-range": "Order Price Outside Range",
|
||||
"slippage-accept": "Please use the trade input form if you wish to accept the potential slippage.",
|
||||
"slippage-warning": "Your order price ({{updatedOrderPrice}}) is greater than 5% {{aboveBelow}} the current market price ({{selectedMarketPrice}}) indicating you might incur significant slippage.",
|
||||
"toggle-order-line": "Toggle order line visibility"
|
||||
"toggle-order-line": "Toggle order line visibility",
|
||||
"toggle-trade-executions": "Toggle trade execution visibility"
|
||||
}
|
|
@ -134,6 +134,7 @@
|
|||
"disconnect": "Отключить",
|
||||
"done": "Готово",
|
||||
"edit": "Редактировать",
|
||||
"edit-account-name": "Edit Account Name",
|
||||
"edit-columns": "Edit Columns",
|
||||
"edit-name": "Редактировать имя",
|
||||
"edit-nickname": "Редактировать публичный ник для вашего аккаунтв",
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
"outside-range": "Цена ордера вне диапазона",
|
||||
"slippage-accept": "Пожалуйста, используйте форму ввода сделки, если вы хотите принять потенциальное проскальзывание.",
|
||||
"slippage-warning": "Цена вашего ордера ({{updatedOrderPrice}}) превышает 5% {{aboveBelow}} от текущей рыночной цены ({{selectedMarketPrice}}) что указывает на то, что вы можете понести значительное проскальзывание.",
|
||||
"toggle-order-line": "Переключить видимость строки ордера"
|
||||
"toggle-order-line": "Переключить видимость строки ордера",
|
||||
"toggle-trade-executions": "Toggle trade execution visibility"
|
||||
}
|
||||
|
|
|
@ -134,6 +134,7 @@
|
|||
"disconnect": "断开连结",
|
||||
"done": "完成",
|
||||
"edit": "编辑",
|
||||
"edit-account-name": "Edit Account Name",
|
||||
"edit-columns": "编辑表列",
|
||||
"edit-name": "编辑帐户标签",
|
||||
"edit-nickname": "编辑帐户标签",
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
"outside-range": "订单价格在范围之外",
|
||||
"slippage-accept": "若您接受潜在的下滑请使用交易表格进行。",
|
||||
"slippage-warning": "您的订单价格({{updatedOrderPrice}})多余5%{{aboveBelow}}市场价格({{selectedMarketPrice}})表是您也许遭受可观的下滑。",
|
||||
"toggle-order-line": "切换订单线可见性"
|
||||
"toggle-order-line": "切换订单线可见性",
|
||||
"toggle-trade-executions": "切换成交可见性"
|
||||
}
|
|
@ -134,6 +134,7 @@
|
|||
"disconnect": "斷開連結",
|
||||
"done": "完成",
|
||||
"edit": "編輯",
|
||||
"edit-account-name": "Edit Account Name",
|
||||
"edit-columns": "編輯表列",
|
||||
"edit-name": "編輯帳戶標籤",
|
||||
"edit-nickname": "編輯帳戶標籤",
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
"outside-range": "訂單價格在範圍之外",
|
||||
"slippage-accept": "若您接受潛在的下滑請使用交易表格進行。",
|
||||
"slippage-warning": "您的訂單價格({{updatedOrderPrice}})多餘5%{{aboveBelow}}市場價格({{selectedMarketPrice}})表是您也許遭受可觀的下滑。",
|
||||
"toggle-order-line": "切換訂單線可見性"
|
||||
"toggle-order-line": "切換訂單線可見性",
|
||||
"toggle-trade-executions": "切換成交可見性"
|
||||
}
|
|
@ -36,14 +36,13 @@ import { Notification, notify } from '../utils/notifications'
|
|||
import {
|
||||
DEFAULT_MARKET_KEY,
|
||||
initialMarket,
|
||||
NODE_URL_KEY,
|
||||
RPC_URL_KEY,
|
||||
} from '../components/SettingsModal'
|
||||
import { MSRM_DECIMALS } from '@project-serum/serum/lib/token-instructions'
|
||||
import { decodeBook } from '../hooks/useHydrateStore'
|
||||
import { IOrderLineAdapter } from '../public/charting_library/charting_library'
|
||||
import { IExecutionLineAdapter, IOrderLineAdapter } from '../public/charting_library/charting_library'
|
||||
import { Wallet } from '@solana/wallet-adapter-react'
|
||||
import { coingeckoIds, fetchNftsFromHolaplexIndexer } from 'utils/tokens'
|
||||
import { sign } from 'tweetnacl'
|
||||
import bs58 from 'bs58'
|
||||
import { PerpMarketInfo } from '@blockworks-foundation/mango-client'
|
||||
|
||||
|
@ -106,6 +105,22 @@ export const LAST_ACCOUNT_KEY = 'lastAccountViewed-3.0'
|
|||
let mangoGroupRetryAttempt = 0
|
||||
let mangoAccountRetryAttempt = 0
|
||||
|
||||
const initMangoClient = (connection: Connection): MangoClient => {
|
||||
return new MangoClient(connection, programId, {
|
||||
timeout: CLIENT_TX_TIMEOUT,
|
||||
prioritizationFee: 5000,
|
||||
postSendTxCallback: ({ txid }: { txid: string }) => {
|
||||
notify({
|
||||
title: 'Transaction sent',
|
||||
description: 'Waiting for confirmation',
|
||||
type: 'confirm',
|
||||
txid: txid,
|
||||
})
|
||||
},
|
||||
blockhashCommitment: 'confirmed',
|
||||
})
|
||||
}
|
||||
|
||||
// an object with keys of Solana account addresses that we are
|
||||
// subscribing to with connection.onAccountChange() in the
|
||||
// useHydrateStore hook
|
||||
|
@ -246,6 +261,7 @@ export type MangoStore = {
|
|||
initialLoad: boolean
|
||||
lastUpdatedAt: string
|
||||
lastSlot: number
|
||||
loading: boolean
|
||||
openOrders: any[]
|
||||
totalOpenOrders: number
|
||||
spotBalances: SpotBalance[]
|
||||
|
@ -335,6 +351,7 @@ export type MangoStore = {
|
|||
marketsInfo: any[]
|
||||
tradingView: {
|
||||
orderLines: Map<string, IOrderLineAdapter>
|
||||
tradeExecutions: Map<string, IExecutionLineAdapter>
|
||||
}
|
||||
coingeckoPrices: { data: any[]; loading: boolean }
|
||||
}
|
||||
|
@ -348,7 +365,7 @@ const useMangoStore = create<
|
|||
subscribeWithSelector((set, get) => {
|
||||
let rpcUrl = ENDPOINT?.url
|
||||
if (typeof window !== 'undefined' && CLUSTER === 'mainnet') {
|
||||
const urlFromLocalStorage = localStorage.getItem(NODE_URL_KEY)
|
||||
const urlFromLocalStorage = localStorage.getItem(RPC_URL_KEY)
|
||||
rpcUrl = urlFromLocalStorage
|
||||
? JSON.parse(urlFromLocalStorage)
|
||||
: ENDPOINT?.url
|
||||
|
@ -363,19 +380,7 @@ const useMangoStore = create<
|
|||
}
|
||||
|
||||
const connection = new Connection(rpcUrl, 'processed' as Commitment)
|
||||
const client = new MangoClient(connection, programId, {
|
||||
timeout: CLIENT_TX_TIMEOUT,
|
||||
prioritizationFee: 2,
|
||||
postSendTxCallback: ({ txid }: { txid: string }) => {
|
||||
notify({
|
||||
title: 'Transaction sent',
|
||||
description: 'Waiting for confirmation',
|
||||
type: 'confirm',
|
||||
txid: txid,
|
||||
})
|
||||
},
|
||||
blockhashCommitment: 'confirmed',
|
||||
})
|
||||
const client = initMangoClient(connection)
|
||||
return {
|
||||
marketsInfo: [],
|
||||
notificationIdCounter: 0,
|
||||
|
@ -422,6 +427,7 @@ const useMangoStore = create<
|
|||
initialLoad: true,
|
||||
lastUpdatedAt: '0',
|
||||
lastSlot: 0,
|
||||
loading: false,
|
||||
openOrders: [],
|
||||
totalOpenOrders: 0,
|
||||
spotBalances: [],
|
||||
|
@ -465,6 +471,7 @@ const useMangoStore = create<
|
|||
},
|
||||
tradingView: {
|
||||
orderLines: new Map(),
|
||||
tradeExecutions: new Map(),
|
||||
},
|
||||
coingeckoPrices: { data: [], loading: false },
|
||||
profile: {
|
||||
|
@ -802,10 +809,18 @@ const useMangoStore = create<
|
|||
|
||||
if (!mangoAccount) return
|
||||
|
||||
set((state) => {
|
||||
state.selectedMangoAccount.loading = true
|
||||
})
|
||||
|
||||
const [reloadedMangoAccount, lastSlot] =
|
||||
await mangoAccount.reloadFromSlot(connection, mangoClient.lastSlot)
|
||||
const lastSeenSlot = get().selectedMangoAccount.lastSlot
|
||||
|
||||
set((state) => {
|
||||
state.selectedMangoAccount.loading = false
|
||||
})
|
||||
|
||||
if (lastSlot > lastSeenSlot) {
|
||||
set((state) => {
|
||||
state.selectedMangoAccount.current = reloadedMangoAccount
|
||||
|
@ -935,7 +950,7 @@ const useMangoStore = create<
|
|||
|
||||
const newConnection = new Connection(endpointUrl, 'processed')
|
||||
|
||||
const newClient = new MangoClient(newConnection, programId)
|
||||
const newClient = initMangoClient(newConnection)
|
||||
|
||||
set((state) => {
|
||||
state.connection.endpoint = endpointUrl
|
||||
|
@ -1242,8 +1257,6 @@ const useMangoStore = create<
|
|||
})
|
||||
const message = new TextEncoder().encode(messageString)
|
||||
const signature = await signMessage(message)
|
||||
if (!sign.detached.verify(message, signature, publicKey.toBytes()))
|
||||
throw new Error('Invalid signature!')
|
||||
|
||||
const requestOptions = {
|
||||
method: 'POST',
|
||||
|
@ -1283,8 +1296,6 @@ const useMangoStore = create<
|
|||
})
|
||||
const message = new TextEncoder().encode(messageString)
|
||||
const signature = await signMessage(message)
|
||||
if (!sign.detached.verify(message, signature, publicKey.toBytes()))
|
||||
throw new Error('Invalid signature!')
|
||||
|
||||
const requestOptions = {
|
||||
method: 'DELETE',
|
||||
|
|
270
yarn.lock
270
yarn.lock
|
@ -1027,10 +1027,10 @@
|
|||
"@babel/helper-validator-identifier" "^7.16.7"
|
||||
to-fast-properties "^2.0.0"
|
||||
|
||||
"@blockworks-foundation/mango-client@^3.6.17":
|
||||
version "3.6.17"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-client/-/mango-client-3.6.17.tgz#2ef6dcf55fb552afb262c0a60c7f71e75e36a52e"
|
||||
integrity sha512-chad8j93XlUexPSN/CSD8f+7sgKkjMkerF+W/Q4ulMiInYw+FqTeR1ym98MBLbOUnhtYEF2c8eQ292SdiZ6q3w==
|
||||
"@blockworks-foundation/mango-client@^3.6.19":
|
||||
version "3.6.19"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-client/-/mango-client-3.6.19.tgz#f156603b6423191a63489d9cde2946a797506a59"
|
||||
integrity sha512-PGQOCmYWLhmbK9lBJN3+O+A+rOFDJJvqMBGn5nV7azXFO7p2hMRcWJBBFcwuiiFvtN6XABnaHAutVKf2PIujAQ==
|
||||
dependencies:
|
||||
"@project-serum/anchor" "^0.21.0"
|
||||
"@project-serum/serum" "^0.13.65"
|
||||
|
@ -1082,27 +1082,6 @@
|
|||
minimatch "^3.0.4"
|
||||
strip-json-comments "^3.1.1"
|
||||
|
||||
"@ethersproject/bytes@^5.7.0":
|
||||
version "5.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d"
|
||||
integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==
|
||||
dependencies:
|
||||
"@ethersproject/logger" "^5.7.0"
|
||||
|
||||
"@ethersproject/logger@^5.7.0":
|
||||
version "5.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892"
|
||||
integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==
|
||||
|
||||
"@ethersproject/sha2@^5.5.0":
|
||||
version "5.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb"
|
||||
integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.7.0"
|
||||
"@ethersproject/logger" "^5.7.0"
|
||||
hash.js "1.1.7"
|
||||
|
||||
"@hapi/bourne@^2.0.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@hapi/bourne/-/bourne-2.1.0.tgz#66aff77094dc3080bd5df44ec63881f2676eb020"
|
||||
|
@ -1376,65 +1355,75 @@
|
|||
dependencies:
|
||||
webpack-bundle-analyzer "4.3.0"
|
||||
|
||||
"@next/env@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.1.0.tgz#73713399399b34aa5a01771fb73272b55b22c314"
|
||||
integrity sha512-nrIgY6t17FQ9xxwH3jj0a6EOiQ/WDHUos35Hghtr+SWN/ntHIQ7UpuvSi0vaLzZVHQWaDupKI+liO5vANcDeTQ==
|
||||
"@next/env@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.2.5.tgz#d908c57b35262b94db3e431e869b72ac3e1ad3e3"
|
||||
integrity sha512-vLPLV3cpPGjUPT3PjgRj7e3nio9t6USkuew3JE/jMeon/9Mvp1WyR18v3iwnCuX7eUAm1HmAbJHHLAbcu/EJcw==
|
||||
|
||||
"@next/swc-android-arm64@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.1.0.tgz#865ba3a9afc204ff2bdeea49dd64d58705007a39"
|
||||
integrity sha512-/280MLdZe0W03stA69iL+v6I+J1ascrQ6FrXBlXGCsGzrfMaGr7fskMa0T5AhQIVQD4nA/46QQWxG//DYuFBcA==
|
||||
"@next/swc-android-arm-eabi@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.2.5.tgz#903a5479ab4c2705d9c08d080907475f7bacf94d"
|
||||
integrity sha512-cPWClKxGhgn2dLWnspW+7psl3MoLQUcNqJqOHk2BhNcou9ARDtC0IjQkKe5qcn9qg7I7U83Gp1yh2aesZfZJMA==
|
||||
|
||||
"@next/swc-darwin-arm64@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.0.tgz#08e8b411b8accd095009ed12efbc2f1d4d547135"
|
||||
integrity sha512-R8vcXE2/iONJ1Unf5Ptqjk6LRW3bggH+8drNkkzH4FLEQkHtELhvcmJwkXcuipyQCsIakldAXhRbZmm3YN1vXg==
|
||||
"@next/swc-android-arm64@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.2.5.tgz#2f9a98ec4166c7860510963b31bda1f57a77c792"
|
||||
integrity sha512-vMj0efliXmC5b7p+wfcQCX0AfU8IypjkzT64GiKJD9PgiA3IILNiGJr1fw2lyUDHkjeWx/5HMlMEpLnTsQslwg==
|
||||
|
||||
"@next/swc-darwin-x64@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.0.tgz#fcd684497a76e8feaca88db3c394480ff0b007cd"
|
||||
integrity sha512-ieAz0/J0PhmbZBB8+EA/JGdhRHBogF8BWaeqR7hwveb6SYEIJaDNQy0I+ZN8gF8hLj63bEDxJAs/cEhdnTq+ug==
|
||||
"@next/swc-darwin-arm64@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.2.5.tgz#31b1c3c659d54be546120c488a1e1bad21c24a1d"
|
||||
integrity sha512-VOPWbO5EFr6snla/WcxUKtvzGVShfs302TEMOtzYyWni6f9zuOetijJvVh9CCTzInnXAZMtHyNhefijA4HMYLg==
|
||||
|
||||
"@next/swc-linux-arm-gnueabihf@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.0.tgz#9ec6380a27938a5799aaa6035c205b3c478468a7"
|
||||
integrity sha512-njUd9hpl6o6A5d08dC0cKAgXKCzm5fFtgGe6i0eko8IAdtAPbtHxtpre3VeSxdZvuGFh+hb0REySQP9T1ttkog==
|
||||
"@next/swc-darwin-x64@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.2.5.tgz#2e44dd82b2b7fef88238d1bc4d3bead5884cedfd"
|
||||
integrity sha512-5o8bTCgAmtYOgauO/Xd27vW52G2/m3i5PX7MUYePquxXAnX73AAtqA3WgPXBRitEB60plSKZgOTkcpqrsh546A==
|
||||
|
||||
"@next/swc-linux-arm64-gnu@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.0.tgz#7f4196dff1049cea479607c75b81033ae2dbd093"
|
||||
integrity sha512-OqangJLkRxVxMhDtcb7Qn1xjzFA3s50EIxY7mljbSCLybU+sByPaWAHY4px97ieOlr2y4S0xdPKkQ3BCAwyo6Q==
|
||||
"@next/swc-freebsd-x64@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.5.tgz#e24e75d8c2581bfebc75e4f08f6ddbd116ce9dbd"
|
||||
integrity sha512-yYUbyup1JnznMtEBRkK4LT56N0lfK5qNTzr6/DEyDw5TbFVwnuy2hhLBzwCBkScFVjpFdfiC6SQAX3FrAZzuuw==
|
||||
|
||||
"@next/swc-linux-arm64-musl@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.0.tgz#b445f767569cdc2dddee785ca495e1a88c025566"
|
||||
integrity sha512-hB8cLSt4GdmOpcwRe2UzI5UWn6HHO/vLkr5OTuNvCJ5xGDwpPXelVkYW/0+C3g5axbDW2Tym4S+MQCkkH9QfWA==
|
||||
"@next/swc-linux-arm-gnueabihf@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.2.5.tgz#46d8c514d834d2b5f67086013f0bd5e3081e10b9"
|
||||
integrity sha512-2ZE2/G921Acks7UopJZVMgKLdm4vN4U0yuzvAMJ6KBavPzqESA2yHJlm85TV/K9gIjKhSk5BVtauIUntFRP8cg==
|
||||
|
||||
"@next/swc-linux-x64-gnu@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.0.tgz#67610e9be4fbc987de7535f1bcb17e45fe12f90e"
|
||||
integrity sha512-OKO4R/digvrVuweSw/uBM4nSdyzsBV5EwkUeeG4KVpkIZEe64ZwRpnFB65bC6hGwxIBnTv5NMSnJ+0K/WmG78A==
|
||||
"@next/swc-linux-arm64-gnu@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.2.5.tgz#91f725ac217d3a1f4f9f53b553615ba582fd3d9f"
|
||||
integrity sha512-/I6+PWVlz2wkTdWqhlSYYJ1pWWgUVva6SgX353oqTh8njNQp1SdFQuWDqk8LnM6ulheVfSsgkDzxrDaAQZnzjQ==
|
||||
|
||||
"@next/swc-linux-x64-musl@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.0.tgz#ea19a23db08a9f2e34ac30401f774cf7d1669d31"
|
||||
integrity sha512-JohhgAHZvOD3rQY7tlp7NlmvtvYHBYgY0x5ZCecUT6eCCcl9lv6iV3nfu82ErkxNk1H893fqH0FUpznZ/H3pSw==
|
||||
"@next/swc-linux-arm64-musl@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.2.5.tgz#e627e8c867920995810250303cd9b8e963598383"
|
||||
integrity sha512-LPQRelfX6asXyVr59p5sTpx5l+0yh2Vjp/R8Wi4X9pnqcayqT4CUJLiHqCvZuLin3IsFdisJL0rKHMoaZLRfmg==
|
||||
|
||||
"@next/swc-win32-arm64-msvc@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.0.tgz#eadf054fc412085659b98e145435bbba200b5283"
|
||||
integrity sha512-T/3gIE6QEfKIJ4dmJk75v9hhNiYZhQYAoYm4iVo1TgcsuaKLFa+zMPh4056AHiG6n9tn2UQ1CFE8EoybEsqsSw==
|
||||
"@next/swc-linux-x64-gnu@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.5.tgz#83a5e224fbc4d119ef2e0f29d0d79c40cc43887e"
|
||||
integrity sha512-0szyAo8jMCClkjNK0hknjhmAngUppoRekW6OAezbEYwHXN/VNtsXbfzgYOqjKWxEx3OoAzrT3jLwAF0HdX2MEw==
|
||||
|
||||
"@next/swc-win32-ia32-msvc@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.0.tgz#68faeae10c89f698bf9d28759172b74c9c21bda1"
|
||||
integrity sha512-iwnKgHJdqhIW19H9PRPM9j55V6RdcOo6rX+5imx832BCWzkDbyomWnlzBfr6ByUYfhohb8QuH4hSGEikpPqI0Q==
|
||||
"@next/swc-linux-x64-musl@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.5.tgz#be700d48471baac1ec2e9539396625584a317e95"
|
||||
integrity sha512-zg/Y6oBar1yVnW6Il1I/08/2ukWtOG6s3acdJdEyIdsCzyQi4RLxbbhkD/EGQyhqBvd3QrC6ZXQEXighQUAZ0g==
|
||||
|
||||
"@next/swc-win32-x64-msvc@12.1.0":
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.0.tgz#d27e7e76c87a460a4da99c5bfdb1618dcd6cd064"
|
||||
integrity sha512-aBvcbMwuanDH4EMrL2TthNJy+4nP59Bimn8egqv6GHMVj0a44cU6Au4PjOhLNqEh9l+IpRGBqMTzec94UdC5xg==
|
||||
"@next/swc-win32-arm64-msvc@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.2.5.tgz#a93e958133ad3310373fda33a79aa10af2a0aa97"
|
||||
integrity sha512-3/90DRNSqeeSRMMEhj4gHHQlLhhKg5SCCoYfE3kBjGpE63EfnblYUqsszGGZ9ekpKL/R4/SGB40iCQr8tR5Jiw==
|
||||
|
||||
"@next/swc-win32-ia32-msvc@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.2.5.tgz#4f5f7ba0a98ff89a883625d4af0125baed8b2e19"
|
||||
integrity sha512-hGLc0ZRAwnaPL4ulwpp4D2RxmkHQLuI8CFOEEHdzZpS63/hMVzv81g8jzYA0UXbb9pus/iTc3VRbVbAM03SRrw==
|
||||
|
||||
"@next/swc-win32-x64-msvc@12.2.5":
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.2.5.tgz#20fed129b04a0d3f632c6d0de135345bb623b1e4"
|
||||
integrity sha512-7h5/ahY7NeaO2xygqVrSG/Y8Vs4cdjxIjowTZ5W6CKoTKn7tmnuxlUc2h74x06FKmbhAd9agOjr/AOKyxYYm9Q==
|
||||
|
||||
"@ngraveio/bc-ur@^1.0.0", "@ngraveio/bc-ur@^1.1.5":
|
||||
version "1.1.6"
|
||||
|
@ -1449,6 +1438,21 @@
|
|||
jsbi "^3.1.5"
|
||||
sha.js "^2.4.11"
|
||||
|
||||
"@noble/ed25519@^1.7.0":
|
||||
version "1.7.1"
|
||||
resolved "https://registry.yarnpkg.com/@noble/ed25519/-/ed25519-1.7.1.tgz#6899660f6fbb97798a6fbd227227c4589a454724"
|
||||
integrity sha512-Rk4SkJFaXZiznFyC/t77Q0NKS4FL7TLJJsVG2V2oiEq3kJVeTdxysEe/yRWSpnWMe808XRDJ+VFh5pt/FN5plw==
|
||||
|
||||
"@noble/hashes@^1.1.2":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183"
|
||||
integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==
|
||||
|
||||
"@noble/secp256k1@^1.6.3":
|
||||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.0.tgz#d15357f7c227e751d90aa06b05a0e5cf993ba8c1"
|
||||
integrity sha512-kbacwGSsH/CTout0ZnZWxnW1B+jH/7r/WAAKLBtrRJ/+CUH7lgmQzl3GTrQua3SGKWNSDsS6lmjnDpIJ5Dxyaw==
|
||||
|
||||
"@nodelib/fs.scandir@2.1.5":
|
||||
version "2.1.5"
|
||||
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
|
||||
|
@ -2071,13 +2075,15 @@
|
|||
"@solana/wallet-adapter-trust" "^0.1.4"
|
||||
"@solana/wallet-adapter-walletconnect" "^0.1.2"
|
||||
|
||||
"@solana/web3.js@1.31.0", "@solana/web3.js@1.47.3", "@solana/web3.js@^1.20.0", "@solana/web3.js@^1.21.0", "@solana/web3.js@^1.30.2", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.36.0", "@solana/web3.js@^1.43.5", "@solana/web3.js@^1.44.3":
|
||||
version "1.47.3"
|
||||
resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.47.3.tgz#ec13f2cf4f9f54cc4fbd26d20be1e026c6e2279c"
|
||||
integrity sha512-TQJulaN/+b0xXq5EhQAYFwVyOORxSyVJn1EiXupClZm8DY7f9EeUG6vl0FzSAgwEAwXKsgK3sVs/3px2e7H7dQ==
|
||||
"@solana/web3.js@1.31.0", "@solana/web3.js@1.62.0", "@solana/web3.js@^1.20.0", "@solana/web3.js@^1.21.0", "@solana/web3.js@^1.30.2", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.36.0", "@solana/web3.js@^1.43.5", "@solana/web3.js@^1.44.3":
|
||||
version "1.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.62.0.tgz#8fef9fd443217161ddc25e701f603222047bc520"
|
||||
integrity sha512-rHnqJR5ECooUp8egurP9Qi1SKI1Q3pbF2ZkaHbEmFsSjBsyEe+Qqxa5h+7ueylqApYyk0zawnxz83y4kdrlNIA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
"@ethersproject/sha2" "^5.5.0"
|
||||
"@noble/ed25519" "^1.7.0"
|
||||
"@noble/hashes" "^1.1.2"
|
||||
"@noble/secp256k1" "^1.6.3"
|
||||
"@solana/buffer-layout" "^4.0.0"
|
||||
bigint-buffer "^1.1.5"
|
||||
bn.js "^5.0.0"
|
||||
|
@ -2086,12 +2092,9 @@
|
|||
buffer "6.0.1"
|
||||
fast-stable-stringify "^1.0.0"
|
||||
jayson "^3.4.4"
|
||||
js-sha3 "^0.8.0"
|
||||
node-fetch "2"
|
||||
rpc-websockets "^7.5.0"
|
||||
secp256k1 "^4.0.2"
|
||||
superstruct "^0.14.2"
|
||||
tweetnacl "^1.0.0"
|
||||
|
||||
"@solflare-wallet/sdk@^1.0.11":
|
||||
version "1.0.11"
|
||||
|
@ -2358,6 +2361,13 @@
|
|||
"@svgr/plugin-jsx" "^6.2.1"
|
||||
"@svgr/plugin-svgo" "^6.2.0"
|
||||
|
||||
"@swc/helpers@0.4.3":
|
||||
version "0.4.3"
|
||||
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.3.tgz#16593dfc248c53b699d4b5026040f88ddb497012"
|
||||
integrity sha512-6JrF+fdUK2zbGpJIlN7G3v966PQjyx/dPt1T9km2wj+EUBqgrxCk3uX4Kct16MIm9gGxfKRcfax2hVf5jvlTzA==
|
||||
dependencies:
|
||||
tslib "^2.4.0"
|
||||
|
||||
"@testing-library/dom@^7.28.1":
|
||||
version "7.31.2"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.31.2.tgz#df361db38f5212b88555068ab8119f5d841a8c4a"
|
||||
|
@ -3606,11 +3616,16 @@ camelcase@^6.2.0:
|
|||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a"
|
||||
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
|
||||
|
||||
caniuse-lite@^1.0.30001283, caniuse-lite@^1.0.30001317:
|
||||
caniuse-lite@^1.0.30001317:
|
||||
version "1.0.30001320"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001320.tgz#8397391bec389b8ccce328636499b7284ee13285"
|
||||
integrity sha512-MWPzG54AGdo3nWx7zHZTefseM5Y1ccM7hlQKHRqJkPozUaw3hNbBTMmLn16GG2FUzjR13Cr3NPfhIieX5PzXDA==
|
||||
|
||||
caniuse-lite@^1.0.30001332:
|
||||
version "1.0.30001400"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001400.tgz#3038bee70d8b875604cd8833cb0e5e254ee0281a"
|
||||
integrity sha512-Mv659Hn65Z4LgZdJ7ge5JTVbE3rqbJaaXgW5LEI9/tOaXclfIZ8DW7D7FCWWWmWiiPS7AC48S8kf3DApSxQdgA==
|
||||
|
||||
cbor-sync@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/cbor-sync/-/cbor-sync-1.0.4.tgz#5a11a1ab75c2a14d1af1b237fd84aa8c1593662f"
|
||||
|
@ -5015,7 +5030,7 @@ hash-base@^3.0.0:
|
|||
readable-stream "^3.6.0"
|
||||
safe-buffer "^5.2.0"
|
||||
|
||||
hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7:
|
||||
hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7:
|
||||
version "1.1.7"
|
||||
resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42"
|
||||
integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==
|
||||
|
@ -5826,11 +5841,16 @@ nan@^2.14.0, nan@^2.14.2:
|
|||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916"
|
||||
integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==
|
||||
|
||||
nanoid@^3.1.30, nanoid@^3.3.1:
|
||||
nanoid@^3.3.1:
|
||||
version "3.3.1"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35"
|
||||
integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==
|
||||
|
||||
nanoid@^3.3.4:
|
||||
version "3.3.4"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
|
||||
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
|
||||
|
||||
napi-build-utils@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806"
|
||||
|
@ -5859,28 +5879,31 @@ next-themes@^0.1.1:
|
|||
resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.1.1.tgz#122113a458bf1d1be5ffed66778ab924c106f82a"
|
||||
integrity sha512-Iqxt6rhS/KfK/iHJ0tfFjTcdLEAI0AgwFuAFrMwLOPK5e+MI3I+fzyvBoS+VaOS+NldUiazurhgwYhrfV0VXsQ==
|
||||
|
||||
next@^12.1.0:
|
||||
version "12.1.0"
|
||||
resolved "https://registry.yarnpkg.com/next/-/next-12.1.0.tgz#c33d753b644be92fc58e06e5a214f143da61dd5d"
|
||||
integrity sha512-s885kWvnIlxsUFHq9UGyIyLiuD0G3BUC/xrH0CEnH5lHEWkwQcHOORgbDF0hbrW9vr/7am4ETfX4A7M6DjrE7Q==
|
||||
next@~12.2.0:
|
||||
version "12.2.5"
|
||||
resolved "https://registry.yarnpkg.com/next/-/next-12.2.5.tgz#14fb5975e8841fad09553b8ef41fe1393602b717"
|
||||
integrity sha512-tBdjqX5XC/oFs/6gxrZhjmiq90YWizUYU6qOWAfat7zJwrwapJ+BYgX2PmiacunXMaRpeVT4vz5MSPSLgNkrpA==
|
||||
dependencies:
|
||||
"@next/env" "12.1.0"
|
||||
caniuse-lite "^1.0.30001283"
|
||||
postcss "8.4.5"
|
||||
styled-jsx "5.0.0"
|
||||
use-subscription "1.5.1"
|
||||
"@next/env" "12.2.5"
|
||||
"@swc/helpers" "0.4.3"
|
||||
caniuse-lite "^1.0.30001332"
|
||||
postcss "8.4.14"
|
||||
styled-jsx "5.0.4"
|
||||
use-sync-external-store "1.2.0"
|
||||
optionalDependencies:
|
||||
"@next/swc-android-arm64" "12.1.0"
|
||||
"@next/swc-darwin-arm64" "12.1.0"
|
||||
"@next/swc-darwin-x64" "12.1.0"
|
||||
"@next/swc-linux-arm-gnueabihf" "12.1.0"
|
||||
"@next/swc-linux-arm64-gnu" "12.1.0"
|
||||
"@next/swc-linux-arm64-musl" "12.1.0"
|
||||
"@next/swc-linux-x64-gnu" "12.1.0"
|
||||
"@next/swc-linux-x64-musl" "12.1.0"
|
||||
"@next/swc-win32-arm64-msvc" "12.1.0"
|
||||
"@next/swc-win32-ia32-msvc" "12.1.0"
|
||||
"@next/swc-win32-x64-msvc" "12.1.0"
|
||||
"@next/swc-android-arm-eabi" "12.2.5"
|
||||
"@next/swc-android-arm64" "12.2.5"
|
||||
"@next/swc-darwin-arm64" "12.2.5"
|
||||
"@next/swc-darwin-x64" "12.2.5"
|
||||
"@next/swc-freebsd-x64" "12.2.5"
|
||||
"@next/swc-linux-arm-gnueabihf" "12.2.5"
|
||||
"@next/swc-linux-arm64-gnu" "12.2.5"
|
||||
"@next/swc-linux-arm64-musl" "12.2.5"
|
||||
"@next/swc-linux-x64-gnu" "12.2.5"
|
||||
"@next/swc-linux-x64-musl" "12.2.5"
|
||||
"@next/swc-win32-arm64-msvc" "12.2.5"
|
||||
"@next/swc-win32-ia32-msvc" "12.2.5"
|
||||
"@next/swc-win32-x64-msvc" "12.2.5"
|
||||
|
||||
no-case@^3.0.4:
|
||||
version "3.0.4"
|
||||
|
@ -6279,14 +6302,14 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0:
|
|||
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
|
||||
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
|
||||
|
||||
postcss@8.4.5:
|
||||
version "8.4.5"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.5.tgz#bae665764dfd4c6fcc24dc0fdf7e7aa00cc77f95"
|
||||
integrity sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==
|
||||
postcss@8.4.14:
|
||||
version "8.4.14"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
|
||||
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
|
||||
dependencies:
|
||||
nanoid "^3.1.30"
|
||||
nanoid "^3.3.4"
|
||||
picocolors "^1.0.0"
|
||||
source-map-js "^1.0.1"
|
||||
source-map-js "^1.0.2"
|
||||
|
||||
postcss@^8.1.6, postcss@^8.1.8, postcss@^8.3.5, postcss@^8.4.6, postcss@^8.4.7:
|
||||
version "8.4.7"
|
||||
|
@ -7122,7 +7145,7 @@ secp256k1@^3.8.0:
|
|||
nan "^2.14.0"
|
||||
safe-buffer "^5.1.2"
|
||||
|
||||
secp256k1@^4.0.1, secp256k1@^4.0.2:
|
||||
secp256k1@^4.0.1:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303"
|
||||
integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==
|
||||
|
@ -7304,7 +7327,7 @@ sonic-boom@^1.0.2:
|
|||
atomic-sleep "^1.0.0"
|
||||
flatstr "^1.0.12"
|
||||
|
||||
source-map-js@^1.0.1, source-map-js@^1.0.2:
|
||||
source-map-js@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
|
||||
|
@ -7464,10 +7487,10 @@ strip-json-comments@~2.0.1:
|
|||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
||||
integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==
|
||||
|
||||
styled-jsx@5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.0.tgz#816b4b92e07b1786c6b7111821750e0ba4d26e77"
|
||||
integrity sha512-qUqsWoBquEdERe10EW8vLp3jT25s/ssG1/qX5gZ4wu15OZpmSMFI2v+fWlRhLfykA5rFtlJ1ME8A8pm/peV4WA==
|
||||
styled-jsx@5.0.4:
|
||||
version "5.0.4"
|
||||
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.4.tgz#5b1bd0b9ab44caae3dd1361295559706e044aa53"
|
||||
integrity sha512-sDFWLbg4zR+UkNzfk5lPilyIgtpddfxXEULxhujorr5jtePTUqiPDc5BC0v1NRqTr/WaFBGQQUoYToGlF4B2KQ==
|
||||
|
||||
superstruct@^0.14.2:
|
||||
version "0.14.2"
|
||||
|
@ -7735,11 +7758,6 @@ tunnel-agent@^0.6.0:
|
|||
dependencies:
|
||||
safe-buffer "^5.0.1"
|
||||
|
||||
tweetnacl@^1.0.0:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596"
|
||||
integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==
|
||||
|
||||
twin.macro@^2.4.1:
|
||||
version "2.8.2"
|
||||
resolved "https://registry.yarnpkg.com/twin.macro/-/twin.macro-2.8.2.tgz#7f1344b4b1c3811da93a62fa204fe08999df7a75"
|
||||
|
@ -7848,12 +7866,10 @@ uri-js@^4.2.2:
|
|||
dependencies:
|
||||
punycode "^2.1.0"
|
||||
|
||||
use-subscription@1.5.1:
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.5.1.tgz#73501107f02fad84c6dd57965beb0b75c68c42d1"
|
||||
integrity sha512-Xv2a1P/yReAjAbhylMfFplFKj9GssgTwN7RlcTxBujFQcloStWNDQdc4g4NRWH9xS4i/FDk04vQBptAXoF3VcA==
|
||||
dependencies:
|
||||
object-assign "^4.1.1"
|
||||
use-sync-external-store@1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
|
||||
integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==
|
||||
|
||||
utf-8-validate@^5.0.2:
|
||||
version "5.0.9"
|
||||
|
|
Loading…
Reference in New Issue