Giter Club home page Giter Club logo

serum-dex-ui's People

Contributors

armaniferrante avatar arrowana avatar askmike avatar bartosz-lipinski avatar cdrappi avatar dr497 avatar fragosti avatar garywang avatar jhlx avatar mschneider avatar nathanielparke avatar nishadsingh1 avatar philippe-ftx avatar sayantank avatar sconybeare avatar sensiblefolk avatar steveluscher avatar thaaddeus avatar thanhnguyennguyen avatar vsakos avatar yuzhiyou1990 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

serum-dex-ui's Issues

"Unknown Token" warning isn't scary enough

Abstract:

  • When you enter a custom token/market, it's just a light Yellow font. Should be huge, red, and bold. This would improve the reputation/integrity of the stock DEX.

  • I can implement this if we can reach consensus

Current:
image

Proposed (or similar):
image

Build fails after adding Charts

Hi all,

After following the steps in readme and have been adding the folders charting_library datafeeds to /src and /public i receive errors on building.
What did i do wrong here ?

Failed to compile.

/Applications/XAMPP/xamppfiles/htdocs/serum-dex-ui/src/components/TradingView/index.tsx
TypeScript error in /Applications/XAMPP/xamppfiles/htdocs/serum-dex-ui/src/components/TradingView/index.tsx(52,11):
Property 'container' is missing in type '{ symbol: string; datafeed: any; interval: Nominal<string, "ResolutionString">; container_id: string | undefined; library_path: string; locale: "en"; disabled_features: string[]; ... 7 more ...; theme: "Dark"; }' but required in type 'ChartingLibraryWidgetOptions'. TS2741

