GithubHelp home page GithubHelp logo

Error: Checksummed addresses are not supported. Convert spenderAddress to lower case before passing when I call zeroEx.token.setProxyAllowanceAsync about 0x-monorepo HOT 6 CLOSED

capaj avatar capaj commented on June 22, 2024
Error: Checksummed addresses are not supported. Convert spenderAddress to lower case before passing when I call zeroEx.token.setProxyAllowanceAsync

from 0x-monorepo.

Comments (6)

fabioberger avatar fabioberger commented on June 22, 2024

@capaj The only possible check that is failing here is value.toLowerCase() === value. Can you please try again with the following:

const txHash = await zeroEx.token.setProxyAllowanceAsync(
      this.address.toLowerCase(),
      walletStore.availableAddresses[0].toLowerCase(),
      ZeroEx.toBaseUnitAmount(amount, 18)
    )

If this doesn't work, can you please print out the values for this.address and walletStore.availableAddresses[0] that you are passing.

from 0x-monorepo.

capaj avatar capaj commented on June 22, 2024

@fabioberger wehn I log those lines:

async setProxyAllowance(amount: BigNumber) {
    console.log('this.address.toLowerCase(): ', this.address.toLowerCase());
    console.log(' walletStore.availableAddresses[0].toLowerCase(): ',  walletStore.availableAddresses[0].toLowerCase());
    const txHash = await zeroEx.token.setProxyAllowanceAsync(
      this.address.toLowerCase(),
      walletStore.availableAddresses[0].toLowerCase(),
      ZeroEx.toBaseUnitAmount(amount, 18)
    )
    this.allowance = null

    await zeroEx.awaitTransactionMinedAsync(txHash)
    await this.getAllowance()
  }

I get:

this.address.toLowerCase():  0xef7fff64389b814a946f3e92105513705ca6b990
WalletToken.ts?b0aa:106  walletStore.availableAddresses[0].toLowerCase():  0x1b89831830f9d52efb92caff73283ac960b1f45f

from 0x-monorepo.

capaj avatar capaj commented on June 22, 2024

ahh that's my tokenTransferProxyContractAddress from the initial ZeroEx config. Now I get it!

from 0x-monorepo.

capaj avatar capaj commented on June 22, 2024

I tried to lowercase it in my config, but if I do that, I can't even fetch my tokens with getTokensAsync. It returns undefined.
So it would seems this needs to get fixed in here right?

from 0x-monorepo.

fabioberger avatar fabioberger commented on June 22, 2024

Hm, zeroEx.tokenRegistry.getTokensAsync retrieves the tokens in the TokenRegistry smart contract. Sounds like an unrelated issue to me. What network are you running your code against? If TestRPC, are you migrating over the smart contract or running it from a snapshot?

from 0x-monorepo.

fabioberger avatar fabioberger commented on June 22, 2024

Closing for inactivity.

from 0x-monorepo.

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.