Skip to content

Commit

Permalink
1.9.37
Browse files Browse the repository at this point in the history
  • Loading branch information
tongvanlinh committed Aug 15, 2024
1 parent 3379e81 commit 5ea944c
Show file tree
Hide file tree
Showing 85 changed files with 3,332 additions and 1,110 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required( VERSION 3.1 )
#set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "Minimum OS X deployment version")
if(UNIX AND APPLE)
project(Nunchuk VERSION 1.9.36)
project(Nunchuk VERSION 1.9.37)
else()
project(nunchuk-qt VERSION 1.9.36)
project(nunchuk-qt VERSION 1.9.37)
endif()

set( CMAKE_CXX_STANDARD 20 )
Expand Down Expand Up @@ -176,6 +176,7 @@ set(Views_SRCS
Views/STATE_ID_SCR_REPLACE_SELECT_KEY.cpp
Views/STATE_ID_SCR_REPLACE_KEYS.cpp
Views/STATE_ID_SCR_SIGN_IN_VIA_XPUB.cpp
Views/STATE_ID_SCR_EDIT_MEMBERS.cpp
)

set(Views_MOCS
Expand Down
Binary file removed Images/create-hot-wallet.png
Binary file not shown.
36 changes: 0 additions & 36 deletions Images/create-hot-wallet.svg

This file was deleted.

10 changes: 10 additions & 0 deletions Images/groups-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Images/health-check-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Images/person-add-24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 25 additions & 9 deletions Models/AppModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,11 @@ void AppModel::setSoftwareSignerDeviceList(const QDeviceListModelPtr &value)
emit softwareSignerDeviceListChanged();
}

qint64 AppModel::hourFeeOrigin() const
{
return hourFee_;
}

QString AppModel::hourFeeCurrency() const
{
double fee = (double)hourFee_/1000;
Expand All @@ -498,6 +503,11 @@ void AppModel::setHourFee(qint64 fee)
}
}

qint64 AppModel::minFeeOrigin() const
{
return minFee_;
}

QString AppModel::minFeeCurrency() const
{
double btcRate = btcRates()/100000000;
Expand Down Expand Up @@ -532,6 +542,11 @@ void AppModel::resetSignersChecked()
}
}

qint64 AppModel::halfHourFeeOrigin() const
{
return halfHourFee_;
}

QString AppModel::halfHourFeeCurrency() const
{
double btcRate = btcRates()/100000000;
Expand All @@ -556,6 +571,11 @@ void AppModel::setHalfHourFee(qint64 fee)
}
}

qint64 AppModel::fastestFeeOrigin() const
{
return fastestFee_;
}

QString AppModel::fastestFeeCurrency() const
{
double btcRate = btcRates()/100000000;
Expand Down Expand Up @@ -699,12 +719,8 @@ void AppModel::requestCreateUserWallets()
WalletsMng->GetListWallet(USER_WALLET);
WalletsMng->GetListWallet(GROUP_WALLET);
AppModel::instance()->startReloadUserDb();
static bool needCheckOnboarding = true;
if(needCheckOnboarding){
needCheckOnboarding = false;
AppModel::instance()->requestOnboarding();
}
});
AppModel::instance()->requestOnboarding();
}

void AppModel::requestSyncSharedWallets()
Expand Down Expand Up @@ -765,11 +781,10 @@ void AppModel::requestClearData()

void AppModel::requestOnboarding()
{
timeoutHandler(1000,[=]{
if (CLIENT_INSTANCE->isSubscribed() || !QGroupWallets::instance()->existGroupPending()) {
timeoutHandler(1000,[=, this]{
if (CLIENT_INSTANCE->isSubscribed() || QGroupWallets::instance()->existGroupPending() || AppModel::instance()->walletListPtr()->existGroupWallet()) {
AppSetting::instance()->setIsFirstTimeOnboarding(true);
}
else {
} else {
DBG_INFO << "Checking Onboarding " << AppSetting::instance()->isFirstTimeOnboarding();
if (!AppSetting::instance()->isFirstTimeOnboarding()) {
OnBoardingModel::instance()->setState("onboarding");
Expand Down Expand Up @@ -991,6 +1006,7 @@ void AppModel::setWalletInfo(const QWalletPtr &d, bool force)
<< "Wallet Role:" << walletInfo_.data()->myRole()
<< "Wallet Slug:" << walletInfo_.data()->slug()
<< "Wallet Status:" << walletInfo_.data()->status();
QGroupWallets::instance()->setDashboardInfo(walletInfo_);
}
}

Expand Down
4 changes: 4 additions & 0 deletions Models/AppModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,22 @@ class AppModel final : public Controller,
QString getTxidReplacing() const;
void setTxidReplacing(const QString &txidReplacing);

qint64 fastestFeeOrigin() const;
QString fastestFeeCurrency() const;
QString fastestFee() const;
void setFastestFee(qint64 fee);

qint64 halfHourFeeOrigin() const;
QString halfHourFeeCurrency() const;
QString halfHourFee() const;
void setHalfHourFee(qint64 fee);

qint64 hourFeeOrigin() const;
QString hourFeeCurrency() const;
QString hourFee() const;
void setHourFee(qint64 fee);

qint64 minFeeOrigin() const;
QString minFeeCurrency() const;
QString minFee() const;
void setMinFee(qint64 fee);
Expand Down
7 changes: 6 additions & 1 deletion Models/Chats/QNunchukRoomModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1871,15 +1871,18 @@ void QNunchukRoom::nunchukNoticeEvent(const RoomEvent &evt)
msgtype.contains("io.nunchuk.custom.key_name_changed", Qt::CaseInsensitive) ||
msgtype.contains("io.nunchuk.custom.key_updated", Qt::CaseInsensitive))
{
if (dashboard) {
dashboard->GetAlertsInfo();
}
AppModel::instance()->requestCreateUserWallets();
}
else if(msgtype.contains("io.nunchuk.custom.transaction", Qt::CaseInsensitive))
{
QJsonObject content = evt.fullJson()["content"].toObject();
DBG_INFO << content;
QString wallet_id = content["wallet_local_id"].toString();
if (wallet_id != "") {
if(msgtype.contains("io.nunchuk.custom.transaction_canceled") || msgtype.contains("io.nunchuk.custom.transaction_batch_created")){
DBG_INFO << content;
AppModel::instance()->startSyncWalletDb(wallet_id);
}
else {
Expand All @@ -1897,6 +1900,7 @@ void QNunchukRoom::nunchukNoticeEvent(const RoomEvent &evt)
if(!data.isEmpty()){
trans->setServerKeyMessage(data);
}
DBG_INFO << trans.data()->memo();
wallet.data()->transactionHistory()->updateTransaction(trans->txid(), trans);
if(AppModel::instance()->transactionInfo()){
QString current_tx_wallet_id = AppModel::instance()->transactionInfo()->walletId();
Expand Down Expand Up @@ -2003,6 +2007,7 @@ void QNunchukRoom::nunchukNoticeEvent(const RoomEvent &evt)
dashboard->GetWalletInfo();
if(dashboard->isReplaced()){
dashboard->setShowDashBoard(false);
AppModel::instance()->requestCreateUserWallets();
}
if (auto walletList = AppModel::instance()->walletListPtr()) {
walletList->refresh();
Expand Down
Loading

0 comments on commit 5ea944c

Please sign in to comment.