Skip to content

Commit

Permalink
rewirte templates to yaml (#445)
Browse files Browse the repository at this point in the history
* rewirte templates to yaml

* remove orca + adjust templates
  • Loading branch information
abrzezinski94 authored Aug 15, 2024
1 parent 21df0db commit ebd50ca
Show file tree
Hide file tree
Showing 5 changed files with 411 additions and 386 deletions.
12 changes: 11 additions & 1 deletion components/governance/ListToken/ListToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ const ListToken = ({ goBack }: { goBack: () => void }) => {
const [raydiumPoolAddress, setRaydiumPoolAddress] = useState('')
const [oracleModalOpen, setOracleModalOpen] = useState(false)
const [isSolPool, setIsSolPool] = useState(false)
const [isReversedSolPool, setIsReversedSolPool] = useState(false)
const presets = LISTING_PRESETS
const [proposedPresetTargetAmount, setProposedProposedTargetAmount] =
useState(0)
Expand Down Expand Up @@ -438,6 +439,7 @@ const ListToken = ({ goBack }: { goBack: () => void }) => {
tokenMint: PublicKey,
) => {
setIsSolPool(false)
setIsReversedSolPool(false)
const swaps = await handleGetRoutesWithFixedArgs(
targetAmount ? targetAmount : 100,
tokenMint,
Expand Down Expand Up @@ -478,7 +480,13 @@ const ListToken = ({ goBack }: { goBack: () => void }) => {
if (bestSolPool?.dexId.includes('orca')) {
setOrcaPoolAddress(bestSolPool.pairAddress)
}
setIsSolPool(true)
if (bestSolPool) {
setIsSolPool(true)
setIsReversedSolPool(
bestSolPool.baseToken.address !== WRAPPED_SOL_MINT.toBase58(),
)
}

return
} catch (e) {
console.log(e)
Expand Down Expand Up @@ -533,6 +541,7 @@ const ListToken = ({ goBack }: { goBack: () => void }) => {
setBaseTokenPrice(0)
setIsLST(false)
setIsSolPool(false)
setIsReversedSolPool(false)
}

const isFormValid = useCallback(
Expand Down Expand Up @@ -1243,6 +1252,7 @@ const ListToken = ({ goBack }: { goBack: () => void }) => {
isSolPool={isSolPool}
stakePoolAddress={lstStakePoolAddress}
tokenPrice={baseTokenPrice}
isReversedPool={isReversedSolPool}
></CreateSwitchboardOracleModal>
</li>
) : null}
Expand Down
Loading

0 comments on commit ebd50ca

Please sign in to comment.