Skip to content

Commit

Permalink
fix: disable the staking form when reached height cap
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwbabylonlab committed Oct 3, 2024
1 parent b9f0ae1 commit 41711b1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app/components/Staking/Staking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,12 @@ export const Staking: React.FC<StakingProps> = ({
return;
}
const nextBlockHeight = btcHeight + 1;
const { stakingCapHeight, stakingCapSat, confirmationDepth } =
paramWithCtx.currentVersion;
const { stakingCapHeight, stakingCapSat } = paramWithCtx.currentVersion;
// Use height based cap than value based cap if it is set
if (stakingCapHeight) {
setOverflow({
isHeightCap: true,
overTheCapRange:
nextBlockHeight >= stakingCapHeight + confirmationDepth,
overTheCapRange: nextBlockHeight >= stakingCapHeight,
/*
When btc height is approching the staking cap height,
there is higher chance of overflow due to tx not being included in the next few blocks on time
Expand Down

0 comments on commit 41711b1

Please sign in to comment.