Skip to content

Commit

Permalink
fix(wallet): fix signing of Solana transactions with Ledger (uplift t…
Browse files Browse the repository at this point in the history
…o 1.62.x) (#21902)

* Uplift of #21894 (squashed) to release

* Fix broken build

---------

Co-authored-by: Anirudha Bose <anirudha.bose@alumni.cern>
  • Loading branch information
brave-builds and onyb authored Feb 6, 2024
1 parent 9afaacd commit dcb6045
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions components/brave_wallet_ui/panel/container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ function Container() {
PanelSelectors.signMessageErrorData
)

const signTransactionRequests = useUnsafePanelSelector(
PanelSelectors.signTransactionRequests
)
const signAllTransactionsRequests = useUnsafePanelSelector(
PanelSelectors.signAllTransactionsRequests
)

// queries & mutations
const { accounts } = useAccountsQuery()
const { data: selectedAccount } = useSelectedAccountQuery()
Expand Down Expand Up @@ -188,7 +195,10 @@ function Container() {

if (
selectedAccount &&
(selectedPendingTransaction || signMessageData.length) &&
(selectedPendingTransaction ||
signMessageData.length ||
signAllTransactionsRequests.length ||
signTransactionRequests.length) &&
selectedPanel === 'connectHardwareWallet'
) {
return (
Expand Down Expand Up @@ -289,8 +299,10 @@ function Container() {
}

if (
selectedPanel === 'signTransaction' ||
selectedPanel === 'signAllTransactions'
(signAllTransactionsRequests.length > 0 ||
signTransactionRequests.length > 0) &&
(selectedPanel === 'signTransaction' ||
selectedPanel === 'signAllTransactions')
) {
return (
<PanelWrapper isLonger={true}>
Expand Down

0 comments on commit dcb6045

Please sign in to comment.