Comments (6)
@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.
@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.
ahh that's my tokenTransferProxyContractAddress
from the initial ZeroEx config. Now I get it!
from 0x-monorepo.
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.
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.
Closing for inactivity.
from 0x-monorepo.
Related Issues (20)
- sol-compiler: build fails behind proxy since #1596 HOT 2
- sol-tracing-utils: consider changing the solidity parser HOT 1
- sol-compiler: fails on file with structs only HOT 2
- @0x/utils: Extra space in `provider.send` varies HOT 4
- @0x/contract-wrappers: `marketBuyOrdersFillOrKill` incorrect ABI encoding HOT 2
- [sol-compiler] New release of sol-compiler?
- Buy Contract - Call fails after payment token approval
- @0x/sol-compiler bug: sol-compiler not recognizing pragma experimental 0.5.0 HOT 2
- @0x/staking wrong dependency HOT 2
- sol-compiler does not recognize solc versions after 0.5.12 HOT 1
- Using sol-trace with external, existing contracts as interfaces HOT 3
- command for new package? HOT 2
- Instant revamp bake-off HOT 23
- 0x-contract-wrappers & 0x/abi-gen: TypeError: Cannot instantiate typing.Union HOT 2
- sol-compiler update link for solc binary downloads HOT 2
- Issues with installing project dependencies on MacOS Catalina HOT 3
- asset-swapper: CryptoCom is missing from market operation types HOT 2
- [abi-gen] [base-contract] Crypto algorithms blocking javascript main thread HOT 2
- [sol-compiler] AST is not present in the output when requested HOT 2
- python: getting signature using private key HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 0x-monorepo.