SparkNFT / SparkLink

The SparkNFT fontend repository.
3 stars 7 forks source link

The address used in the collection request must be a checksum address with both upper and lower case. #183

Closed Erreth-Akbe closed 2 years ago

Erreth-Akbe commented 2 years ago

What's going wrong?

The address used in the collection request must be a checksum address with both upper and lower case.

How to reproduce?

Sometimes we will get only lower case request at client Dapp, and server will response an empty array.

Expected behavior

The address used in the request here should be strictly the checksum address.

Context

refactor branch.

SantanaSP commented 2 years ago

Could you locate the error code?

Erreth-Akbe commented 2 years ago

https://github.com/SparkNFT/SparkLink/blob/refactor/packages/site/src/routes/Collection.vue#:~:text=owner%3A%20account.value%2C And here: https://github.com/SparkNFT/SparkLink/blob/refactor/packages/site/src/store/provider.ts#:~:text=return%20await%20this.web3.eth.getAccounts().then((v)%20%3D%3E%20v%5B0%5D)%3B But I checked the documentation of web3.js, it said that this place will return a checksum address, but there were a few times when I couldn't see NFT on the collection page, I opened the network and found that the address in the request was all lowercase.

Erreth-Akbe commented 2 years ago

By our carefully reviewing, we confirm this bug does not exist.