Skip to content

Commit

Permalink
update schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
NotJeremyLiu committed Oct 17, 2023
1 parent 3b62a41 commit 93dac5d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions contracts/entry-point/tests/test_error_handling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ pub struct Params {
expected_error: Option<ContractError>,
}

// Helper function for all SWAP_AND_ACTION msgs
pub fn test_execute_swap_and_action(params: Params) {
// Helper function for all SwapAndActionWithRecover tests
pub fn test_execute_swap_and_action_with_recover(params: Params) {
// Create mock dependencies
let mut deps = mock_dependencies_with_balances(&[(
"entry_point",
Expand Down Expand Up @@ -119,9 +119,9 @@ pub fn test_execute_swap_and_action(params: Params) {
}
}

// Test new ExecuteMsg::AxelarSwapAndAction msg and verify it correctly sends the ExecuteMsg::SwapAndAction
// Test new ExecuteMsg::SwapAndActionWithRecover msg and verify it correctly sends the ExecuteMsg::SwapAndAction
#[test]
pub fn successful_swap_and_action() {
pub fn successful_swap_and_action_with_recover() {
let params = Params {
info_funds: vec![Coin::new(1_000_000, "untrn")],
user_swap: Swap::SwapExactCoinIn(SwapExactCoinIn {
Expand Down Expand Up @@ -167,7 +167,7 @@ pub fn successful_swap_and_action() {
expected_error: None,
};

test_execute_swap_and_action(params);
test_execute_swap_and_action_with_recover(params);
}

// Error should be handled with reply message so it should not return an Timeout contract error as it would if you called ExecuteMsg::SwapAndAction
Expand Down Expand Up @@ -218,5 +218,5 @@ pub fn timeout_error_passes() {
expected_error: None,
};

test_execute_swap_and_action(params);
test_execute_swap_and_action_with_recover(params);
}
4 changes: 2 additions & 2 deletions schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
{
"type": "object",
"required": [
"axelar_swap_and_action"
"swap_and_action_with_recover"
],
"properties": {
"axelar_swap_and_action": {
"swap_and_action_with_recover": {
"type": "object",
"required": [
"affiliates",
Expand Down
4 changes: 2 additions & 2 deletions schema/skip-api-entry-point.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
{
"type": "object",
"required": [
"axelar_swap_and_action"
"swap_and_action_with_recover"
],
"properties": {
"axelar_swap_and_action": {
"swap_and_action_with_recover": {
"type": "object",
"required": [
"affiliates",
Expand Down

0 comments on commit 93dac5d

Please sign in to comment.