Skip to content

Commit

Permalink
fix to empty on mixed transaction detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeBoy committed Mar 16, 2024
1 parent 6203f07 commit ceab23d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions ui/page/transaction/transaction_details_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,27 @@ destinationAddrLoop:
var mixedAcc int32 = -1
txDestinationAddress := ""
if libutils.DCRWalletAsset == pg.wallet.GetAssetType() {
mixedAcc = pg.wallet.(*dcr.Asset).UnmixedAccountNumber()
mixedAcc = pg.wallet.(*dcr.Asset).MixedAccountNumber()
}
if pg.transaction.Type == txhelper.TxTypeMixed {
if output.AccountNumber == -1 {
txDestinationAddress = output.Address
}
if output.AccountNumber == mixedAcc {
accountName, err := pg.wallet.AccountName(output.AccountNumber)
if err != nil {
log.Error(err)
} else {
txDestinationAddress = accountName
}
}
if txDestinationAddress != "" {
pg.destAddressClickables = append(pg.destAddressClickables, pg.Theme.NewClickable(true))
pg.txDestinationAddresses = append(pg.txDestinationAddresses, txDestinationAddress)
break destinationAddrLoop
} else {

Check warning on line 179 in ui/page/transaction/transaction_details_page.go

View workflow job for this annotation

GitHub Actions / Build

superfluous-else: if block ends with a break statement, so drop this else and outdent its block (revive)
if output.AccountNumber == -1 {
txDestinationAddress = output.Address
}
continue
}
pg.destAddressClickables = append(pg.destAddressClickables, pg.Theme.NewClickable(true))
pg.txDestinationAddresses = append(pg.txDestinationAddresses, txDestinationAddress)
break destinationAddrLoop
}

if output.AccountNumber == -1 {
Expand Down Expand Up @@ -204,7 +207,6 @@ destinationAddrLoop:
} else {
pg.txDestinationAccount = accountName
}

break destinationAddrLoop
}
}
Expand Down

0 comments on commit ceab23d

Please sign in to comment.