Skip to content

Commit

Permalink
chore: add TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Dec 13, 2023
1 parent 43cbf0e commit ef3cd99
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/supplier/keeper/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
func (k Keeper) UpsertProof(ctx sdk.Context, proof types.Proof) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ProofKeyPrefix))
b := k.cdc.MustMarshal(&proof)
// TODO_NEXT(@bryanchriswhite #141): Refactor keys to support multiple indices.
store.Set(types.ProofKey(
proof.GetSessionHeader().GetSessionId(),
), b)
Expand All @@ -24,6 +25,7 @@ func (k Keeper) GetProof(
) (val types.Proof, found bool) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ProofKeyPrefix))

// TODO_NEXT(@bryanchriswhite #141): Refactor proof keys to support multiple indices.
b := store.Get(types.ProofKey(
sessionId,
))
Expand All @@ -38,10 +40,12 @@ func (k Keeper) GetProof(
// RemoveProof removes a proof from the store
func (k Keeper) RemoveProof(
ctx sdk.Context,
// TODO_NEXT(@bryanchriswhite #141): Refactor proof keys to support multiple indices.
index string,

) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.ProofKeyPrefix))
// TODO_NEXT(@bryanchriswhite #141): Refactor proof keys to support multiple indices.
store.Delete(types.ProofKey(
index,
))
Expand Down

0 comments on commit ef3cd99

Please sign in to comment.