Skip to content
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

Centrifuge App: Disable permits for smart contract wallets #1745

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

onnovisser
Copy link
Collaborator

Description

This pull request...

Closes #

Approvals

  • Dev

Screenshots

Impact

Copy link

github-actions bot commented Dec 8, 2023

PR deployed in Google Cloud
URL: https://app-pr1745.k-f.dev
Commit #: 1d5e45f
To access the functions directly check the corresponding deploy Action

lpInvest.currencySupportsPermit &&
pendingAction !== 'approvePoolCurrency'
) {
if (lpInvest.lpCurrencyAllowance.lt(newOrder) && supportsPermits && pendingAction !== 'approvePoolCurrency') {
const signer = provider!.getSigner()
const connectedCent = cent.connectEvm(evmAddress!, signer)
const permit = await connectedCent.liquidityPools.signPermit([
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess I'm missing something, but to me it looks like the else statement on line 195 is not actually doing an approve, and just requestDeposit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

needsPoolCurrencyApproval will return true when !supportsPermits, which will cause the form submit button to call approvePoolCurrency first, here:

onClick: actions.approvePoolCurrency,

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah okay, thanks!

@onnovisser onnovisser merged commit 4fd0027 into main Dec 8, 2023
16 checks passed
@onnovisser onnovisser deleted the smart-contract-wallet-check branch December 8, 2023 12:55
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