mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-17 12:29:27 +00:00
Implement one create-pool and add-liquidity workflow. Add searchable token resolution, direct opening-price and deposit editing, optimistic pool activation, and base58 transaction IDs. Isolate network, wallet, AMM client, and runtime boundaries. Stabilize quote, submission, refresh, and pool-probe state while consolidating liquidity tests and removing obsolete liquidity paths.
37 lines
863 B
C++
37 lines
863 B
C++
#pragma once
|
|
|
|
#include <QString>
|
|
#include <QStringList>
|
|
|
|
struct ActiveNetworkSnapshot {
|
|
QString id;
|
|
QString status;
|
|
QString fingerprint;
|
|
QString ammProgramId;
|
|
QStringList tokenIds;
|
|
};
|
|
|
|
class ActiveNetwork final {
|
|
public:
|
|
bool load();
|
|
|
|
const QString& status() const { return m_network.status; }
|
|
bool isConfigured() const;
|
|
bool isDevnet() const;
|
|
bool needsIdentityProbe() const;
|
|
ActiveNetworkSnapshot snapshot() const { return m_network; }
|
|
|
|
void sequencerChanged(bool available);
|
|
void reachabilityChanged(bool reachable, bool wasReachable);
|
|
void beginIdentityProbe();
|
|
void finishIdentityProbe(const QString& identity);
|
|
|
|
static bool isValidIdentity(const QString& value);
|
|
|
|
private:
|
|
void clearIdentity(const QString& status);
|
|
|
|
ActiveNetworkSnapshot m_network;
|
|
QString m_expectedIdentity;
|
|
};
|