diff --git a/libwallet/assets_manager.go b/libwallet/assets_manager.go index e31497b57..edcffebaf 100644 --- a/libwallet/assets_manager.go +++ b/libwallet/assets_manager.go @@ -33,7 +33,7 @@ import ( // TODO: This is the main app's log filename, should probably be defined // elsewhere. const LogFilename = "cryptopower.log" -const assetId = "assets_manager" +const assetID = "assets_manager" // Assets is a struct that holds all the assets supported by the wallet. type Assets struct { @@ -965,15 +965,15 @@ func (mgr *AssetsManager) DeleteDEXData() error { func (mgr *AssetsManager) ListenAssetChange(listen func()) { // Reload wallets unmixed balance and reload UI on new blocks. txAndBlockNotificationListener := &sharedW.TxAndBlockNotificationListener{ - OnTransactionConfirmed: func(walletID int, hash string, blockHeight int32) { + OnTransactionConfirmed: func(_ int, _ string, _ int32) { listen() }, - OnTransaction: func(walletID int, transaction *sharedW.Transaction) { + OnTransaction: func(_ int, _ *sharedW.Transaction) { listen() }, } for _, wallet := range mgr.AllWallets() { - if err := wallet.AddTxAndBlockNotificationListener(txAndBlockNotificationListener, assetId); err != nil { + if err := wallet.AddTxAndBlockNotificationListener(txAndBlockNotificationListener, assetID); err != nil { log.Errorf("Can't listen tx and block notification for %s wallet", wallet.GetWalletName()) } } @@ -981,6 +981,6 @@ func (mgr *AssetsManager) ListenAssetChange(listen func()) { func (mgr *AssetsManager) RemoveAssetChange() { for _, wallet := range mgr.AllWallets() { - wallet.RemoveTxAndBlockNotificationListener(assetId) + wallet.RemoveTxAndBlockNotificationListener(assetID) } } diff --git a/ui/page/root/overview_page.go b/ui/page/root/overview_page.go index f04b2076b..3c7d3291a 100644 --- a/ui/page/root/overview_page.go +++ b/ui/page/root/overview_page.go @@ -1185,10 +1185,6 @@ func (pg *OverviewPage) listenForMixerNotifications() { pg.reloadBalances() pg.ParentWindow().Reload() }, - OnTransactionConfirmed: func(walletID int, hash string, blockHeight int32) { - }, - OnTransaction: func(walletID int, transaction *sharedW.Transaction) { - }, } wallets := pg.AssetsManager.AllWallets() diff --git a/ui/page/root/wallet_selector_page.go b/ui/page/root/wallet_selector_page.go index f34685895..c9efedd1e 100644 --- a/ui/page/root/wallet_selector_page.go +++ b/ui/page/root/wallet_selector_page.go @@ -268,7 +268,7 @@ func (pg *WalletSelectorPage) pageContentLayout(gtx C) D { Height: cryptomaterial.MatchParent, Padding: components.HorizontalInset(values.MarginPaddingTransform(pg.IsMobileView(), values.MarginPadding16)), }.Layout2(gtx, func(gtx C) D { - return pg.Theme.List(pg.scrollContainer).Layout(gtx, 1, func(gtx C, i int) D { + return pg.Theme.List(pg.scrollContainer).Layout(gtx, 1, func(gtx C, _ int) D { return assetDropdown(gtx) }) })