Skip to content

Commit

Permalink
fix: cover NotParticipating state
Browse files Browse the repository at this point in the history
  • Loading branch information
HashMapsData2Value committed Oct 24, 2024
1 parent da85ff4 commit 0c5311c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ui/pages/transaction/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,19 @@ func (m ViewModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {

func (m *ViewModel) UpdateTxnURLAndQRCode() error {

isOnline := false
if m.State.Accounts[m.Data.Address].Status == "Online" {
accountStatus := m.State.Accounts[m.Data.Address].Status

var isOnline bool

switch accountStatus {
case "Offline":
isOnline = false
case "Online":
isOnline = true
case "NotParticipating": // This status means the account can never participate in consensus
m.urlTxn = ""
m.asciiQR = ""
return nil
}

// Construct Transaction
Expand Down

0 comments on commit 0c5311c

Please sign in to comment.