Giter Club home page Giter Club logo

kwenta's Introduction

Kwenta CI kwenta Discord Twitter Follow

DEPRECATED Kwenta

This repository is no longer the repository for Kwenta. Please use Kwenta/kwenta.


A dApp enabling derivatives trading with infinite liquidity โ€” powered by the Synthetix protocol.

The trading UI is available on IPFS kwenta.eth.link and kwenta.io.
ENS link: kwenta.eth.

Tech stack

  • Next.js
  • React
  • React Query
  • Recoil
  • Unstated-next
  • Styled-Components
  • Immer

Ethereum stack

Development

Install dependencies

npm i

Set up environment variables

Copy the .env.local.example file in this directory to .env.local (which will be ignored by Git):

cp .env.local.example .env.local

Then, open .env.local and add the missing environment variables:

  • NEXT_PUBLIC_PORTIS_APP_ID - Portis app id (get it from portis.io)
  • NEXT_PUBLIC_BN_ONBOARD_API_KEY - Blocknative Onboard API key (get it from blocknative.com)
  • NEXT_PUBLIC_INFURA_PROJECT_ID - Infura project id (get it from infura.io)

Run

npm run dev

Open http://localhost:3000 to view it in the browser.

Build

npm run build
npm start

kwenta's People

Contributors

0xclem avatar andytcf avatar dbeal-eth avatar dependabot[bot] avatar drptbl avatar evgenyboxer avatar jcmonte avatar jjgonecrypto avatar jwineman avatar kelonye avatar kmeraz avatar mi-yu avatar midnightonmars avatar

Stargazers

 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

kwenta's Issues

Gas fee is undervalued while converting assets on dashboard or swapping assets on exchange

Description:
Gas fee is undervalued while converting assets on dashboard or swapping assets on exchange.

Reproduction steps:

  1. Go to Kwenta convert page (https://kwenta-git-dev.synthetixio.vercel.app/dashboard/convert)
  2. Connect your wallet
  3. Click on "EDIT" next to "Gas price (GWEI)"

Actual result:

Expected result:

  • Gas fee should be higher to avoid users waiting for tx confirmations or stuck transactions

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
Screenshot 2020-10-02 at 02 01 40
Screenshot 2020-10-02 at 02 01 36
Screenshot 2020-10-02 at 02 01 33

alchemyapi is reaching rate limits

Description:
alchemyapi is reaching rate limits

Reproduction steps:

  1. Go to Kwenta exchange (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
Request URL: https://eth-mainnet.alchemyapi.io/v2/_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC
Request Method: POST
Status Code: 429 
{"method":"eth_call","params":[{"to":"0x0d69755e12107695e544842bf7f61d9193f09a54","data":"0xa827bf480000000000000000000000008dd7b3223b9c2f18b0f4b4108ed2a506f824b1ce"},"latest"],"id":50,"jsonrpc":"2.0"}
response:
{"jsonrpc": "2.0", "id": 50, "error": {"code": 429, "message": "Your app has exceeded its compute units per second capacity. If you have retries enabled, you can safely ignore this message. If not, check out https://docs.alchemyapi.io/guides/rate-limits"}}

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
Screenshot 2020-10-02 at 02 48 09

User is able to skip "Connect wallet" modal while selecting synths without connected wallet

Description:
User is able to skip "Connect wallet" modal while selecting synths to trade without connected wallet.

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Click on "Select Synth" inside "Into" section
  3. Select any synth from the list
  4. Click on "swap" button between "From" and "Into" sections
  5. Click on "Select Synth" inside "Into" section
  6. Select any synth from the list

Actual result:

  • User is able to skip "Connect Wallet" modal which shows up only while clicking on "Select Synth" inside "From" section. However it doesn't seem to work the same way inside "Into" section.

Expected result:

  1. Modal with "Connect Wallet" should show up on both, after clicking on "Select Synth" inside "From" section and also after clicking on "Select Synth" inside "Into" section.
    or
  2. Don't block users from selecting synths while they're not connected with wallet and don't show this modal neither on "Select Synth" inside "From" section and "Select Synth" inside "Into" section. This will allow users to view market details without connecting wallet.

Environment:
MacBook Pro (15-inch), macOS 10.15.6

Screenshots / videos:
2020-09-28 00 20 51

Redirect loop on after choosing MetaMask wallet as login method

Description:
Redirect loop after choosing "MetaMask" wallet as login method.

Prerequisites:

  • "MetaMask" extension installed and set up
  • "MetaMask" extension unlocked with password
  • Accepted exchange permissions on wallet

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/)
  2. Click on "Connect Wallet" button
  3. Click on "MetaMask"

Actual result:
User is thrown to redirect loop after choosing "MetaMask" as login method.

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Firefox 81.0

Screenshots / videos:
2020-09-26 01 45 02

Redirect loop after choosing MetaMask wallet as login method when it's locked (with password)

Description:
Redirect loop after choosing "MetaMask" wallet as login method while MetaMask extension is locked with password.

Prerequisites:

  • "MetaMask" extension installed and set up
  • Close and open browser again to lock MetaMask extension with password

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Click on "Connect Wallet" button
  3. Click on "MetaMask"

Actual result:
User is thrown to redirect loop after choosing "MetaMask" as login method.

Expected result:
"MetaMask" extension should show up and ask for password. After typing password, user should be presented with permission request or if already accepted previously, logged straight in to the exchange.

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Firefox 81.0

Screenshots / videos:
2020-09-26 01 03 56

Able to input negative values for exchange

Description:
Able to input negative values while exchanging assets.

Prerequisites:
Metamask wallet with some funds on it for testing (on rinkeby for example)

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Connect your wallet with success
  3. Click on "Select Synth" inside "From" section
  4. Select sUSD for example
  5. Click on "Select Synth" inside "Into" section
  6. Select sADA for example
  7. Type "-" inside asset value input field

Actual result:

  • User is able to input negative values.

Expected result:

  • User shouldn't be able to input negative values.

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
Screenshot 2020-10-11 at 00 27 41

User is not properly logged in on 1st try while using "WalletLink" login method

Description:

  • User is not properly logged in on 1st try while using "WalletLink" login method.
  • "Login and Authorize~" modal doesn't change after logging in successfully with "WalletLink" method.

I think both of these are connected issues, so reported them in one issue.

Prerequisites:

  • "Coinbase wallet" app installed on mobile device and set up.

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/)
  2. Click on "Connect Wallet" button
  3. Click on "WalletLink"
  4. Scan QR code with your mobile device using "Coinbase wallet" app

