Skip to content

Commit

Permalink
chore: use two switch
Browse files Browse the repository at this point in the history
  • Loading branch information
janndriessen committed Apr 24, 2024
1 parent 401cc08 commit 29a4c05
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/utils/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,22 @@ export const getFlashMintLeveragedContractForToken = (
signerOrProvider: Signer | Provider | undefined,
chainId: number = ChainId.Polygon
): Contract => {
if (
chainId === ChainId.Arbitrum &&
(token === IndexCoopBitcoin2xIndex.symbol ||
token === IndexCoopEthereum2xIndex.symbol)
) {
return getIndexFlashMintLeveragedExtendedContract(signerOrProvider)
if (chainId === ChainId.Arbitrum) {
switch (token) {
case IndexCoopBitcoin2xIndex.symbol:
case IndexCoopEthereum2xIndex.symbol:
case IndexCoopBitcoin3xIndex.symbol:
case IndexCoopEthereum3xIndex.symbol:
case IndexCoopInverseBitcoinIndex.symbol:
case IndexCoopInverseEthereumIndex.symbol:
return getIndexFlashMintLeveragedExtendedContract(signerOrProvider)
}
return getIndexFlashMintLeveragedContract(signerOrProvider)
}
switch (token) {
case BTC2xFlexibleLeverageIndex.symbol:
case ETH2xFlexibleLeverageIndex.symbol:
return getFlashMintLeveragedForCompoundContract(signerOrProvider)
case IndexCoopBitcoin3xIndex.symbol:
case IndexCoopEthereum3xIndex.symbol:
case IndexCoopInverseBitcoinIndex.symbol:
case IndexCoopInverseEthereumIndex.symbol:
return getIndexFlashMintLeveragedExtendedContract(signerOrProvider)
case IndexCoopBitcoin2xIndex.symbol:
case IndexCoopEthereum2xIndex.symbol:
case LeveragedrEthStakingYield.symbol:
Expand Down

0 comments on commit 29a4c05

Please sign in to comment.