Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianmarco Fraccaroli authored and Gianmarco Fraccaroli committed Apr 12, 2024
1 parent 4f89952 commit 0ca51e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/gen/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@ impl State {
tx_settings: &Option<TxSettings>,
) {
let gas_limit = if let Some(tx_settings) = tx_settings {
tx_settings.gas_limit
tx_settings.gas_limit + (1 * NATIVE_SCALE)
} else {
DEFAULT_GAS_LIMIT
DEFAULT_GAS_LIMIT + (1 * NATIVE_SCALE)
};
let gas_price = (gas_limit as f64 * DEFAULT_GAS_PRICE * NATIVE_SCALE as f64).ceil() as u64;
self.decrease_account_token_balance(address_alias, &Alias::native_token(), gas_price)
Expand Down
2 changes: 1 addition & 1 deletion src/gen/steps/withdraw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl Step for Withdraw {

fn update_state(&self, state: &mut crate::state::State) {
state.insert_withdraw(&self.source, self.amount, self.unbond_step);
state.decrease_account_fees(&self.source, &None);
state.decrease_account_fees(&self.tx_settings.gas_payer, &None);
}

fn post_hooks(&self, step_index: u64, _state: &State) -> Vec<Box<dyn crate::step::Hook>> {
Expand Down

0 comments on commit 0ca51e5

Please sign in to comment.