50 | 
51 |   React.useEffect(() => {

52 | const widgetOptions: ChartingLibraryWidgetOptions = {
| ^
53 | symbol: findTVMarketFromAddress(
54 | market?.address.toBase58() || '',
55 | ) as string,

`getMultipleSolanaAccounts` fails when over 100 accounts are provided on the Balances page

Description

When accessing the Balances page on a heavily-traded Solana account, the following occurs and all of the rows of Balances disappear. Additionally, the "Settle All Funds" button doesn't work.

Error: failed to get info about accounts 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU, Cpnxh12vMv9xWRxe1TnxZC34KWyftP7JHacjZFTR3dDk, MAPS41MDahZ9QdKXhVa4dWB9RuyfV4XqhyAZ8XcYepb, 8S94Ze8WWHGiFMUx28LwEviwgHpYD64FkTWVxd5kxDhu, 3GECTP7H4Tww3w8jEPJCJtXUtXxiZty31S9szs84CcwQ,
(continued ...)
7ncCLJpP3MNww17LW8bRvx8odQQnubNtfNZBL5BgAEHW, 6ry4WBDvAwAnrYJVv6MCog4J8zx6S3cPgSqnTsDZ73AR, 8sxtSswmQ7Lcd2GjK6am37Z61wJZjA2SzE7Luf7yaKBB, 262cQHT3soHwzuo2oVSy5kAfHcFZ1Jjn8C1GRLcQNKA3, BXXkv6z8ykpG1yuvUDPgh732wzVHB69RnB9YgSYh3itW: Too many inputs provided; max 100
at getMultipleSolanaAccounts (send.tsx:925)
at async FetchLoopInternal.getAllMintInfo [as fn] (tokens.tsx:194)
at async FetchLoopInternal.refresh (fetch-loop.tsx:104)

Proposed Solution

If >= 100 accounts are being looked up, break it up into chunks of 100 or less accounts to query the API. For each chunk of 100 accounts or less, query getMultipleAccounts, then collect the results into a single collection.

DEX logo size blow out

When I leave https://dex.projectserum.com/#/ open for longer periods - which is pretty usual for my trading - after a while the page logo blow out in size.

I then have to reload, and re-enter the password etc .. I'm sure it shouldn't be doing that.

Here's a before and after:

Before:

Screenshot from 2020-09-20 19-18-06

After:

Screenshot from 2020-09-20 19-17-51

After a page refresh it's back to normal.

I thought it might be an svg issue, but the logo is a png.

Tradingview integration

`TypeScript error in /home/ec2-user/serum-dex-ui/src/components/TradingView/index.tsx(52,11):
Property 'container' is missing in type '{ symbol: string; datafeed: any; interval: Nominal<string, "ResolutionString">; container_id: string | undefined; library_path: string; locale: "en"; disabled_features: string[]; ... 7 more ...; theme: "Dark"; }' but required in type 'ChartingLibraryWidgetOptions'. TS2741

50 |
51 |   React.useEffect(() => {

52 | const widgetOptions: ChartingLibraryWidgetOptions = {
| ^
53 | symbol: findTVMarketFromAddress(
54 | market?.address.toBase58() || '',
55 | ) as string,

error Command failed with exit code 1.
`

I have added the correct directories. Added import { TVChartContainer } from '../../src/components/TradingView'; to TradePage.tsx, deleted the line from tsconfig.json, uncommented the `<script src="%PUBLIC_URL%/datafeeds/udf/dist/polyfills.js"></script>

<script src="%PUBLIC_URL%/datafeeds/udf/dist/bundle.js">` from index.html. Unsure what I am missing.

Autosettle loop bug

Received this report from a user:

just got dinged 48 times for .000005 sol within 6 minutes (not making any trades)

Light on details other than that.

Further reports: This is caused by auto-settle being enabled by sollet/phantom/similar.

Can't cancel a limit order

Hello, can someone help me. I have numerous orders on the Serum dex that I want to change the prices on and when I hit the Cancel button in Open Orders it just sits there Refreshing itself forever. I've been using my Cell phone, placing orders usually works fine, converting works most of the time, I just cant cancel any and it has alot of my money tied up.

Build fails with default code (without adding charts)

We prefer to run the UI without adding trading view charts (for licensing reasons amongst others), recent versions don't seem to compile anymore. I am not sure if this intentional (the readme hints that adding charts is optional). When trying to compile we get:

$ REACT_APP_GIT_SHA=`git rev-parse --short HEAD` REACT_APP_GIT_DATE=`git log -1 --date=format:"%Y/%m/%d" --format="%ad"` craco build
Creating an optimized production build...
Failed to compile.

./src/components/TradingView/index.tsx
Cannot find file '../../charting_library' in './src/components/TradingView'.


error Command failed with exit code 1.```

Rename Add Market

quite a few people misunderstand what Add Market means in the UI and they end up creating a new market instead of Adding a market to UI market list

Renaming it to Create New Market will be better indicative of what it does imo

Raydium Trading Open order won't show

I have a limit order on Raydium DEX for TULIP/USDC. After order was placed, trade was not showing up as open order, but USDC was already taken out of my wallet. Can't cancel the order because the trade is not shown under open order. Anyone knows how to resolve this issue?
image

Error listing new market

When proving LP/Market on serum I encountered error transaction? Is there any explanation about that?

Balances page fails to load (rate limits)

I did some investigation into the Balances page, which is always broken for me and slams the RPC node until it rate limits you.

Problem: A single load of the "Balances" page from my main wallet, hit the projectserum public rpc node about 400 times in 2 seconds before getting rate limited. These are 95% individual calls to getAccountInfo, should be replaced with getMultipleAccounts asap. It actually hit ~600 requests in the total page load, but the limiting started at ~400 in 2s.

Addressing this could, in my opinion, immensely improve UX. And maybe reduce load on projectserum rpc's by an order of magnitude. The orders page has similar behavior.
image

Potential solution: Batch all these single getAccountInfo calls from the Balances page into multiple getMultipleAccounts calls, instead.

serum-api.bonfida.com used Cloudflare to restrict access

Getting this repo working locally give me the following errors when hitting the | serum-api.bonfida.com api:

❯ curl 'https://serum-api.bonfida.com/tv/symbol_info?group=NYSE' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: http://localhost:3001/' -H 'Origin: http://localhost:3001' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: cross-site' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'TE: trailers'
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Access denied | serum-api.bonfida.com used Cloudflare to restrict access</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/main.css" type="text/css" media="screen,projection" />
<script defer src="https://api.radar.cloudflare.com/beacon.js" type="c81ca16b84e117f5b3c9a3c0-text/javascript"></script>
</head>
<body>
<div id="cf-wrapper">
<div class="cf-alert cf-alert-error cf-cookie-error hidden" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>
<div id="cf-error-details" class="p-0">
<header class="mx-auto pt-10 lg:pt-6 lg:px-8 w-240 lg:w-full mb-15 antialiased">
<h1 class="inline-block md:block mr-2 md:mb-2 font-light text-60 md:text-3xl text-black-dark leading-tight">
<span data-translate="error">Error</span>
<span>1020</span>
</h1>
<span class="inline-block md:block heading-ray-id font-mono text-15 lg:text-sm lg:leading-relaxed">Ray ID: 6a87fb336cb8f2f9 &bull;</span>
<span class="inline-block md:block heading-ray-id font-mono text-15 lg:text-sm lg:leading-relaxed">2021-11-03 19:24:10 UTC</span>
<h2 class="text-gray-600 leading-1.3 text-3xl lg:text-2xl font-light">Access denied</h2>
</header>
<section class="w-240 lg:w-full mx-auto mb-8 lg:px-8">
<div id="what-happened-section" class="w-1/2 md:w-full">
<h2 class="text-3xl leading-tight font-normal mb-4 text-black-dark antialiased" data-translate="what_happened">What happened?</h2>
<p>This website is using a security service to protect itself from online attacks.</p>
</div>
</section>
<div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">
<p class="text-13">
<span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">6a87fb336cb8f2f9</strong></span>
<span class="cf-footer-separator sm:hidden">&bull;</span>
<span class="cf-footer-item sm:block sm:mb-1"><span>Your IP</span>: 110.174.193.47</span>
<span class="cf-footer-separator sm:hidden">&bull;</span>
<span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; security by</span> <a rel="noopener noreferrer" href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" target="_blank">Cloudflare</a></span>
</p>
</div>
</div>
</div>
<script type="c81ca16b84e117f5b3c9a3c0-text/javascript">
  window._cf_translation = {};
  
  
</script>
<script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="c81ca16b84e117f5b3c9a3c0-|49" defer=""></script><script defer src="https://static.cloudflareinsights.com/beacon.min.js" data-cf-beacon='{"rayId":"6a87fb336cb8f2f9","version":"2021.10.0","r":1,"token":"a552bc24626241e78283539070a9ffa4","si":100}'></script>
</body>
</html>

Is there backend code anywhere so I can run my own matching API?

ALL Trade History

How can see the ALL Trade History of pending orders and transaction record on dex?
NOT "Recent" Trade History

I think it can export or display all the trade history
Is a necessary function of a trading platform

Bought RAYDIUM on Serum but does not show in wallet

Hi guys,
I bought RAY on Serum by trading USDT the transaction went through as my USDT balance has reduced, however I can’t see RAY balance in the Serum wallet so as to settle the funds and move it to sollet wallet .. it’s been couple of days now ..Any solution would be appreciated
Thanks

"System Program Error 1" is undescriptive

Received a report that "System Program Error 1" indicates a lack of SOL in the wallet for transactions. Have yet to confirm, either way this message could be more descriptive.

i had a enough for 1 tx, but a trade is like 4 txs that's why i didn't think of it at first

image

use versions or tags

I'm hosting a mirror of this UI now ( https://serum-mirror.folkvang.io/ ), I will try to keep it up to date as time goes on while also looking at the code changes. Using a version system or tags or a changelist would make that a lot easier :)

Convert Time Error

When try to convert from SOL to USDT getting the following

Timed out awaiting confirmation on transaction

HELP

Error placing order / system program error1

I am selling my FTR token when placing order notification pop up saying with heading error placing order and below subheading with system program error can anyone please solve this issue.

Error loading all market

When loading Orders and Balances alot of errors pop up on the screen like below. Eventually Orders and balances show on the screen but the errors are unnessary.

Error loading all market
failed to get info about account 74Ciu5yrste8TFTHvQuEVbFZJrbnCMRoohBK33NNiPtv: TypeError: Failed to fetch

confusing workflow for trading newish coins with already-existing markets

I'm trying to trade a newish coin, SUNNY (mint=SUNNYWgPQmFxe9wTZzNK7iPnJ3vYDrkgnxJRJm1s3ag).

I can see it's trading quite a bit of volume, e.g. it appears on the top lists of https://coinmarketcap.com/exchanges/serum-dex/ and https://serumpulse.com/main/home

I can even do trades using symmetry.fi's swap interface (which says it just routes to Serum) so I know there's a market for it!

However, it doesn't show up in the market dropdown (the one that defaults to SOL/USDC). Nor is it searchable (either as SUNNY or as the mint address) in the search to the left of the environment selector.

If I try to "add market" it seems like I can do that, but it will charge me ~2 SOL to create the market (which I don't want to do, the market already exists).

Why access `_decoded`?

I mentioned this in another PR (project-serum/serum-ts#108) but thought I'd ask here too.

From what I see, the Dex UI ends up accessing the _decoded.asks and _decoded.bids and then set up a listener using connection.onAccountChange() on the public key of the ask/bid accounts.

Why access market._decoded.asks and not market.asksAddress? The latter seems cleaner. An object like _decoded seems less stable of an API to build on (_underscore is usually convention for private interfaces)

Are there any reasons that I am missing?

deployment on heroku reports "unhandled loader in the production webpack config"

Deployment on heroku fails with the below error:

2020-12-04T16:23:44.892498+00:00 heroku[web.1]: State changed from crashed to starting
2020-12-04T16:24:04.171691+00:00 heroku[web.1]: Starting process with command `npm start`
2020-12-04T16:24:07.586564+00:00 app[web.1]:
2020-12-04T16:24:07.586605+00:00 app[web.1]: > [email protected] start /app
2020-12-04T16:24:07.586606+00:00 app[web.1]: > craco start
2020-12-04T16:24:07.586606+00:00 app[web.1]:
2020-12-04T16:24:10.119915+00:00 app[web.1]: /app/node_modules/@craco/craco/lib/plugin-utils.js:29
2020-12-04T16:24:10.119937+00:00 app[web.1]: throw new Error(
2020-12-04T16:24:10.119938+00:00 app[web.1]: ^
2020-12-04T16:24:10.119938+00:00 app[web.1]:
2020-12-04T16:24:10.119939+00:00 app[web.1]: Error: Found an unhandled loader in the production webpack config: /app/node_modules/style-loader/index.js
2020-12-04T16:24:10.119940+00:00 app[web.1]:
2020-12-04T16:24:10.119941+00:00 app[web.1]: This error probably occurred because you updated react-scripts or craco. Please try updating craco-less to the latest version:
2020-12-04T16:24:10.119941+00:00 app[web.1]:
2020-12-04T16:24:10.119941+00:00 app[web.1]: $ yarn upgrade craco-less
2020-12-04T16:24:10.119942+00:00 app[web.1]:
2020-12-04T16:24:10.119942+00:00 app[web.1]: Or:
2020-12-04T16:24:10.119942+00:00 app[web.1]:
2020-12-04T16:24:10.119943+00:00 app[web.1]: $ npm update craco-less
2020-12-04T16:24:10.119943+00:00 app[web.1]:
2020-12-04T16:24:10.119944+00:00 app[web.1]: If that doesn't work, craco-less needs to be fixed to support the latest version.
2020-12-04T16:24:10.119945+00:00 app[web.1]: Please check to see if there's already an issue in the FormAPI/craco-less repo:
2020-12-04T16:24:10.119945+00:00 app[web.1]:
2020-12-04T16:24:10.119945+00:00 app[web.1]: * https://github.com/FormAPI/craco-less/issues?q=is%3Aissue+webpack+unknown+rule
2020-12-04T16:24:10.119946+00:00 app[web.1]:
2020-12-04T16:24:10.119946+00:00 app[web.1]: If not, please open an issue and we'll take a look. (Or you can send a PR!)
2020-12-04T16:24:10.119946+00:00 app[web.1]:
2020-12-04T16:24:10.119947+00:00 app[web.1]: You might also want to look for related issues in the craco and create-react-app repos:
2020-12-04T16:24:10.119947+00:00 app[web.1]:
2020-12-04T16:24:10.119947+00:00 app[web.1]: * https://github.com/sharegate/craco/issues?q=is%3Aissue+webpack+unknown+rule
2020-12-04T16:24:10.119948+00:00 app[web.1]: * https://github.com/facebook/create-react-app/issues?q=is%3Aissue+webpack+unknown+rule
2020-12-04T16:24:10.119948+00:00 app[web.1]:
2020-12-04T16:24:10.119948+00:00 app[web.1]: at throwUnexpectedConfigError (/app/node_modules/@craco/craco/lib/plugin-utils.js:29:11)
2020-12-04T16:24:10.119948+00:00 app[web.1]: at throwError (/app/node_modules/craco-less/lib/craco-less.js:14:5)
2020-12-04T16:24:10.119949+00:00 app[web.1]: at /app/node_modules/craco-less/lib/craco-less.js:119:7
2020-12-04T16:24:10.119950+00:00 app[web.1]: at Array.forEach (<anonymous>)
2020-12-04T16:24:10.119950+00:00 app[web.1]: at Object.overrideWebpackConfig (/app/node_modules/craco-less/lib/craco-less.js:51:11)
2020-12-04T16:24:10.119950+00:00 app[web.1]: at overrideWebpack (/app/node_modules/@craco/craco/lib/features/plugins.js:42:40)
2020-12-04T16:24:10.119951+00:00 app[web.1]: at /app/node_modules/@craco/craco/lib/features/plugins.js:64:29
2020-12-04T16:24:10.119951+00:00 app[web.1]: at Array.forEach (<anonymous>)
2020-12-04T16:24:10.119951+00:00 app[web.1]: at applyWebpackConfigPlugins (/app/node_modules/@craco/craco/lib/features/plugins.js:63:29)
2020-12-04T16:24:10.119952+00:00 app[web.1]: at mergeWebpackConfig (/app/node_modules/@craco/craco/lib/features/webpack/merge-webpack-config.js:67:30)
2020-12-04T16:24:10.159939+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-12-04T16:24:10.160498+00:00 app[web.1]: npm ERR! errno 1
2020-12-04T16:24:10.171269+00:00 app[web.1]: npm ERR! [email protected] start: `craco start`
2020-12-04T16:24:10.171584+00:00 app[web.1]: npm ERR! Exit status 1
2020-12-04T16:24:10.172976+00:00 app[web.1]: npm ERR!
2020-12-04T16:24:10.173259+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script.
2020-12-04T16:24:10.175087+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-12-04T16:24:10.200505+00:00 app[web.1]:
2020-12-04T16:24:10.205072+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-12-04T16:24:10.205233+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-12-04T16_24_10_176Z-debug.log
2020-12-04T16:24:10.297369+00:00 heroku[web.1]: Process exited with status 1
2020-12-04T16:24:10.353145+00:00 heroku[web.1]: State changed from starting to crashed

Cors issues

I was able to run the UI but I keep running into CORS issues since I am trying to call the serum API from localhost. Any idea on how to properly fix that (for people that will be running the serum UI and calling the serum dex).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.