mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-21 22:40:00 +00:00
fix(amm): avoid duplicate wallet context refreshes
This commit is contained in:
parent
a66ffddfe4
commit
72bde7af6e
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user