fix(amm): avoid duplicate wallet context refreshes

This commit is contained in:
Ricardo Guilherme Schmidt 2026-07-17 19:55:38 -03:00
parent a66ffddfe4
commit 72bde7af6e
No known key found for this signature in database
GPG Key ID: 1396EA17DE132FFE

View File

@ -85,7 +85,6 @@ AmmUiBackend::AmmUiBackend(LogosAPI* logosAPI, QObject* parent)
connect(m_walletController.get(), &WalletController::stateChanged,
this, &AmmUiBackend::syncWalletState);
syncWalletState();
refreshNewPositionContext({});
m_walletController->start();
}
@ -98,31 +97,22 @@ WalletAccountModel* AmmUiBackend::accountModel() const
QString AmmUiBackend::createNewDefault(QString password)
{
const QString mnemonic = m_walletController->createDefaultWallet(password);
syncWalletState();
return mnemonic;
return m_walletController->createDefaultWallet(password);
}
QString AmmUiBackend::createNew(QString configPath, QString storagePath, QString password)
{
const QString mnemonic =
m_walletController->createWallet(configPath, storagePath, password);
syncWalletState();
return mnemonic;
return m_walletController->createWallet(configPath, storagePath, password);
}
bool AmmUiBackend::openExisting()
{
const bool opened = m_walletController->open();
syncWalletState();
return opened;
return m_walletController->open();
}
void AmmUiBackend::disconnectWallet()
{
m_walletController->disconnect();
m_newPosition->clearWalletAccounts();
refreshNewPositionContext(QVariantMap());
}
QString AmmUiBackend::createAccountPublic()