Skip to content

Commit 0f04467

Browse files
UI: Split metadex balance and order updates
1 parent a02bb8e commit 0f04467

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/qt/metadexdialog.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void MetaDExDialog::setClientModel(ClientModel *model)
107107
this->clientModel = model;
108108
if (NULL != model) {
109109
connect(model, SIGNAL(refreshOmniState()), this, SLOT(OrderRefresh()));
110-
connect(model, SIGNAL(refreshOmniBalance()), this, SLOT(OrderRefresh()));
110+
connect(model, SIGNAL(refreshOmniBalance()), this, SLOT(UpdateBalances()));
111111
}
112112
}
113113

@@ -273,6 +273,13 @@ void MetaDExDialog::AddRow(bool useBuyList, bool includesMe, const string& price
273273
}
274274
}
275275

276+
void MetaDExDialog::UpdateBalances()
277+
{
278+
// update the balances for the buy and sell addreses
279+
UpdateBuyAddressBalance();
280+
UpdateSellAddressBalance();
281+
}
282+
276283
// This function loops through the MetaDEx and updates the list of buy/sell offers
277284
void MetaDExDialog::UpdateOffers()
278285
{
@@ -313,9 +320,6 @@ void MetaDExDialog::UpdateOffers()
313320
}
314321
}
315322
}
316-
// update the balances for the buy and sell addreses
317-
UpdateBuyAddressBalance();
318-
UpdateSellAddressBalance();
319323
}
320324

321325
// This function updates the balance for the currently selected sell address

src/qt/metadexdialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public slots:
5151
void buyClicked(int row, int col);
5252
void sendTrade(bool sell);
5353
void OrderRefresh();
54+
void UpdateBalances();
5455

5556
private:
5657
Ui::MetaDExDialog *ui;

0 commit comments

Comments
 (0)