yearn / yearn-finance-v3

Yearn Finance Web App v3
https://yearn.finance
123 stars 138 forks source link

fix: withdraw with permit using ledger with metamask #750

Closed xgambitox closed 2 years ago

xgambitox commented 2 years ago

Description

Fix invalid signature issue on withdraw from vault with permit when using a ledger hw wallet

Related Issue

https://github.com/MetaMask/eth-ledger-bridge-keyring/pull/152 https://github.com/MetaMask/eth-ledger-bridge-keyring/issues/151 https://github.com/MetaMask/metamask-extension/issues/10240

Motivation and Context

Users should be able to use Metamask + Ledger to withdraw from vaults using permit. Currently the generated signature is invalid due to incorrect V parameter of https://eips.ethereum.org/EIPS/eip-712. We will temporarily reconstruct the signature using Ethers utils with correct V parameter until issue is solved.

How Has This Been Tested?

Tested with a Metamask + Ledger wallet

aws-amplify-us-east-1[bot] commented 2 years ago

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-750.d27dgpz01hmbvx.amplifyapp.com