Giter Site home page Giter Site logo

agave-frontend's People

Contributors

affinity-design avatar anisoptera avatar befitsandpiper avatar buzzlightyearbee avatar famole avatar gardere avatar luigy-lemon avatar nolanfu avatar onbjerg avatar saltorioussig avatar sunguru98 avatar thefredo1000 avatar zedkai avatar

Stargazers

 avatar  avatar  avatar

Forkers

lpx55

agave-frontend's Issues

On Main Deposit Page wxDai balance is shown instead of xDai

On the main deposit page under balances, what I see next to my xDai balance is actually the wxDai in my wallet that I wrapped a few days ago. It shows the wxDai balance correctly as follows.
image

Also, on reserve overview page, the same issue above repeats as it can be seen on the left side of the following screen:
image

However, after clicking xDai on that main deposit screen, I see the amount of xDai and not wxDai balance, which I assume is how it should have shown on the first screen as well.
image

Relevant Forum Link: https://forum.1hive.org/t/feedback-on-agave-platform/4297/6

It should be showing xDai on the main deposit page as well is what I guess.

Get balance res undefined

Path: src/utils/contracts/getBalance.js

Sometimes res is undefined and it crashes the whole app

return new Promise((resolve, reject) => {
            contractInstance.methods.balanceOf(address).call({ from: address }, (err, res) => {
                if (err) reject(err);
                let balance = parseInt(web3.utils.fromWei(res, 'ether')).toFixed(4);
                resolve(balance)
            });
        })

Add a check for this undefined? Maybe a try catch?

return new Promise((resolve, reject) => { 
            contractInstance.methods.balanceOf(address).call({ from: address }, (err, res) => {
                if (err) reject(err);
                if(!res === undefined) {
                    let balance = parseInt(web3.utils.fromWei(res, 'ether')).toFixed(4);
                    resolve(balance)
                }
            });
        })

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.