DeXter-on-Radix / website

Community built order book dex on Radix.
https://dexteronradix.com/
Other
14 stars 21 forks source link

Show resource addresses #432

Closed dcts closed 3 months ago

dcts commented 5 months ago

Currently there is no way for the user to determine the resource address of the traded tokens. When we allow permissionless listing on dexter as its currently the case we run into the potential scenario that a duplicate fake coin could be created and the user would have no way to verify the legitimacy of the coin by checking the resource address.

We should add the resource address in the UI. I suggest to create an "Info" tab next to "PriceChart".

dcts commented 4 months ago

I suggest to show the following data inside the INFO tab:

dcts commented 3 months ago

The Design for this feature is now finished!

image

Figma File: https://www.figma.com/design/Zjff03BX35fREatqzcWDS7/DeXter-UI?node-id=0-1&t=zvlr18AoVEWZQfqt-1

The file is full with designs, so its hard to find, but here a roadmap: (1) go to "Prototypes and tests" (2) right unter voting app design you can find this design (see below). image

How to get the data from redux

The data for this is already available, you can get it by combining data from the rewardSlice and PairSelectoSlice. You can follow this logic:

// 1. get array of all pairs
const { pairsList } = useAppSelector((state) => state.rewardSlice);

// 2. get currenlty selected pair address
const selectedPairAddress = useAppSelector((state) => state.pairSelector.address);

// 3. get the relevant pairInfo
const pairInfo = pairsList.find((pairInfo) => pairInfo.address === selectedPairAddress);
const { name, address, orderReceiptAddress, token1, token2,  } = pairInfo;
fliebenberg commented 3 months ago

This would be a great addition. I would suggest we call the tab "Pair Info" rather than "Token Info" as indicated on the design.

saidam90 commented 3 months ago

You can assign this to me 🤚🏼