Actual result:
User after scanning QR code and properly linking his "Coinbase wallet" app with Kwenta, still sees "Login and Authorize Your Wallet" modal. He is also not properly logged in. If user retries linking for 2nd time, he will be successfully logged in to Kwenta but this time QR code is not shown, user is logged in straight after choosing "WalletLink" login method.

Expected result:
User after scanning QR code should be properly logged in on 1st try, modal should disappear.

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Firefox 81.0

Screenshots / videos:
Screenshot 2020-09-14 at 17 49 00
2020-09-14 17 30 44

Fee for sUSD/sETH or sUSD/iETH is 1% instead of 0.5%

Description:
Fee for sUSD/sETH or sUSD/iETH is 1% instead of 0.5% like on synthetix.exchange.

Prerequisites:
Metamask wallet with some funds on it for testing (on rinkeby for example)

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Connect your wallet with success
  3. Click on "Select Synth" inside "From" section
  4. Select sUSD for example
  5. Click on "Select Synth" inside "Into" section
  6. Select sETH or iETH for example

Actual result:

  • Kwenta reports fee for sETH/iETH as 1%, while on legacy exchange it's 0.5%

Expected result:

  • Fee should match with legacy exchange

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
Screenshot 2020-10-11 at 12 16 44
Screenshot 2020-10-11 at 12 16 56

Hide low balances (dust) from "Select Synth" modal

Description:
Hide low balances (dust) from "Select Synth" modal.

Prerequisites:

  • Low balances (dust) of synths on your wallet

