1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- import { EventTags } from '../../modules/event_processor ' ;
16+ import { EventTags } from '../../shared_types ' ;
1717import { LoggerFacade } from '../../modules/logging' ;
18-
1918import {
2019 LOG_LEVEL ,
2120 LOG_MESSAGES ,
@@ -42,7 +41,7 @@ export function getRevenueValue(eventTags: EventTags, logger: LoggerFacade): num
4241 return null ;
4342 }
4443
45- const parsedRevenueValue = typeof rawValue === 'string' ? parseInt ( rawValue ) : rawValue ;
44+ const parsedRevenueValue = typeof rawValue === 'string' ? parseInt ( rawValue ) : Math . trunc ( rawValue ) ;
4645
4746 if ( isFinite ( parsedRevenueValue ) ) {
4847 logger . log ( LOG_LEVEL . INFO , LOG_MESSAGES . PARSED_REVENUE_VALUE , MODULE_NAME , parsedRevenueValue ) ;
@@ -66,7 +65,7 @@ export function getEventValue(eventTags: EventTags, logger: LoggerFacade): numbe
6665 return null ;
6766 }
6867
69- const parsedEventValue = typeof rawValue === 'string' ? parseFloat ( rawValue ) : rawValue ;
68+ const parsedEventValue = typeof rawValue === 'string' ? parseFloat ( rawValue ) : rawValue ;
7069
7170 if ( isFinite ( parsedEventValue ) ) {
7271 logger . log ( LOG_LEVEL . INFO , LOG_MESSAGES . PARSED_NUMERIC_VALUE , MODULE_NAME , parsedEventValue ) ;
@@ -75,4 +74,4 @@ export function getEventValue(eventTags: EventTags, logger: LoggerFacade): numbe
7574 logger . log ( LOG_LEVEL . INFO , LOG_MESSAGES . FAILED_TO_PARSE_VALUE , MODULE_NAME , rawValue ) ;
7675 return null ;
7776 }
78- }
77+ }
0 commit comments