Skip to content

Commit

Permalink
Enable undelegation on hardware wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
Duddino committed Jan 30, 2024
1 parent ae28b99 commit a9a29e4
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions scripts/legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,16 @@ export async function createAndSendTransaction({
* @deprecated use the new wallet method instead
*/
export async function undelegateGUI() {
if (wallet.isHardwareWallet()) {
return createAlert('warning', ALERTS.STAKING_LEDGER_NO_SUPPORT, 6000);
}

// Ensure the wallet is unlocked
if (
wallet.isViewOnly() &&
!(await restoreWallet(
`${translation.walletUnlockUnstake} ${cChainParams.current.TICKER}!`
))
)
return;
if (!wallet.isHardwareWallet()) {
if (
wallet.isViewOnly() &&
!(await restoreWallet(
`${translation.walletUnlockUnstake} ${cChainParams.current.TICKER}!`
))
)
return;
}

// Verify the amount
const nAmount = Math.round(
Expand Down

0 comments on commit a9a29e4

Please sign in to comment.