Reproduction steps:

  1. Go to Kwenta exchange (https://elite.kwenta.io/exchange)
  2. Connect your wallet
  3. Click on "Select Synth" inside "From" input field

Actual result:

  • All synths are shown

Expected result:

  • Dust shouldn't be shown

Screenshots / videos:
photo_2020-10-08 17 40 31
Screenshot 2020-10-08 at 17 40 46

Hard to determine which column is for asset prices and which is for value of assets held at first look

Description:
After going to dashboard, on first look it's hard to determine which column is for current asset price and which column is for current assets held, especially when you have similar value of assets to current price of assets (close to ~1 entity of asset). For example if you have 0.90 sETH, you would get confused which one is current price and which one is your current value of asset held.

Screenshot 2020-10-11 at 00 56 06

Entered amount is being replaced with another value when it's a big amount

Description:
Entered amount is being replaced with another value when it's a big amount.
This issue is a regression, can't reproduce on elite.kwenta.io.

Prerequisites:
Metamask wallet with some funds on it for testing (on rinkeby for example)

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/)
  2. Connect your wallet with success
  3. Select "From sUSD" and "Into iETH"
  4. Start typing multiple "1" in "From sUSD" value input field while observing it

Actual result:

  • After 17th "1", weird things start to happen. Even if you type "1" all way long, input field starts to show "2", "3", "e+21" at the end of input field.

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
(you can see what I'm typing on the bottom of video and different numbers in the input field)
2020-10-12 15 06 07

Add light/dark mode

Description:
Would be great to have an ability to switch between light/dark versions on exchange.

Kwenta Elite feedback:

light/day mode switch, as it's almost midnight so my f.lux is obviously kicking in pretty hard rn in the orange spectrum, and the background/font contrast is too strong

Screenshot 2020-10-14 at 01 34 23

Very poor performance of price graphs for 1W and 1M timeframes

Description:
Very poor performance of graphs for 1W and 1M timeframes. The line on graph with a dot is not moving as smooth as on another timeframes like 1H/1D for example.

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Click on "Select Synth" inside "Into" section
  3. Select any synth from the list (sBTC for example)
  4. Click on "1M" timeframe above price graph
  5. Hover over graph with your mouse

Actual result:

  • Performance for 1W and 1M timeframes on graphs is really poor. I'm having high end macbook and line with active dot is moving really laggy.
  • You can see that price for asset above graph is updating really smoothly when moving mouse over graph.
  • Chrome "Performance" tab is screaming about long tasks.

Expected result:

  1. Line with active dot on price graph should move smoothly for all timeframes.

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
2020-09-30 00 36 37
2020-09-30 00 38 27

Not able to login with Trezor wallet

Description:
Not able to login with Trezor. It asks for permissions over and over and doesn't let me to login. It was tested only with emulator, so may be related to it. However it worked fine on another websites. My Trezor hardware is on it's way (should be in my hands on Tuesday), then I will verify this bug again.

Prerequisites:

  • Trezor wallet

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Click on "Connect Wallet" button
  3. Click on "Trezor"
  4. Click on "Ethereum"
  5. Click on "Connect" button
  6. Accept all permission requests in TrezorConnect

Actual result:

  • User is presented with permissions requests to Trezor wallet over and over.

Expected result:

  • User should be able to login after accepting permission requests.

Environment:
MacBook Pro (15-inch), macOS 10.15.6

Screenshots / videos:
2020-09-27 18 23 36

Show trades on graph

Description:
We could show trades on graph making it more interactive for traders.

Something like this for example:
Screenshot 2020-10-11 at 00 44 17

(red arrow for sells, green arrow for buys)

Show some indicator that transaction is in progress on exchange page

Description:
Currently we're only using notifications to let user know that transaction is in progress. However after notification disappears, there is no indicator on exchange page that shows transactions in progress. User has to open notifications first to be able to see it (and it's gone after page refresh which is also quite common for users while they're not patient). Missing indicator could lead users to make two transactions in a row thinking that 1st one didn't went through in case of issues with ETH network on mainnet. Also, transactions are fast on rinkeby, but on mainnet they won't be that fast.

MetaMask direct login isn't working on testnet inside MetaMask app browser

Description:
MetaMask direct login isn't working inside MetaMask app browser while on testnet.

Prerequisites:
"MetaMask" app installed on mobile device and set up.

Reproduction steps:

  1. Open "MetaMask" mobile app
  2. Tap on "Wallet" on top header
  3. Tap on "Rinkeby" testnet
  4. Tap on "Burger menu" icon in top left
  5. Tap on "Browser" position in menu
  6. Go to Kwenta exchange page (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  7. Tap on "Connect Wallet" button
  8. Tap on "MetaMask" button

Actual result:
User is stuck on "Login and Authorize Your Wallet" modal.

Expected result:
MetaMask should show permission request from kwenta exchange. After user accepts it, he should be logged in to the exchange.

Environment:
iPhone 11 Pro, MetaMask 1.0.1

Screenshots / videos:
RPReplay_Final1601066737

Build the Trending Synth Sort

Right now the dropdown just has a price, we also need to be able to sort by the other options currently available on the synthetix exchange dashboard like volume etc.

Show profit/loss of synths held (on dashboard)

Description:
It would be great to show current profit/loss of portfolio single positions and overall. Seems that somewhere on dashboard would be the best place to do it.

Maybe somewhere here, in brackets or as a new column:
Screenshot 2020-10-11 at 00 52 49

Or as a separate tab in dashboard.

Kwenta Elite feedback:

a profit/loss tab somewhere that shows the USD equivalent current profitability of synths held.

User is logged in to first wallet available on Ledger before confirming a wallet which he wants to login with

Description:
User is logged in to first wallet available on Ledger before confirming a wallet which he wants to login with. It's hard to tell if it's a bug or not. I think that user should confirm which wallet he wants to login with first before he is logged in with any.

Prerequisites:

  • Ledger with Ethereum app installed (hardware or emulator)

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Click on "Connect Wallet" button
  3. Click on "Ledger"
  4. Click on "Ethereum"
  5. Click on "Connect" button
  6. Click on "Dismiss" button

Actual result:

  • User is logged in with first ETH wallet that he has on his Ledger in background, while user is presented a modal where he has an ability to choose with which wallet address he wants to login with.
  • While changing wallet address in drop-down, logged in wallet is also changing in background.

Expected result:

  • User shouldn't be logged in to any ETH wallet before he selects it from drop-down and click on "Done" button.
  • User shouldn't be logged in with any ETH wallet while choosing it from drop-down list until confirming with "Done" button.
  • Clicking on "Dismiss" button shouldn't log user in to any wallet.

Environment:
MacBook Pro (15-inch), macOS 10.15.6

Screenshots / videos:
2020-09-27 16 31 25

Show up to 2 decimals for asset USD value on dashboard

Description:
Show up to 2 decimals for asset USD value on dashboard.

Prerequisites:
Metamask wallet with some funds on it for testing (on rinkeby for example)

Reproduction steps:

  1. Go to Kwenta (https://elite.kwenta.io/dashboard)
  2. Connect your wallet with success

Actual result:

  • Asset value has more than 2 decimals in some cases. For example, iXRP => 14.6988$.

Expected result:

  • Asset value should have up to 2 decimals. For example, iXRP => 14.70$.

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
Screenshot 2020-10-12 at 14 45 48

Horizontal scrollbar on "Transactions" page (13" screen)

Description:
Horizontal scrollbar on "Transactions" page (13" screen).

Prerequisites:

  • 13" screen

Reproduction steps:

  1. Go to Kwenta exchange transactions page (https://elite.kwenta.io/dashboard/transactions)
  2. Connect your wallet

Actual result:

  • On 13" screens, transactions page, user sees horizontal scrollbars and a lot of empty space on right side, next to "USD Value"

Expected result:

  • No horizontal scrollbars (as it seems that it can fit properly after removing empty space)

Screenshots / videos:
photo_2020-10-08 17 58 51

Unable to transfer "max" amount of sUSD => gas required exceeds allowance (10000530) or always failing transaction

Description:
Unable to transfer "max" amount of sUSD. It works fine for sUSD while using fixed amount.

Prerequisites:
Metamask wallet with some funds on it for testing (on rinkeby for example)

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Connect your wallet with success
  3. Click on "Select Synth" inside "From" section
  4. Select sUSD for example
  5. Click on "Select Synth" inside "Into" section
  6. Select sADA for example
  7. Below "From" section, click on wallet balance to put "max" inside input field
  8. Click on "Submit Order" button

Actual result:

  • User gets console error from metamask (and is unable to transfer "max" sUSD):
inpage.js:1 MetaMask - RPC Error: gas required exceeds allowance (10000530) or always failing transaction {code: -32000, message: "gas required exceeds allowance (10000530) or always failing transaction"}
  • User is able to transfer fixed amount of sUSD without issues.
  • "Max" functionality seems to work fine for other assets.

Expected result:

  • User should be able to use "max" functionality to transfer sUSD.

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
2020-10-01 00 36 13

Notifications are not cleared after switching from one wallet to another

Description:
Notifications are not cleared after switching from one wallet to another.
In case if there are multiple users using same PC, I would say this is a bug and security concern because other person can see how much funds another person swapped (and posses) + transaction details (txid + etherscan url).

Prerequisites:
Two MaskMask wallets (one with some funds on it for testing (on rinkeby for example))

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Connect your wallet (wallet A) with success
  3. Click on "Select Synth" inside "From" section
  4. Select sUSD for example
  5. Click on "Select Synth" inside "Into" section
  6. Select sADA for example
  7. Type some valid amount to swap
  8. Click on "Submit Order" button
  9. Confirm transaction in MetaMask
  10. Click on your wallet address in top right
  11. Click on "Disconnect Wallet" from drop-down menu
  12. Go to MetaMask
  13. Switch your wallet to another one (wallet B)
  14. Connect it with exchange
  15. Click on "notification" icon

Actual result:

  • User B (wallet B) is able to see notifications of user A (wallet A)

Expected result:

  • Notifications should be cleared while switching wallets/disconnecting wallets

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
2020-10-01 01 00 12

Validation for asset decimal places is missing inside "From" and "Into" input fields

Description:
Validation for asset decimal places is missing inside "From" and "Into" input fields. It causes issues like console errors if user type some amount with more decimals than expected.

Prerequisites:
Metamask wallet with some funds on it for testing (on rinkeby for example)

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Connect your wallet with success
  3. Click on "Select Synth" inside "From" section
  4. Select sUSD for example
  5. Click on "Select Synth" inside "Into" section
  6. Select sADA for example
  7. Inside input field for "From" section, type any amount with huge decimal number, for example 1,11231231231231231231231231
  8. Click on "Submit Order" button

Actual result:

  • User is able to put more decimals than selected asset has.
  • User can't submit this order because metamask confirmation is not showing (console error is thrown).

Expected result:

  • User shouldn't be able to put more decimals than selected asset has.

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
Screenshot 2020-10-01 at 00 27 53
2020-10-01 00 21 08

"Submit Order" part (CTA) doesn't fit on 13" laptops, place it between asset inputs and above price graphs

Description:
"Submit Order" part (CTA) doesn't fit on 13" laptops, place it between asset inputs and above price graphs.

Prerequisites:

  • 13" screen

Reproduction steps:

  1. Go to Kwenta exchange (https://elite.kwenta.io/exchange)
  2. Connect your wallet

Actual result:

  • On 13" screens, user has to scroll down to be able to reach "Submit Order" button

Expected result:

  • User should be able to reach "Submit Order" button with ease

Screenshots / videos:
Screenshot 2020-10-08 at 17 49 59
photo_2020-10-08 17 47 56

MetaMask direct login isn't working on mobile browsers

Description:
MetaMask direct login isn't working on mobile browsers.

Prerequisites:
"MetaMask" app installed on mobile device and set up.

Reproduction steps:

  1. Go to Kwenta exchange page (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Tap on "Connect Wallet" button
  3. Tap on "MetaMask" button

Actual result:
User sees an information that MetaMask has to be installed first.

Expected result:
Logging in through MetaMask works however you have to choose "WalletConnect" method and then "MetaMask".
I suggest one of three options here:

  1. Add support for direct MetaMask login using MetaMask mobile app (if possible) => user should be redirected to "MetaMask" mobile app, asked if users wants to give access for exchange to his wallet, after accepted he should be logged in to the exchange.
  2. If above is not possible, maybe we could trigger "WalletConnect => MetaMask" flow (if possible) when user taps on "MetaMask" login method?
  3. If none of above applies, remove MetaMask method completely until MetaMask mobile app allows direct login on websites, but still it would be good to suggest that user can still login through MetaMask using "WalletConnect" somehow.

Environment:
iPhone 11 Pro (Safari & Chrome)
Samsung A30s (Chrome)

Screenshots / videos:
RPReplay_Final1601062134

Show indicator of exchange status

Description:
It would be great to show an indicator of exchange status for users, for example with 3 colors => green, yellow/orange, red.

Examples from other websites:
Screenshot 2020-10-11 at 01 32 34
Screenshot 2020-10-11 at 01 32 05
Screenshot 2020-10-11 at 01 31 54
Screenshot 2020-10-11 at 01 33 07

Make reclaim period timer more interactive (count it down by 1 second)

Description:
Currently it seems that timer on fee reclamation period updates only when there is a periodic fetch from API which is not quite often (something between 20-40sec).

Could me make it more interactive by counting it down by 1 second? We could use it in conjunction with API requests:

  1. after trade is done, countdown by 1 second
  2. when request is fetched, update timer (in case it's off or website has been refreshed)

Add "Feedback" floating bar to kwenta until it's in alpha state

Description:
I think it would be great to have some kind of nice "Feedback" floating bar which will allow users to easily report issues and it would be more encouraging.
Screenshot 2020-10-08 at 16 01 27

It could open typeform feedback page on click: hopefully https://elite.kwenta.io/feedback after #49 is done.

Or it could be an form which would slide out on click and then you could report feedback directly from exchange without leaving it. It could be accomplished with:
https://developer.typeform.com/embed/
https://codepen.io/Typeform/pen/rzaMEB

Unable to switch between Ledger wallets using "Switch Wallet" functionality (forced to "Disconnect Wallet" first)

Description:
Unable to switch between Ledger wallet easily. After connecting your Ledger wallet, if you want to switch to another Ledger wallet, you can't use "Switch Wallet" functionality. You have to "Disconnect Wallet" first and then "Connect Wallet" again by choosing another Ledger wallet.

Prerequisites:

  • Ledger wallet (hardware/emulator)

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Click on "Connect Wallet" button
  3. Click on "Ledger"
  4. Click on "Ethereum"
  5. Click on "Connect" button
  6. Click on "Done" button
  7. Click on connected wallet address in top right
  8. Click on "Switch Wallet" in drop-down
  9. Click on "Ledger"

Actual result:
While user is connected with Ledger wallet, after choosing "Ledger" from "Switch Wallet" modal, modal closes. User is forced to disconnect wallet first and then connect wallet again if he wants to connect with different Ledger wallet.

Expected result:
Choosing a "Ledger" from modal while switching accounts should allow to easily switch between different wallets on Ledger.

Screenshots / videos:
2020-09-27 14 52 42

Most of assets are presented with old price data on graphs

Description:
Most of assets are presented with old price data on graphs.

End to end test started at 29th September - 01:06 CET time. I expect most of them to be 1:06 CET and rest should be 1:07 CET (as it takes some time to iterate over all assets with e2e tests). Checks were done on 1D graphs timeframe. Looks like only sUSD works as expected.

sUSD  - 29th Sep 20 | 01:06
sEUR  - 29th Sep 20 | 01:00
sAUD  - 28th Sep 20 | 18:32
sXAU  - 28th Sep 20 | 18:32
sXAG  - 28th Sep 20 | 18:32
sBTC  - 28th Sep 20 | 23:02
sETH  - 28th Sep 20 | 23:01
sBNB  - 28th Sep 20 | 21:30
sXTZ  - 28th Sep 20 | 21:41
sXRP  - 28th Sep 20 | 18:32
sLTC  - 28th Sep 20 | 23:12
sLINK  - 28th Sep 20 | 18:32
sBCH  - 28th Sep 20 | 20:08
sADA  - 29th Sep 20 | 01:01
sDEFI  - 28th Sep 20 | 18:32
iBTC  - 28th Sep 20 | 23:02
iETH  - 28th Sep 20 | 23:01
iBNB  - 28th Sep 20 | 21:30
iXTZ  - 28th Sep 20 | 21:41
iXRP  - 28th Sep 20 | 18:32
iLINK  - 28th Sep 20 | 18:32
iLTC  - 28th Sep 20 | 23:12
iBCH  - 28th Sep 20 | 20:08
iADA  - 29th Sep 20 | 01:01
iDEFI  - 28th Sep 20 | 18:32

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Click on "Select Synth" inside "Into" section
  3. Select any synth (from list below) from the list
  4. Hover your mouse over right side on the price graph

Actual result:

  • User is presented with old data for most of assets on exchange.

Expected result:

  • User should get latest price data on graphs.

Environment:
MacBook Pro (15-inch), macOS 10.15.6

Screenshots / videos:
Screenshot 2020-09-29 at 01 13 06

Switching wallets functionality doesn't seem to work properly at first try

Description:
Switching wallets functionality doesn't seem to work properly at first try.

Prerequisites:

  • for example "MetaMask" extension installed and set up, it can be any other wallet login method available

Reproduction steps:

  1. Go to Kwenta (https://kwenta-git-dev.synthetixio.vercel.app/exchange)
  2. Click on "Connect Wallet" button
  3. Click on "MetaMask" (or any other wallet) and connect to exchange
  4. Click on yours wallet address in top right
  5. Click on "Switch Wallet" from drop-down menu
  6. Click on "WalletConnect" or "Ledger" or "Trezor" (or any other wallet)

Actual result:

  • User is logged out from currently connected wallet.
  • Connect wallet modal is closed without allowing user to login.
  • User has to repeat same steps twice to login successfully while switching wallets.

Expected result:

  • User should be able to login to new wallet on first try.

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
2020-09-30 00 30 03

Make exchange errors for transactions more descriptive

Description:
Are we able to make our errors on exchange more descriptive? Maybe code could be used to determine what error is it and show proper message for user?

  1. When user rejects transaction, exchange shows An unexpected error occurred., however console prints more descriptive error from metamask which could be used in some way:
{code: 4001, message: "MetaMask Tx Signature: User denied transaction signature.", stack: "Error: MetaMask Tx Signature: User denied transaction signature."}
  1. There is an issue with "max" functionality for sUSD (#34), exchange shows An unexpected error occurred., however console prints more descriptive error from metamask which could be used in some way:
inpage.js:1 MetaMask - RPC Error: gas required exceeds allowance (10000530) or always failing transaction {code: -32000, message: "gas required exceeds allowance (10000530) or always failing transaction"}

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
Screenshot 2020-10-01 at 00 43 02

1inch integration

Users need synths to trade on Kwenta, and if they don't have any they need to get some (from 1inch for example / mint it).

Leverage 1inch api - https://1inch.exchange/#/api to create an "ETH -> sUSD" converation.
I think its best to start with some kind of Proof of Concept / minimal implementation that shows the whole flow. Then we can proceed into integrating it with the Kwenta UI.

Screen Shot 2020-09-15 at 10 07 15 am

Add market cap in the "Market Details" section

Currently, there is a placeholder in the "Market Details" section for the market cap.

To compute this you want to use the contract function "totalSupply" and multiple this by the exchange rate of the synth.

import synthetix from 'lib/synthetix';

// total supply for sBTC

const totalSupply = await window.jss.contracts.SynthsBTC.totalSupply();

// result is an ethers BigNumber which you need to convert
const marketCap = totalSupply * priceRate;

I think that this should be a query... something like useSynthMarketCapQuery (for caching purposes).
You can see that this query uses priceRate, and I think it should basically be "enabled" only when you know the priceRate.

[coming-soon-page] Able to skip all fields in typeform and send empty form

Description:
Able to skip all fields in typeform and send empty form.

Reproduction steps:

  1. Go to https://kwenta.vercel.app/
  2. Click on "Sign Up" button
  3. Press "Enter" to begin form on typeform website
  4. Scroll down with your mouse to the end of form
  5. Click on "Submit" button

Actual result:

  • User is able to skip all fields and send empty form (probably causing a mess with empty forms in typeform panel)

Expected result:

  1. Make fields mandatory, user should not able able to skip required fields.

Environment:
MacBook Pro (15-inch), macOS 10.15.6, Chrome 85.0.4183.121

Screenshots / videos:
2020-09-30 18 33 10

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.