Skip to content

feat: smart contract integration - #8

Open
Riki0923 wants to merge 3 commits into
mainfrom
feat/smart-contract-integration
Open

feat: smart contract integration#8
Riki0923 wants to merge 3 commits into
mainfrom
feat/smart-contract-integration

Conversation

@Riki0923

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread src/index.tsx Outdated
Comment on lines +40 to +43
// TEMP: debug access for testing the contract quote — remove before commit
// @ts-expect-error debug helper
window.lib = library

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert please

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread package-lock.json Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete package-lock.json - we are using pnpm instead of npm

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Cafe137
Cafe137 marked this pull request as ready for review July 29, 2026 09:08
@Cafe137 Cafe137 changed the title Feat/smart contract integration feat: smart contract integration Jul 29, 2026
@Cafe137

Cafe137 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

The PR does not have consistent formatting, which is my fault, since I never added a code style configuration.

Please add .prettierrc configuration file to this PR with the following settings:

{
    "arrowParens": "avoid",
    "bracketSpacing": true,
    "endOfLine": "lf",
    "quoteProps": "as-needed",
    "semi": false,
    "singleQuote": true,
    "tabWidth": 4,
    "trailingComma": "none",
    "useTabs": false,
    "printWidth": 120
}

Then, install prettier as a dev dependency: pnpm add -D prettier.

And finally, add the format script to package.json, for example: "format": "prettier --write src".

Having this done, please run format once and commit the changes with a style: format message.

Comment thread src/RelayHelper.ts Outdated
destinationCurrency: quoteConfiguration.toCurrency,
amount: quoteConfiguration.amount,
tradeType: quoteConfiguration.tradeType,
referrer: 'localhost',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/RelayHelper.ts
Comment on lines +28 to +34
const response = await fetch('https://api.relay.link/quote/v2', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
})

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a timeout to this request:

signal: AbortSignal.timeout(30_000) // 30 seconds timeout

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Comment thread src/Tab2.tsx Outdated
</Typography>
{mode === 'funding' ? (
<FundingProgressTracker theme={theme} progress={stepStates} metadata={metadata} />
<FundingProgressTracker theme={theme} progress={stepStates} metadata={metadata} isOtherChain={sourceChain != library.constants.gnosisChainId} />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please always use === and !==, instead of == and !=.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread pnpm-workspace.yaml Outdated
Comment on lines +6 to +7
overrides:
'@upcoming/multichain-library': link:../multichain-library

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reverted.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted

@Cafe137 Cafe137 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants