In the InstallationFacet contract, the reduceCraftTime and reduceUpgradeTime function are compared the input data _amount with the blockLeft and burn the glmr tokens through the burnFrom function with two different situations. But in both cases are subtract the input _amount at last.
Description
In the InstallationFacet contract, the reduceCraftTime and reduceUpgradeTime function are compared the input data _amount with the blockLeft and burn the glmr tokens through the burnFrom function with two different situations. But in both cases are subtract the input _amount at last.
https://github.com/aavegotchi/aavegotchi-realm-diamond/blob/cee38d37307c49dc41cdb737a962d5d313c1cd4f/contracts/InstallationDiamond/facets/InstallationFacet.sol#L245
https://github.com/aavegotchi/aavegotchi-realm-diamond/blob/cee38d37307c49dc41cdb737a962d5d313c1cd4f/contracts/InstallationDiamond/facets/InstallationFacet.sol#L395
Solution
It is recommended to separate the two cases to burn different tokens in the corresponding cases.