Conversation
filmakarov
commented
Feb 16, 2026
- add p256 simple mode
- make execQuote support it
- unify swicth/cases to use quote type, not a sig type
| case MeeSignatureType.ERC20_PERMIT: | ||
| case MeeSignatureType.MM_DTK: | ||
| case MeeSignatureType.SAFE_SA: | ||
| switch (quoteType) { |
There was a problem hiding this comment.
Quote type is not provided by all the SDKs. Some old SDKs still don't send this and it might be a breaking change.
Let's revert back to the same approach
There was a problem hiding this comment.
It makes sure quote type is always defined.
There was a problem hiding this comment.
So there's no need to revert to the same approach
This code is much cleaner. Previous approach was confusing => quote type and sig type were mixed together , while they mean pretty miuch same
There was a problem hiding this comment.
Can you reshare the pic, I see quoteType is optional in schema definition.
Sig type is good for backwards compatibility.
There was a problem hiding this comment.
Got it, all good. Yup I added this code block earlier for backwards compatibility.
I will merge this
There was a problem hiding this comment.
quoteType is optional in schema definition.
it is optional. but in the code it is always defined!
if (!options.quoteType) {
if (signatureType === MeeSignatureType.OFF_CHAIN) {
if (
signatureType === MeeSignatureType.OFF_CHAIN ||
signatureType === MeeSignatureType.OFF_CHAIN_P256
) {
quoteType = "simple";
} else if (signatureType === MeeSignatureType.ON_CHAIN) {
quoteType = "onchain";
} else if (signatureType === MeeSignatureType.ERC20_PERMIT) {
quoteType = "permit";
} else if (signatureType === MeeSignatureType.MM_DTK) {
quoteType = "mm-dtk";
} else if (signatureType === MeeSignatureType.SAFE_SA) {
quoteType = "safe-sa";
} else {
throw new BadRequestException(
`Unsupported signature type for quote type detection ${signatureType}`,
);
}
} else {
quoteType = options.quoteType;
}
There was a problem hiding this comment.
However, initially its optional and its optional in quote phase.
There was a problem hiding this comment.
quote type is also better because two sig types (and more in future) can be still same quote type
vr16x
left a comment
There was a problem hiding this comment.
Please don't use quoteType. Its not a mandatory field because old versions of SDK don't send them
