Skip to content

Commit

Permalink
Handle prefixes during deposit events
Browse files Browse the repository at this point in the history
This patch helps handle prefixes during deposit events and ensure we
don't relay a cosmos address instead of an althea one.
  • Loading branch information
jkilpatr committed May 19, 2021
1 parent 904e4e5 commit bb18ef3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion orchestrator/cosmos_gravity/src/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ pub async fn send_ethereum_claims(
block_height: downcast_uint256(deposit.block_height).unwrap(),
token_contract: deposit.erc20.to_string(),
amount: deposit.amount.to_string(),
cosmos_receiver: deposit.destination.to_string(),
cosmos_receiver: deposit.destination.to_bech32(contact.get_prefix()).unwrap(),
ethereum_sender: deposit.sender.to_string(),
orchestrator: our_address.to_string(),
};
Expand Down
2 changes: 1 addition & 1 deletion orchestrator/orchestrator/src/ethereum_event_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub async fn check_for_events(
if !deposits.is_empty() {
info!(
"Oracle observed deposit with sender {}, destination {}, amount {}, and event nonce {}",
deposits[0].sender, deposits[0].destination, deposits[0].amount, deposits[0].event_nonce
deposits[0].sender, deposits[0].destination.to_bech32(contact.get_prefix()).unwrap(), deposits[0].amount, deposits[0].event_nonce
)
}
if !withdraws.is_empty() {
Expand Down

0 comments on commit bb18ef3

Please sign in to comment.