fix: Add a value to the Transaction if token in is ETH

not only if the action is unwrap

--- don't change below this line ---
ENG-4260 Took 11 minutes
This commit is contained in:
Diana Carvalho
2025-02-27 12:39:16 +00:00
parent 9eb4299ffe
commit 05a1843f9c

View File

@@ -109,9 +109,10 @@ impl TychoEncoder for EVMTychoEncoder {
.strategy_encoder .strategy_encoder
.encode_strategy(solution.clone())?; .encode_strategy(solution.clone())?;
let value = match solution.native_action.as_ref() { let value = if solution.given_token == self.native_address {
Some(NativeAction::Wrap) => solution.given_amount.clone(), solution.given_amount.clone()
_ => BigUint::ZERO, } else {
BigUint::ZERO
}; };
transactions.push(Transaction { transactions.push(Transaction {