-function startTransaction(): void {
- uiClient.startTransaction(props.hashId, props.connectorId, props.idTag)
-}
-function stopTransaction(): void {
- uiClient.stopTransaction(props.hashId, props.transactionId)
+const $toast = useToast()
+
+const stopTransaction = (): void => {
+ uiClient
+ .stopTransaction(props.hashId, props.connector.transactionId)
+ .then(() => {
+ $toast.success('Transaction successfully stopped')
+ })
+ .catch((error: Error) => {
+ $toast.error('Error at stopping transaction')
+ console.error('Error at stopping transaction:', error)
+ })