diff --git a/scanner/src/commands.rs b/scanner/src/commands.rs index f028f10..e647884 100644 --- a/scanner/src/commands.rs +++ b/scanner/src/commands.rs @@ -367,7 +367,7 @@ impl Migrate { &tx.to_lowercase(), &block.to_lowercase(), &sender, - opt.claim.body.amount, + opt.claim.body.amount.unwrap_or(0), height, timestamp, &op_copy, diff --git a/scanner/src/rpc.rs b/scanner/src/rpc.rs index 792125a..f5ee09a 100644 --- a/scanner/src/rpc.rs +++ b/scanner/src/rpc.rs @@ -393,7 +393,7 @@ impl RPCCaller { tx_hash: tx_hash.clone(), block_hash: block_hash.clone(), sender: signer, - amount: opt.claim.body.amount, + amount: opt.claim.body.amount.unwrap_or(0), height, timestamp: timestamp.timestamp(), content: op_copy, diff --git a/scanner/src/types.rs b/scanner/src/types.rs index 1c1aed1..3593ea0 100644 --- a/scanner/src/types.rs +++ b/scanner/src/types.rs @@ -299,7 +299,7 @@ pub struct Claim { #[derive(Serialize, Deserialize, Debug)] pub struct ClaimOptBody { - pub amount: i64, + pub amount: Option, } ////////////////////////////////////////////////////////////////////////////////////////////////////