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

Refactor _validateSignature to allow Smart Wallets to sign for other Smart Wallets #13

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

wilsoncusack
Copy link
Contributor

While discussing ERC-1271 with @xenoliss, we realized that there is currently no way for Smart Wallet to sign via ERC-1271 for another Smart Wallet. To fix this, we make _validateSignature primarily switch on the ownerBytes length, rather than the signature length, which cleans up the code and allows us to remove a couple errors entirely.

@wilsoncusack wilsoncusack force-pushed the wilson/update-validate-signature branch from f432fd0 to 3e2eccb Compare March 5, 2024 20:59
@@ -342,7 +319,7 @@ contract CoinbaseSmartWallet is MultiOwnable, UUPSUpgradeable, Receiver, ERC1271
});
}

revert InvalidSignatureLength(sigWrapper.signatureData.length);
revert InvalidOwnerBytesLength(ownerBytes);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe we could rename this more clearly? InvalidOwnerIndex? NoOwnerAtIndex?

@cb-heimdall
Copy link
Collaborator

Review Error for xenoliss @ 2024-03-07 12:06:25 UTC
User must have write permissions to review

@wilsoncusack wilsoncusack merged commit cd68327 into main Mar 7, 2024
1 of 3 checks passed
@wilsoncusack wilsoncusack deleted the wilson/update-validate-signature branch March 7, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants