Skip to content

Commit

Permalink
Fix: scanner error. (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
chinyuchan authored Oct 26, 2023
1 parent 62a893b commit d272fa5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scanner/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion scanner/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion scanner/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ pub struct Claim {

#[derive(Serialize, Deserialize, Debug)]
pub struct ClaimOptBody {
pub amount: i64,
pub amount: Option<i64>,
}

////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit d272fa5

Please sign in to comment.