Skip to content

ClaimDeposit marks deposit as claimed before mint/send succeeds #982

@danflo27

Description

@danflo27

ClaimDeposit sets DepositIdClaimedMap before token mint/transfer succeeds. If mint or send fails, the deposit can be permanently marked claimed without funds being delivered.

  • x/bridge/keeper/claim_deposit.go:69-74 (DepositIdClaimedMap.Set(...))
  • x/bridge/keeper/claim_deposit.go:76-85 (mint/send paths happen after claim mark)

Fix:
Move the claim-mark write to after both:

  1. MintCoins(...) succeeds
  2. SendCoinsFromModuleToAccount(...) succeeds

Only mark claimed after tokens move

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions