Git Product home page Git Product logo

iq-bridge-ui's People

Contributors

0xjm avatar justincast avatar kesar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

iq-bridge-ui's Issues

minor final improvements locking

these can be done after deploying locking ๐Ÿ‘๐Ÿป just adding a list so we dont forget

  • move eth addresses to .env
  • in header lock its still using matic explorer (it should use etherscan)
  • login to swap info message in locking should be "login to lock"
  • when there is a message of tx executed, it would be great if it can get linked to the tx w etherscan

Improve eth login dialog

image

Is your feature request related to a problem? Please describe.
Dialog for wallets its boring. not icons

Describe the solution you'd like
We could add icons and merge some of the options. Example:

image

Review translations / Missing ones

Is your feature request related to a problem? Please describe.
There are missing translations and translations that are not needed / wrong.

Describe the solution you'd like
App should be fully translated

Additional context
We need to review missing ones, have proper english ones and then ask the chinese / korean translator to help with those languages

Lock issues

  • make sure it can get merged ( I get still message of conflicts )
  • on Login if you are not in the right chain, show an error explaining what user needs to do. Right now it shows nothing:
    #1 (comment)

image

  • on Login on matic it shows loading forever ( I think it might be because I have 0 hiIQ )
    #1 (comment)

click in balance to input improvements

image

image

a) big numbers / numeric input breaks layout
b) no need to have an arrow or any icon, all the uniswap style AMM have this feature so just let users to click in the balance (already pushed small change to remove that)
c) there is a comma there ( I guess based in my locals), that's gonna break most likely bridges & locking txs

image

Voting feature

Is your feature request related to a problem? Please describe.
A way for voting inside of our UI

Describe the solution you'd like
It should be a new page with a select, that will contain the latests proposals. Defaulting to the last one active.

It should show title & description converting markdown to html in a safe way

Results should be shown initially in a pie chart (in the next iteration we will try to add an SVG w a brain :)) )

Users should have buttons to vote to different values of the proposal. Once they sign and broadcast the votes, ideally it should refresh the pie chart w new values.

User should be able to see his vote, and change if there is still time for that.

If possible, we should show the user voting power.

Extra: show list of voting similar to the snapshot page

Useful links

https://github.com/DimensionDev/Maskbook/blob/master/packages/maskbook/src/plugins/Snapshot/apis/index.ts
^-

export async function vote(identifier: ProposalIdentifier, choice: number, address: string) {
    const msg = JSON.stringify({
        version: '0.1.3',
        timestamp: (Date.now() / 1e3).toFixed(),
        space: identifier.space,
        type: 'vote',
        payload: {
            proposal: identifier.id,
            choice,
            metadata: {},
        },
    })

    const sig = await Services.Ethereum.sign(msg, address)

    const response = await fetch(https://hub.snapshot.page/api/message, {
        method: 'POST',
        headers: {
            Accept: 'application/json',
            'Content-Type': 'application/json',
        },
        body: JSON.stringify({ msg, sig, address }),
    })

    const result: VoteSuccess = await response.json()
    return result
}

You can check our documentation here for our API if you want to integrate it on your UI: https://docs.snapshot.org/graphql-api
For signing vote and proposal you will need to use Snapshot.js client. It's not documented but i can point you to some code example from Snapshot UI
This is how we send a vote or a proposal:
https://github.com/snapshot-labs/snapshot/blob/032f91c67ba7ebde4eb45d5585f5ff9ed26f6cac/src/store/modules/app.ts#L58-L64
This is how the client is initialized:
https://github.com/snapshot-labs/snapshot/blob/032f91c67ba7ebde4eb45d5585f5ff9ed26f6cac/src/helpers/client.ts
This is how a vote is triggered: https://github.com/snapshot-labs/snapshot/blob/975b84dabb79b001a9395572818b689f455d40ef/src/components/Modal/Confirm.vue#L103-L111

You can use https://demo.snapshot.org/ for that
You can setup your space like on the main snapshot website, and do test proposals and vote
The content will be not shared between demo and the main site

Reverse Bridge ETH -> EOS

Is your feature request related to a problem? Please describe.
We need users to swap IQ to EOS IQ

Describe the solution you'd like
A page where they can do it

Lock action

Trigger lock action once you can login using Matic chain ID and data is the right one

Locking using Matic chain id

Is your feature request related to a problem? Please describe.
Locking is only possible in the matic chain, so user needs to login using that chainId. Right now it uses always the ethereum on (id: 1)

https://github.com/EveripediaNetwork/iq-bridge-ui/blob/main/src/App.js#L21

Here its hardcoded, it should be that for the bridge part, but allow switch or use a different one for the locking page.

I think there is a way in ethersjs to ask user to switch chain Id, you will need to explore this

Locking information + balances

Is your feature request related to a problem? Please describe.
We need to improve the lock page with information so users can understand the benefits of locking and also see current trends of other users locking IQ

Describe the solution you'd like

  • Add a text in the top of the card similar to:

"The longer you lock your IQ, the more hiIQ you will receive. You can also get additional hiIQ by locking more IQ or extending the lock period. hiIQ decays slowly over your locking period, eventually reaching 1-to-1 with IQ."

That card should show when user fill IQ balance or when user already have balance in hiIQ:
it should show data like:

  • hiIQ balance
  • Time locked

image

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.