fix: TokenApprovalsManager should not implement ApprovalsManager

They should be separate.
ApprovalsManager is only for user approvals
This commit is contained in:
Diana Carvalho
2025-01-14 14:37:14 +00:00
parent 3e609c75ae
commit 93410b4fe2
5 changed files with 22 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
use crate::encoding::approvals::interface::{Approval, ApprovalsManager};
use crate::encoding::approvals::interface::{Approval, UserApprovalsManager};
use alloy_primitives::U256;
use std::str::FromStr;
use tycho_core::Bytes;
@@ -25,7 +25,7 @@ impl Permit2 {
todo!()
}
}
impl ApprovalsManager for Permit2 {
impl UserApprovalsManager for Permit2 {
fn encode_approvals(&self, approvals: Vec<Approval>) -> Vec<u8> {
// calls get_allowance_data to get nonce
// checks if we are not permitted already