Skip to content

Commit

Permalink
fix: remove navigation into txn from account
Browse files Browse the repository at this point in the history
  • Loading branch information
HashMapsData2Value committed Oct 24, 2024
1 parent b97e143 commit 2b5e57b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ui/pages/accounts/model.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package accounts

import (
"sort"
"strconv"

"github.com/algorandfoundation/hack-tui/internal"
"github.com/algorandfoundation/hack-tui/ui/controls"
"github.com/algorandfoundation/hack-tui/ui/pages"
"github.com/charmbracelet/bubbles/table"
"github.com/charmbracelet/lipgloss"
"sort"
"strconv"
)

type ViewModel struct {
Expand All @@ -24,7 +25,7 @@ func New(state *internal.StateModel) ViewModel {
Width: 0,
Height: 0,
Data: state.Accounts,
controls: controls.New(" (g)enerate | " + green.Render("(a)ccounts") + " | (k)eys | (t)xn "),
controls: controls.New(" (g)enerate | " + green.Render("(a)ccounts") + " | (k)eys "),
}

m.table = table.New(
Expand Down
3 changes: 3 additions & 0 deletions ui/viewport.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ func (m ViewportViewModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.page = KeysPage
return m, accounts.EmitAccountSelected(m.accountsPage.SelectedAccount())
case "t":
if m.page == AccountsPage {
return m, nil
}
m.page = TransactionPage
// If there isn't a key already, select the first record
if m.keysPage.SelectedKey() == nil && m.Data != nil {
Expand Down

0 comments on commit 2b5e57b

Please sign in to comment.