Skip to content

Commit dbaaaf0

Browse files
committed
updates
1 parent 1e2d3ef commit dbaaaf0

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

src/components/HoneycombCorners/HoneycombCorners.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
/* Responsive adjustments */
3535
@media (max-width: 768px) {
3636
.honeycomb-corner {
37-
display: none;
37+
width: 60%;
38+
opacity: 0.6;
3839
}
3940
}
4041

src/components/VoxStaking/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,16 @@ export default function VoxStaking() {
246246

247247
try {
248248
setClaimUsdtLoading(true);
249-
const transaction = await contract.claim();
249+
const transaction = await contract.claim({ gasLimit: 300000 });
250250
await transaction.wait();
251251
showToast('USDT dividends claimed successfully!', 'success');
252252
// Refresh rewards data after successful claim
253253
await updateRewardsData();
254254
} catch (ex) {
255255
console.error('USDT claim error:', ex);
256-
showToast(`USDT claim failed: ${ex.reason || ex.message || 'Unknown error'}`, 'error');
256+
let errorMessage = ex.reason || ex.message || 'Unknown error';
257+
errorMessage = errorMessage.replace('execution reverted:', '').replace('JSON Parse error:', '').trim();
258+
showToast(`USDT claim failed: ${errorMessage}`, 'error');
257259
} finally {
258260
setClaimUsdtLoading(false);
259261
}

src/contracts/VoxStaking.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ contract VoxStaking is ReentrancyGuard, DividendTracker, Ownable {
12561256
if (block.timestamp <= tokenLastRewardTimestamp) {
12571257
return;
12581258
}
1259-
uint256 lpSupply = tokenTotalStaked;
1259+
uint256 lpSupply = totalBalance;
12601260
if (lpSupply == 0) {
12611261
tokenLastRewardTimestamp = block.timestamp;
12621262
return;
@@ -1292,10 +1292,10 @@ contract VoxStaking is ReentrancyGuard, DividendTracker, Ownable {
12921292
return 0;
12931293
}
12941294
uint256 accTokensPerShare = tokenAccTokensPerShare;
1295-
if (block.timestamp > tokenLastRewardTimestamp && tokenTotalStaked != 0) {
1295+
if (block.timestamp > tokenLastRewardTimestamp && totalBalance != 0) {
12961296
uint256 multiplier = block.timestamp - tokenLastRewardTimestamp;
12971297
uint256 rewards = multiplier * tokenRewardsPerSecond;
1298-
accTokensPerShare = accTokensPerShare + (rewards * 1e12 / tokenTotalStaked);
1298+
accTokensPerShare = accTokensPerShare + (rewards * 1e12 / totalBalance);
12991299
}
13001300
return holderBalance[_user].mul(accTokensPerShare).div(1e12).sub(user.tokenRewardDebt);
13011301
}

src/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
body {
2+
background: #01062E;
23
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
34
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
45
sans-serif;

0 commit comments

Comments
 (0)