We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b8f0c0 commit 73e0dabCopy full SHA for 73e0dab
src/model/transaction/invoke_script_transaction.rs
@@ -225,9 +225,13 @@ fn map_args(value: &Value) -> Result<Vec<Arg>> {
225
"integer" | "Int" => {
226
Arg::Integer(JsonDeserializer::safe_to_int_from_field(&arg, "value")?)
227
}
228
- "binary" | "ByteVector" => Arg::Binary(Base64String::from_string(
229
- &JsonDeserializer::safe_to_string_from_field(&arg, "value")?,
230
- )?),
+ "binary" | "ByteVector" => {
+ let val = JsonDeserializer::safe_to_string_from_field(&arg, "value")?;
+ match Base64String::from_string(&val) {
231
+ Ok(b) => Arg::Binary(b),
232
+ Err(_) => Arg::String(val),
233
+ }
234
235
"list" | "List" | "Array" => {
236
let result = map_args(&arg["value"])?;
237
Arg::List(result)
0 commit comments