Skip to content

Commit

Permalink
fix: relayer fees in response
Browse files Browse the repository at this point in the history
  • Loading branch information
Itshyphen committed Aug 20, 2024
1 parent 79e682c commit 07d29b1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ module xcall::centralized_connection {
}
// this is safe because only package can call this other xcall will call other deployed instance
public(package) fun send_message(states:&mut Bag,connection_id:String,coin:Coin<SUI>,to:String,sn:u128,msg:vector<u8>,is_response:bool,ctx: &mut TxContext){
let fee = get_fee(states,connection_id, to, is_response);
let mut fee = 0;
if(sn >= 0){
fee = get_fee(states,connection_id, to, is_response);
};
assert!(coin.value() >= fee, ENotEnoughFee);
let balance = coin.into_balance();
centralized_state::deposit(get_state_mut(states,connection_id),balance);
Expand Down

0 comments on commit 07d29b1

Please sign in to comment.