Skip to content

Commit

Permalink
Merge branch 'development' into feat/veion-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
vidvidvid committed Nov 7, 2024
2 parents dd7fa87 + be6a622 commit 95327b3
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/contracts/tasks/chain-specific/mode/liquidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,13 @@ task("mode:liquidation:set-redemption-strategies", "Set redemption strategy").se
await setOptimalSwapPath(viem, deployments, deployer as Address, {
inputToken: wbtcToken.underlying,
outputToken: usdtToken.underlying,
optimalPath: [wethToken.underlying, usdcToken.underlying, usdtToken.underlying]
optimalPath: [mbtcToken.underlying, wethToken.underlying, usdcToken.underlying, usdtToken.underlying]
});

await setOptimalSwapPath(viem, deployments, deployer as Address, {
inputToken: usdtToken.underlying,
outputToken: wbtcToken.underlying,
optimalPath: [usdcToken.underlying, wethToken.underlying, wbtcToken.underlying]
optimalPath: [usdcToken.underlying, wethToken.underlying, mbtcToken.underlying, wbtcToken.underlying]
});

await setOptimalSwapPath(viem, deployments, deployer as Address, {
Expand Down
9 changes: 3 additions & 6 deletions packages/ui/app/_components/DynamicSubNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,16 @@ function DynamicSubNav() {
);
}
return (
<a
<div
className={`${`${pools[+chainId]?.bg ?? pools[mode.id]?.bg} ${
pools[+chainId]?.text ?? pools[mode.id]?.text
}`} absolute w-full z-20 top-full left-0 text-center text-sm font-medium cursor-pointer `}
// onClick={() => router.push('/points')}
href="https://jumper.exchange/superfest/"
target="_blank"
}`} absolute w-full z-20 top-full left-0 text-center text-sm font-medium `}
>
<div className={`h-max w-full flex group z-20 givep overflow-x-hidden`}>
{clone()}
{clone()}
</div>
</a>
</div>
);
}

Expand Down
27 changes: 25 additions & 2 deletions packages/ui/app/_components/dashboards/CollateralSwapPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import type { MarketData } from '@ui/types/TokensDataMap';

import MaxDeposit from './MaxDeposit';
import SwapTo from './SwapTo';
import { SlippageDropdown } from '../SlippageDropdown';

import { collateralSwapAbi } from '@ionicprotocol/sdk/src';

Expand Down Expand Up @@ -78,6 +77,30 @@ ChartJS.register(
Legend
);

// Replace the SlippageDropdown import with a simpler dropdown implementation
const SlippageSelector = ({
onSlippageChange
}: {
onSlippageChange: (value: number) => void;
}) => {
return (
<div className="flex items-center justify-between w-full text-xs pb-2">
<span className="text-white/50">SLIPPAGE TOLERANCE</span>
<select
className="bg-graytwo text-white rounded px-2 py-1 text-xs"
onChange={(e) => onSlippageChange(Number(e.target.value))}
defaultValue="0.01"
>
<option value="0.001">0.1%</option>
<option value="0.005">0.5%</option>
<option value="0.01">1%</option>
<option value="0.02">2%</option>
<option value="0.05">5%</option>
</select>
</div>
);
};

export default function CollateralSwapPopup({
swapRef,
toggler,
Expand Down Expand Up @@ -563,7 +586,7 @@ export default function CollateralSwapPopup({
</div>
</div>
<div className="h-[2px] w-full mx-auto bg-white/10 my-2.5" />
<SlippageDropdown onSlippageChange={handleSlippageChange} />
<SlippageSelector onSlippageChange={handleSlippageChange} />
</div>

<div className="sticky bottom-0 bg-grayone w-full px-8 pb-4">
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
"components": "@ui/components",
"utils": "@ui/lib/utils"
}
}
}
4 changes: 3 additions & 1 deletion packages/ui/utils/multipliers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,9 @@ export const multipliers: Record<
ionic: 0,
turtle: false,
ionAPR: true,
flywheel: true
flywheel: true,
underlyingAPR: 15,
anzen: 5
}
}
}
Expand Down

0 comments on commit 95327b3

Please sign in to comment.