-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: disable swap minting #1740
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
image: string | ||
chainId?: number | ||
logoURI?: string | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a new type to decouple from Token
type from constants/token
. Will follow up with a PR to refactor quite a bit around Token
.
@@ -4,6 +4,8 @@ export const buildEarnTradePath = ( | |||
network: number | string = 1, | |||
) => `/earn?buy=${buySymbol}&sell=${sellSymbol}&network=${network}` | |||
|
|||
export const buildLegacyPath = () => `/legacy` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No routing available, so we just link to legacy.
expect(resolvedPath.outputToken.symbol).toBe(indicesTokenList[0].symbol) | ||
expect(resolvedPath.isMinting).toBe(false) | ||
expect(resolvedPath.inputToken.symbol).toBe(indicesTokenList[0].symbol) | ||
expect(resolvedPath.outputToken.symbol).toBe('ETH') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of these tests had to be changed to make sure that those pairs are now only redeemable.
src/app/legacy/config.ts
Outdated
@@ -26,6 +26,9 @@ import { | |||
Matic2xFlexibleLeverageIndexPolygon, | |||
} from './polygon' | |||
|
|||
const GitcoinStakedETHIndex = getTokenByChainAndSymbol(1, 'gtcETH') | |||
const ic21 = getTokenByChainAndSymbol(1, 'ic21') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding directly from tokenlists. Removing lots of obsolete references/assets throughout the app.
onClick={props.onClickBuy} | ||
> | ||
Buy | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer needed here. So removed othe relevant code as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few smol questions, LGTM though 👍
const DebtIssuanceModuleAddress = '0x39F024d621367C044BacE2bf0Fb15Fb3612eCB92' | ||
const DebtIssuanceModuleV2PolygonAddress = | ||
'0xf2dC2f456b98Af9A6bEEa072AF152a7b0EaA40C9' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious- why define these here as opposed to flash mint sdk? if we need to define them in this codebase, thoughts on putting them in some sort of config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are removed in the SDK as we actually don't really use them any longer - expect for deprecated products. So I would say here it's fine? and then we can completely remove once those products are removed from legacy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me , thanks for the context 👍
if (outputTokenIsIndex) { | ||
return { | ||
isMinting: false, | ||
inputToken: outputToken, | ||
outputToken: this.getCurrency(outputToken, inputToken), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not very familiar with this code- why specify the outputToken
as the inputToken
here on line 94?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be just INDEX
in that case could have used that directly too. Basically all this is rewritten a bit just to satisfy the requirement of not all tokens being mintable any longer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. I wish we could somehow do all these token defs in the list somehow, but maybe its not worth it, or is that what the followup is about?
yes sir - at least parts of it: https://github.com/IndexCoop/index-app/pull/1743/files#diff-bf292afa3363dfdc97bd117db8d3a9af6c8686a1e49e9812cbcd3c36345248abL3 |
* remove bed index token constant * refactor legacy config * remove obsolete issuance quote fetch * refactor icreth use * remove obsolete assets * refactor get address for token
Summary of Changes
Test Data or Screenshots
By submitting this pull request, you are confirming the following to be true:
IndexCoop/index-app
.