@@ -7,9 +7,13 @@ import StatusQ
77import StatusQ.Controls
88import StatusQ.Core
99import StatusQ.Core.Theme
10+ import StatusQ.Core.Utils as SQUtils
11+
12+ import SortFilterProxyModel
1013
1114import shared.controls
1215import shared.views
16+ import shared.stores as SharedStores
1317import utils
1418
1519import AppLayouts.Browser.stores as BrowserStores
@@ -30,7 +34,7 @@ Dialog {
3034
3135 closePolicy: Popup .CloseOnEscape | Popup .CloseOnPressOutside
3236 parent: Overlay .overlay
33- width: 360
37+ width: 720
3438 height: 480
3539 background: Rectangle {
3640 id: bgPopup
@@ -118,13 +122,24 @@ Dialog {
118122 target: root .browserWalletStore .dappBrowserAccount
119123 function onConnectedAccountDeleted () {
120124 root .reload ()
121- // This is done because when an account is deleted and the account is updated to default one,
122- // only the properties are updated and we need to listen to those events and update the selected account
125+ // Reset to default account when connected account is deleted
123126 accountSelectorRow .currentAddress = " "
124127 accountSelector .selectedAddress = Qt .binding (function () {return root .browserWalletStore .dappBrowserAccount .address })
125128 }
126129 }
127130
131+ Connections {
132+ target: browserActivityStore .transactionActivityStatus
133+ enabled: root .visible
134+ function onIsFilterDirtyChanged () {
135+ root .browserWalletStore .updateTransactionFilterIfDirty ()
136+ }
137+ function onFilterChainsChanged () {
138+ browserActivityStore .currentActivityFiltersStore .updateCollectiblesModel ()
139+ browserActivityStore .currentActivityFiltersStore .updateRecipientsModel ()
140+ }
141+ }
142+
128143 Item {
129144 property string currentAddress: " "
130145 id: accountSelectorRow
@@ -142,7 +157,6 @@ Dialog {
142157 selectedAddress: root .browserWalletStore .dappBrowserAccount .address
143158 onCurrentAccountAddressChanged: {
144159 if (! accountSelectorRow .currentAddress ) {
145- // We just set the account for the first time. Nothing to do here
146160 accountSelectorRow .currentAddress = currentAccountAddress
147161 return
148162 }
@@ -153,6 +167,12 @@ Dialog {
153167 accountSelectorRow .currentAddress = currentAccountAddress
154168 root .browserWalletStore .switchAccountByAddress (currentAccountAddress)
155169 root .accountChanged (currentAccountAddress)
170+
171+ browserActivityStore .activityController .setFilterAddressesJson (
172+ JSON .stringify ([currentAccountAddress])
173+ )
174+ browserActivityStore .activityController .newFilterSession ()
175+
156176 reload ()
157177 }
158178 }
@@ -182,18 +202,38 @@ Dialog {
182202 }
183203 }
184204
185- Item {
205+ BrowserStores .BrowserActivityStore {
206+ id: browserActivityStore
207+ browserWalletStore: root .browserWalletStore
208+ }
209+
210+ HistoryView {
186211 id: walletInfoContent
187212 width: parent .width
188213 anchors .top : accountSelectorRow .bottom
189214 anchors .topMargin : Theme .bigPadding
190215 anchors .bottom : parent .bottom
191216
192- // TODO: Add Assets and History tabs when ready
193- StatusBaseText {
194- anchors .centerIn : parent
195- text: qsTr (" Wallet info will appear here" )
196- color: Theme .palette .baseColor1
217+ activityStore: browserActivityStore
218+ overview: root .browserWalletStore .dappBrowserAccount
219+ communitiesStore: null
220+ currencyStore: SharedStores .CurrenciesStore {}
221+ networksStore: SharedStores .NetworksStore {}
222+ showAllAccounts: false
223+ displayValues: true
224+ filterVisible: false
225+ disableShadowOnScroll: true
226+ hideVerticalScrollbar: false
227+
228+ Component .onCompleted : {
229+ const activeChainIds = SQUtils .ModelUtils .modelToFlatArray (networksStore .activeNetworks , " chainId" )
230+ if (activeChainIds .length > 0 ) {
231+ browserActivityStore .activityController .setFilterChainsJson (JSON .stringify (activeChainIds), true )
232+ }
233+
234+ const currentAddress = root .browserWalletStore .dappBrowserAccount .address
235+ browserActivityStore .activityController .setFilterAddressesJson (JSON .stringify ([currentAddress]))
236+ browserActivityStore .activityController .newFilterSession ()
197237 }
198238 }
199239 onClosed: {
0 commit comments