Skip to content

Commit

Permalink
update text and fix search for btc and ltc on transaction page
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeBoy committed Dec 17, 2023
1 parent 5f7d6aa commit 3f6402d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions libwallet/assets/btc/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func (asset *Asset) GetTransactionsRaw(offset, limit, txFilter int32, newestFirs
return []*sharedW.Transaction{tx}, nil
}
}
return []*sharedW.Transaction{}, nil
}

if offset == 0 && limit == 0 {
Expand Down
1 change: 1 addition & 0 deletions libwallet/assets/ltc/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func (asset *Asset) GetTransactionsRaw(offset, limit, txFilter int32, newestFirs
return []*sharedW.Transaction{tx}, nil
}
}
return []*sharedW.Transaction{}, nil
}

if offset == 0 && limit == 0 {
Expand Down
20 changes: 10 additions & 10 deletions ui/page/transaction/transactions_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func (pg *TransactionsPage) multiWalletTxns(offset, pageSize int32, newestFist b
return allTxs, len(allTxs), nil
}

func (pg *TransactionsPage) loadTransactions(wal sharedW.Asset, offset, pageSize int32, newestFist bool) ([]*multiWalletTx, int, error) {
func (pg *TransactionsPage) loadTransactions(wal sharedW.Asset, offset, pageSize int32, newestFirst bool) ([]*multiWalletTx, int, error) {
mapInfo, _ := components.TxPageDropDownFields(wal.GetAssetType(), pg.selectedTxCategoryTab)
if len(mapInfo) < 1 {
err := fmt.Errorf("unable to resolve asset filters for asset type (%v)", wal.GetAssetType())
Expand All @@ -297,7 +297,8 @@ func (pg *TransactionsPage) loadTransactions(wal sharedW.Asset, offset, pageSize
}
pg.txFilter = txFilter
searchKey := pg.searchEditor.Editor.Text()
walletTxs, err := wal.GetTransactionsRaw(offset, pageSize, txFilter, newestFist, searchKey)
fmt.Println("----------->", searchKey)
walletTxs, err := wal.GetTransactionsRaw(offset, pageSize, txFilter, newestFirst, searchKey)
if err != nil {
err = fmt.Errorf("error loading transactions: %v", err)
}
Expand All @@ -310,13 +311,13 @@ func (pg *TransactionsPage) loadTransactions(wal sharedW.Asset, offset, pageSize
return txs, len(txs), err
}

func settingCommonDropdown(t *cryptomaterial.Theme, drodown *cryptomaterial.DropDown) {
drodown.FontWeight = font.SemiBold
drodown.Hoverable = false
drodown.SelectedItemIconColor = &t.Color.Primary
drodown.ExpandedLayoutInset = layout.Inset{Top: values.MarginPadding35}
drodown.MakeCollapsedLayoutVisibleWhenExpanded = true
drodown.Background = &t.Color.Gray4
func settingCommonDropdown(t *cryptomaterial.Theme, dropdown *cryptomaterial.DropDown) {
dropdown.FontWeight = font.SemiBold
dropdown.Hoverable = false
dropdown.SelectedItemIconColor = &t.Color.Primary
dropdown.ExpandedLayoutInset = layout.Inset{Top: values.MarginPadding35}
dropdown.MakeCollapsedLayoutVisibleWhenExpanded = true
dropdown.Background = &t.Color.Gray4
}

// Layout draws the page UI components into the provided layout context
Expand Down Expand Up @@ -604,7 +605,6 @@ func (pg *TransactionsPage) HandleUserInteractions() {
}

for pg.filterBtn.Clicked() {
fmt.Println("------filterBtn----->", pg.isFilterOpen)
pg.isFilterOpen = !pg.isFilterOpen
}

Expand Down
2 changes: 1 addition & 1 deletion ui/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func CreateWindow(mw *libwallet.AssetsManager, version string, buildDate time.Ti
// appSize overwrites gioui's default app size of 'Size(800, 600)'
appSize := giouiApp.Size(values.AppWidth, values.AppHeight)
// appMinSize is the minimum size the app.
appMinSize := giouiApp.MinSize(values.AppWidth, values.AppHeight)
appMinSize := giouiApp.MinSize(values.MobileAppWidth, values.MobileAppHeight)
// Display network on the app title if its not on mainnet.
if net := mw.NetType(); net != libutils.Mainnet {
appTitle = giouiApp.Title(values.StringF(values.StrAppTitle, net.Display()))
Expand Down

0 comments on commit 3f6402d

Please sign in to comment.