Skip to content

Commit

Permalink
✨ Add optional refund address to SwapExactCoinOut
Browse files Browse the repository at this point in the history
  • Loading branch information
NotJeremyLiu committed Jul 26, 2023
1 parent 35d6e33 commit 8d1f373
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contracts/entry-point/tests/test_execute_swap_and_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ struct Params {
denom_out: "untrn".to_string(),
}
],
refund_address: None,
}
),
user_swap: SwapExactCoinIn {
Expand Down Expand Up @@ -255,6 +256,7 @@ struct Params {
denom_out: "untrn".to_string(),
}
],
refund_address: None,
}
),
user_swap: SwapExactCoinIn {
Expand Down Expand Up @@ -372,6 +374,7 @@ struct Params {
denom_out: "untrn".to_string(),
}
],
refund_address: None,
}
),
user_swap: SwapExactCoinIn {
Expand Down Expand Up @@ -458,6 +461,7 @@ struct Params {
denom_out: "untrn".to_string(),
}
],
refund_address: None,
}
),
user_swap: SwapExactCoinIn {
Expand Down Expand Up @@ -511,6 +515,7 @@ struct Params {
denom_out: "untrn".to_string(),
}
],
refund_address: None,
}
),
user_swap: SwapExactCoinIn {
Expand Down Expand Up @@ -560,6 +565,7 @@ struct Params {
denom_out: "untrn".to_string(),
}
],
refund_address: None,
}
),
user_swap: SwapExactCoinIn {
Expand Down Expand Up @@ -609,6 +615,7 @@ struct Params {
denom_out: "osmo".to_string(),
}
],
refund_address: None,
}
),
user_swap: SwapExactCoinIn {
Expand Down Expand Up @@ -658,6 +665,7 @@ struct Params {
denom_out: "untrn".to_string(),
}
],
refund_address: None,
}
),
user_swap: SwapExactCoinIn {
Expand Down Expand Up @@ -785,6 +793,7 @@ struct Params {
denom_out: "untrn".to_string(),
}
],
refund_address: None,
}
),
user_swap: SwapExactCoinIn {
Expand Down Expand Up @@ -888,6 +897,7 @@ struct Params {
swap_venue_name: "swap_venue_name".to_string(),
coin_out: Coin::new(200_000, "osmo"),
operations: vec![],
refund_address: None,
}
),
user_swap: SwapExactCoinIn {
Expand Down
1 change: 1 addition & 0 deletions packages/skip/src/entry_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub struct InstantiateMsg {
///////////////

#[cw_serde]
#[allow(clippy::large_enum_variant)]
pub enum ExecuteMsg {
SwapAndAction {
fee_swap: Option<SwapExactCoinOut>,
Expand Down
1 change: 1 addition & 0 deletions packages/skip/src/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ pub struct SwapExactCoinOut {
pub swap_venue_name: String,
pub coin_out: Coin,
pub operations: Vec<SwapOperation>,
pub refund_address: Option<String>,
}

// Swap object that swaps the given coin in when present. When not present,
Expand Down

0 comments on commit 8d1f373

Please sign in to comment.