Skip to content

Commit

Permalink
[1834]: Check that a marker is active before allowing a transfer.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpicyLemon committed Feb 10, 2024
1 parent 8ee5797 commit 7e36c9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x/marker/keeper/marker.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,11 @@ func (k Keeper) TransferCoin(ctx sdk.Context, from, to, admin sdk.AccAddress, am
return fmt.Errorf("marker not found for %s: %w", amount.Denom, err)
}

// TODO[1834]: Unit tests on transfer of non-active coins.
if m.GetStatus() != types.StatusActive {
return fmt.Errorf("marker status (%s) is not active, funds cannot be moved", m.GetStatus())
}

if m.GetMarkerType() != types.MarkerType_RestrictedCoin {
return fmt.Errorf("marker type is not restricted_coin, brokered transfer not supported")
}
Expand Down

0 comments on commit 7e36c9b

Please sign in to comment.