add division-by-zero check for ERC1155 too
This commit is contained in:
parent
149f863951
commit
1dca378e03
@ -100,6 +100,11 @@ contract LibAssetData {
|
|||||||
|
|
||||||
uint256 length = tokenIds.length;
|
uint256 length = tokenIds.length;
|
||||||
for (uint256 i = 0; i != length; i++) {
|
for (uint256 i = 0; i != length; i++) {
|
||||||
|
// Skip over the token if the corresponding value is 0.
|
||||||
|
if (tokenValues[i] == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Encode data for `balanceOf(ownerAddress, tokenIds[i])
|
// Encode data for `balanceOf(ownerAddress, tokenIds[i])
|
||||||
bytes memory balanceOfData = abi.encodeWithSelector(
|
bytes memory balanceOfData = abi.encodeWithSelector(
|
||||||
IERC1155(address(0)).balanceOf.selector,
|
IERC1155(address(0)).balanceOf.selector,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user