Skip to content

Commit

Permalink
fix: Add n and no default to prevent typos (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arrowana authored Dec 10, 2024
1 parent 89771a2 commit 800bb94
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion dynamic_slippage_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
}
],
"default": {
"amplificatioRatio": 2,
"amplificationRatio": 2,
"range": {
"min": 80,
"max": 500
Expand Down
7 changes: 0 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use range::Range;
use rust_decimal::Decimal;
use rust_decimal_macros::dec;
use serde::Deserialize;
use serde_json::{self, error::Result};
use solana_program::pubkey::Pubkey;
Expand Down Expand Up @@ -31,15 +30,9 @@ struct CategoryOriginal {
#[serde(rename_all = "camelCase")]
pub struct DeserializablePubkey(#[serde(with = "field_as_string")] pub Pubkey);

fn default_amplification_ratio() -> Decimal {
dec!(1.5)
}

#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]

pub struct DynamicSlippageDefault {
#[serde(default = "default_amplification_ratio")]
pub amplification_ratio: Decimal,
pub range: Range,
}
Expand Down

0 comments on commit 800bb94

Please sign in to comment.