Skip to content

Commit

Permalink
ignore parse validated destination
Browse files Browse the repository at this point in the history
  • Loading branch information
tubackkhoa committed Aug 30, 2023
1 parent 013cd57 commit 6928166
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions orchestrator/gravity_utils/src/types/ethereum_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,28 +659,28 @@ impl EthereumEvent for SendToCosmosEvent {
))
} else {
let event_nonce: u64 = data.event_nonce.to_string().parse().unwrap();
let validated_destination = match data
.destination
.split('/')
.last()
.unwrap()
.parse()
{
Ok(v) => Some(v),
Err(_) => {
if data.destination.len() < 1000 {
warn!("Event nonce {} sends tokens to {} which is invalid bech32, these funds will be allocated to the community pool", event_nonce, data.destination);
} else {
warn!("Event nonce {} sends tokens to a destination which is invalid bech32, these funds will be allocated to the community pool", event_nonce);
}
None
}
};
// let validated_destination = match data
// .destination
// .split('/')
// .last()
// .unwrap()
// .parse()
// {
// Ok(v) => Some(v),
// Err(_) => {
// if data.destination.len() < 1000 {
// warn!("Event nonce {} sends tokens to {} which is invalid bech32, these funds will be allocated to the community pool", event_nonce, data.destination);
// } else {
// warn!("Event nonce {} sends tokens to a destination which is invalid bech32, these funds will be allocated to the community pool", event_nonce);
// }
// None
// }
// };
Ok(SendToCosmosEvent {
erc20,
sender,
destination: data.destination,
validated_destination,
validated_destination: None,
amount: data.amount,
event_nonce,
block_height,
Expand Down

0 comments on commit 6928166

Please sign in to comment.