git.delta.rocks / unique-network / refs/commits / 66bb41c0e37c

difftreelog

fix balance underflow error in transfer_fungible

Yaroslav Bolyukin2021-08-26parent: #c46ad55.patch.diff
in: master

1 file changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
2037 balance.value = balance2037 balance.value = balance
2038 .value2038 .value
2039 .checked_sub(value)2039 .checked_sub(value)
2040 .ok_or(Error::<T>::NumOverflow)?;2040 .ok_or(Error::<T>::TokenValueTooLow)?;
20412041
2042 // update balanceOf2042 // update balanceOf
2043 collection.consume_sstore()?;2043 collection.consume_sstore()?;