Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,080 changes: 4,263 additions & 2,817 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"@fontsource/open-sauce-sans": "^5.1.0",
"@headlessui/react": "2.1.6",
"@heroicons/react": "^2.1.3",
"@indexcoop/flash-mint-sdk": "3.35.0",
"@indexcoop/tokenlists": "4.6.0",
"@indexcoop/flash-mint-sdk": "3.37.1",
"@indexcoop/tokenlists": "4.7.1",
"@next/third-parties": "15.1.7",
"@reown/appkit": "1.7.2",
"@reown/appkit-adapter-wagmi": "1.7.2",
Expand Down Expand Up @@ -57,8 +57,8 @@
"react-loading-skeleton": "3.5.0",
"tailwind-merge": "2.5.2",
"use-debounce": "^10.0.1",
"viem": "2.25.0",
"wagmi": "2.14.15",
"viem": "2.37.13",
"wagmi": "2.17.5",
"xstate": "5.19.2"
},
"devDependencies": {
Expand Down Expand Up @@ -96,4 +96,4 @@
"typechain": "^8.2.0",
"typescript": "^5.1.3"
}
}
}
8 changes: 8 additions & 0 deletions public/assets/aave-usd-market.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions public/assets/arb-usd-market.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/assets/link-usd-market.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/assets/xaut-usd-market.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/app/api/leverage/history/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,18 @@ const fetchCoingeckoPrices = async (

const mapCoingeckoIdToSymbol = (id: string) => {
switch (id) {
case 'aave':
return 'aave'
case 'arbitrum':
return 'arb'
case 'ethereum':
return 'eth'
case 'bitcoin':
return 'btc'
case 'tether-gold':
return 'xaut'
case 'link':
return 'LINK'
case 'wrapped-solana-universal':
return 'sol'
case 'wrapped-sui-universal':
Expand All @@ -56,6 +64,10 @@ export async function POST(req: NextRequest) {
const USUI = getTokenByChainAndSymbol(chainId, 'uSUI')
const USOL = getTokenByChainAndSymbol(chainId, 'uSOL')
const UXRP = getTokenByChainAndSymbol(chainId, 'uXRP')
const AAVE = getTokenByChainAndSymbol(chainId, 'AAVE')
const ARB = getTokenByChainAndSymbol(chainId, 'ARB')
const XAUT = getTokenByChainAndSymbol(chainId, 'XAUt')
const LINK = getTokenByChainAndSymbol(chainId, 'LINK')

const { data: positions } = await getApiV2UserAddressPositions(
{ address: user },
Expand Down Expand Up @@ -104,6 +116,10 @@ export async function POST(req: NextRequest) {
USUI?.extensions.coingeckoId,
USOL?.extensions.coingeckoId,
UXRP?.extensions.coingeckoId,
AAVE?.extensions.coingeckoId,
ARB?.extensions.coingeckoId,
XAUT?.extensions.coingeckoId,
LINK?.extensions.coingeckoId,
].filter((str) => str !== undefined),
['btc', 'eth', 'usd'],
),
Expand Down
4 changes: 2 additions & 2 deletions src/app/api/quote/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export async function POST(req: NextRequest) {
slippage,
} = request

const inputToken = getQuoteToken(inputTokenAddress, chainId)
const outputToken = getQuoteToken(outputTokenAddress, chainId)
const inputToken = getQuoteToken(inputTokenAddress as Address, chainId)
const outputToken = getQuoteToken(outputTokenAddress as Address, chainId)

if (
!inputToken ||
Expand Down
5 changes: 4 additions & 1 deletion src/app/earn/components/earn-widget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ export function EarnWidget() {
} = useFormattedEarnData()

const selectedProduct = products.find((p) =>
isAddressEqual(p.tokenAddress, indexToken?.address ?? ''),
isAddressEqual(
p.tokenAddress as `0x${string}`,
(indexToken?.address ?? '') as `0x${string}`,
),
)

const {
Expand Down
2 changes: 1 addition & 1 deletion src/app/earn/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function EarnProvider(props: {
if (!indexToken.address || !indexToken.chainId) return
setProductToken(
{
address: indexToken.address,
address: indexToken.address as `0x${string}`,
chainId: indexToken.chainId,
},
isMinting,
Expand Down
Loading