Skip to content

Commit

Permalink
replace err with nil
Browse files Browse the repository at this point in the history
  • Loading branch information
erokhinav committed Dec 12, 2024
1 parent aa7c028 commit 44483b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/wallet/risk.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ func ExtractRiskFromMessage(m abi.MessageRelaxed, risk Risk, mode byte) (Risk, e
switch x := msgBody.(type) {
case abi.NftTransferMsgBody:
if destination == nil {
return risk, err
return risk, nil
}
// here, destination is an NFT
risk.Nfts = append(risk.Nfts, *destination)
case abi.JettonBurnMsgBody:
if destination == nil {
return risk, err
return risk, nil
}
// here, destination is a jetton wallet
amount := big.Int(x.Amount)
Expand All @@ -83,13 +83,13 @@ func ExtractRiskFromMessage(m abi.MessageRelaxed, risk Risk, mode byte) (Risk, e
risk.Jettons[*destination] = *total.Add(&currentJettons, &amount)
case abi.JettonTransferMsgBody:
if destination == nil {
return risk, err
return risk, nil
}
// here, destination is a jetton wallet
amount := big.Int(x.Amount)
currentJettons := risk.Jettons[*destination]
var total big.Int
risk.Jettons[*destination] = *total.Add(&currentJettons, &amount)
}
return risk, err
return risk, nil
}

0 comments on commit 44483b7

Please sign in to comment.