Skip to content

Commit

Permalink
Ledger fix 2000 (#475)
Browse files Browse the repository at this point in the history
* Fix ledger unstake

* Add alert when staking
  • Loading branch information
Duddino authored Dec 3, 2024
1 parent 29f7a81 commit b069069
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/stake/Stake.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ watch(coldStakingAddress, async (coldStakingAddress) => {
await db.updateAccount(cAccount, true);
});
async function stake(value, ownerAddress) {
if (wallet.isHardwareWallet) {
createAlert('warning', ALERTS.STAKING_LEDGER_NO_SUPPORT, 5000);
return;
}
if (wallet.isViewOnly && !(await restoreWallet())) {
return;
}
Expand All @@ -75,7 +79,11 @@ async function stake(value, ownerAddress) {
}
async function unstake(value) {
if (wallet.isViewOnly && !(await restoreWallet())) {
if (
!wallet.isHardwareWallet &&
wallet.isViewOnly &&
!(await restoreWallet())
) {
return;
}
const res = await wallet.createAndSendTransaction(
Expand Down

0 comments on commit b069069

Please sign in to comment.