Skip to content

Commit

Permalink
Merge pull request #33 from strkfarm/dev
Browse files Browse the repository at this point in the history
fix withdraw deddudction issue
  • Loading branch information
akiraonstarknet authored Aug 30, 2024
2 parents b5c2d85 + 5caa334 commit 1a0a98e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
18 changes: 10 additions & 8 deletions src/components/Deposit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,16 @@ export default function Deposit(props: DepositProps) {
);
let reducedBalance = balance;

if (selectedMarket.name === 'STRK') {
reducedBalance = balance.subtract(
MyNumber.fromEther('1.5', selectedMarket.decimals),
);
} else if (selectedMarket.name === 'ETH') {
reducedBalance = balance.subtract(
MyNumber.fromEther('0.001', selectedMarket.decimals),
);
if (props.buttonText === 'Deposit') {
if (selectedMarket.name === 'STRK') {
reducedBalance = balance.subtract(
MyNumber.fromEther('1.5', selectedMarket.decimals),
);
} else if (selectedMarket.name === 'ETH') {
reducedBalance = balance.subtract(
MyNumber.fromEther('0.001', selectedMarket.decimals),
);
}
}
console.log('Deposit:: reducedBalance2', reducedBalance.toEtherStr());
const min = MyNumber.min(reducedBalance, adjustedMaxAllowed);
Expand Down
7 changes: 6 additions & 1 deletion src/components/TVL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ const TVL: React.FC = () => {
Your referral link{' '}
<Tooltip label="Learn more">
{/* TODO: update the url */}
<Link href="https://docs.strkfarm.xyz/p/community/referral-campaign" target='_blank'>(i)</Link>
<Link
href="https://docs.strkfarm.xyz/p/community/referral-campaign"
target="_blank"
>
(i)
</Link>
</Tooltip>
</StatLabel>
<Box
Expand Down

0 comments on commit 1a0a98e

Please sign in to comment.