GithubHelp home page GithubHelp logo

Comments (5)

einsteinx2 avatar einsteinx2 commented on June 13, 2024

So we do some basic format checking already (though without feedback). I check if it starts with either 0x and is exactly 42 characters long or starts with ENS and is at least 4 characters long. Will need to discuss what options we have for better validation and how you want to present it to the user. For now I'll hold off on this.

from old-balance-ios.

wolffan avatar wolffan commented on June 13, 2024

Make a request and check if that address has tokens? spinner while network request is performed and not enable button until comes back (bonus point if we pre-save that info so user don't need to wait again)

from old-balance-ios.

einsteinx2 avatar einsteinx2 commented on June 13, 2024

yeah exactly what I was thinking (I meant to paste in my commend from Discord). We need to load the data anyway so we could load it first.

from old-balance-ios.

einsteinx2 avatar einsteinx2 commented on June 13, 2024

My discord comment:

From what I found searching it seems like we only have three options:

  1. use a simple regex to verify it is a possible address, but not necessarily an actual address

  2. use the upper/lowercase format for addresses that includes essentially a built in checksum (but that's not great because many addresses aren't formatted that way)

  3. use an API to see if the eth wallet exists on the network (ok for our use case since we aren't sending eth so wallets will always be pre-existing, but not sure if we want to rely on another 3rd party API, though maybe we could use the existing ethporer or other eth api we get the wallet details for that, i.e. if the api returns the wallet has nothing, don't add it or something)

I'm thinking 3 is the way to go as @wolffan suggested.

from old-balance-ios.

einsteinx2 avatar einsteinx2 commented on June 13, 2024

For now, handled by #61

from old-balance-ios.

Related Issues (20)

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.