Skip to content

Commit cbf1b0c

Browse files
committed
refactor(data_structures): remove redundant support for decoding fees from floats
1 parent 372560a commit cbf1b0c

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

data_structures/src/fee.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,16 @@ where
158158
#[serde(untagged)]
159159
enum Untagged {
160160
Fee(Fee),
161-
Float(f64),
162161
Integer(u64),
163162
String(String),
164163
}
165164

166165
Ok(match Untagged::deserialize(deserializer)? {
167166
Untagged::Fee(fee) => fee,
168-
Untagged::Float(float) => Fee::relative_from_float(float),
169167
Untagged::Integer(integer) => Fee::absolute_from_nanowits(integer),
170168
Untagged::String(string) => string
171169
.parse::<u64>()
172170
.map(Fee::absolute_from_nanowits)
173-
.or_else(|_| string.parse::<f64>().map(Fee::relative_from_float))
174171
.map_err(serde::de::Error::custom)?,
175172
})
176173
}

0 commit comments

Comments
 (0)