feat: smart contract integration - #8
Conversation
| // TEMP: debug access for testing the contract quote — remove before commit | ||
| // @ts-expect-error debug helper | ||
| window.lib = library | ||
|
|
There was a problem hiding this comment.
Please delete package-lock.json - we are using pnpm instead of npm
|
The PR does not have consistent formatting, which is my fault, since I never added a code style configuration. Please add Then, install And finally, add the Having this done, please run |
| destinationCurrency: quoteConfiguration.toCurrency, | ||
| amount: quoteConfiguration.amount, | ||
| tradeType: quoteConfiguration.tradeType, | ||
| referrer: 'localhost', |
There was a problem hiding this comment.
Is this hardcoded referrer set to 'localhost' needed at all? In staging and production, this won't be true, either. Maybe we can just remove this line?
There was a problem hiding this comment.
It is not really needed, it is for relay, identification, who is using their API. I have deleted the row, but we can also rename this to swarm, but it is only for that identification stuff.
| const response = await fetch('https://api.relay.link/quote/v2', { | ||
| method: 'POST', | ||
| headers: { | ||
| 'Content-Type': 'application/json' | ||
| }, | ||
| body: JSON.stringify(body) | ||
| }) |
There was a problem hiding this comment.
Please add a timeout to this request:
signal: AbortSignal.timeout(30_000) // 30 seconds timeout| </Typography> | ||
| {mode === 'funding' ? ( | ||
| <FundingProgressTracker theme={theme} progress={stepStates} metadata={metadata} /> | ||
| <FundingProgressTracker theme={theme} progress={stepStates} metadata={metadata} isOtherChain={sourceChain != library.constants.gnosisChainId} /> |
There was a problem hiding this comment.
Please always use === and !==, instead of == and !=.
| overrides: | ||
| '@upcoming/multichain-library': link:../multichain-library |
There was a problem hiding this comment.
This needs to be reverted.
Cafe137
left a comment
There was a problem hiding this comment.
I have some comments that need addressing, but the logic looks promising, thank you.
I have changed the PR title from Feat/smart contract integration to feat: smart contract integration. The PR titles also need to follow the concentional commit style.
No description provided.