1
0
forked from BRT/arc
arc/android/dushanbe/GetLastTransactionsScript.h
slava 33c8420910 Refine transaction parsing and handling logic:
- Add fast path for avoiding unnecessary app restarts if already on the home or PIN screen.
- Improve PIN code and home screen detection with fallback mechanisms.
- Implement URL and error sanitization for network messages to hide sensitive data from logs.
- Add embedded transaction parsing from content description with adjusted tap positioning logic.
- Refactor transaction fetching to use direct signal-based parsed data instead of database queries.
2026-04-11 16:37:14 +07:00

42 lines
1.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include "CommonScript.h"
#include <QDateTime>
#include <QJsonObject>
#include "db/DeviceInfo.h"
#include "db/BankProfileInfo.h"
namespace Dushanbe {
class GetLastTransactionsScript final : public CommonScript {
Q_OBJECT
public:
explicit GetLastTransactionsScript(
QString deviceId,
QString appCode,
double searchAmount = 0,
QDateTime searchTime = {},
QObject *parent = nullptr
);
~GetLastTransactionsScript() override;
signals:
// Испускается, когда транзакция найдена и распарсена с экрана деталей.
// EventHandler использует эти данные напрямую для task_result вместо
// повторного чтения из БД.
void transactionParsed(const QJsonObject &tx);
protected:
void doStart() override;
private:
QString m_deviceId;
const QString m_appCode;
const double m_searchAmount; // сумма в сомони (0 = все последние)
const QDateTime m_searchTime; // примерное время (UTC)
QString m_error;
};
} // namespace Dushanbe