Skip to content

Commit

Permalink
[2137]: Update the comments related to #2160.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpicyLemon committed Oct 1, 2024
1 parent 5f0b18b commit 5ca0f19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions x/exchange/keeper/fulfillment.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func (k Keeper) recordNAVs(ctx sdk.Context, marketID uint32, navs []exchange.Net
k.emitEvent(ctx, &metadatatypes.EventSetNetAssetValue{
ScopeId: strings.TrimPrefix(nav.Assets.Denom, metadatatypes.DenomPrefix),
Price: nav.Price.String(),
// Volume: nav.Assets.Amount.String(), TODO[2137]: Uncomment once https://github.com/provenance-io/provenance/pull/2160 has merged.
// Volume: nav.Assets.Amount.String(), TODO[2160]: Uncomment once https://github.com/provenance-io/provenance/pull/2160 has merged.
Source: source,
})
} else {
Expand All @@ -366,7 +366,7 @@ func (k Keeper) recordNAVs(ctx sdk.Context, marketID uint32, navs []exchange.Net
}
metadataNAV := metadatatypes.NetAssetValue{
Price: nav.Price,
// Volume: nav.Assets.Amount.Uint64(), TODO[2137]: Uncomment once https://github.com/provenance-io/provenance/pull/2160 has merged.
// Volume: nav.Assets.Amount.Uint64(), TODO[2160]: Uncomment once https://github.com/provenance-io/provenance/pull/2160 has merged.
}
metadataNAVs[nav.Assets.Denom] = append(metadataNAVs[nav.Assets.Denom], metadataNAV)
} else {
Expand Down Expand Up @@ -441,7 +441,7 @@ func (k Keeper) emitMetadataNAVEvents(ctx sdk.Context, denom string, navs []meta
ScopeId: denom,
Price: nav.Price.String(),
Source: source,
// TODO[2153]: Add Volume once https://github.com/provenance-io/provenance/pull/2160 has merged.
// TODO[2160]: Add Volume once https://github.com/provenance-io/provenance/pull/2160 has merged.
}
}
k.emitEvents(ctx, events)
Expand All @@ -456,7 +456,7 @@ func (k Keeper) GetNav(ctx sdk.Context, assetsDenom, priceDenom string) *exchang
return nil
}
return &exchange.NetAssetPrice{
Assets: sdk.Coin{Denom: assetsDenom, Amount: sdkmath.NewIntFromUint64(1)}, // TODO[2137]: Switch to nav.Volume once https://github.com/provenance-io/provenance/pull/2160 has merged.
Assets: sdk.Coin{Denom: assetsDenom, Amount: sdkmath.NewIntFromUint64(1)}, // TODO[2160]: Switch to nav.Volume once https://github.com/provenance-io/provenance/pull/2160 has merged.
Price: nav.Price,
}
}
Expand Down
4 changes: 2 additions & 2 deletions x/metadata/keeper/scope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3314,7 +3314,7 @@ func (s *ScopeKeeperTestSuite) TestGetNetAssetValue() {
priceDenomOK := "aokay"
okNAV := types.NetAssetValue{
Price: sdk.NewInt64Coin(priceDenomOK, 987_123_654),
// TODO[2153]: Add Volume once https://github.com/provenance-io/provenance/pull/2160 has merged.
// TODO[2160]: Add Volume once https://github.com/provenance-io/provenance/pull/2160 has merged.
}

setupStore := func() {
Expand Down Expand Up @@ -3381,7 +3381,7 @@ func (s *ScopeKeeperTestSuite) TestGetNetAssetValue() {
if !s.Assert().Equal(tc.expNAV, actNAV, "NAV returned from GetNetAssetValue") && tc.expNAV != nil && actNAV != nil {
s.Assert().Equal(tc.expNAV.Price.String(), actNAV.Price.String(), "NAV.Price (string)")
s.Assert().Equal(fmt.Sprintf("%d", tc.expNAV.UpdatedBlockHeight), fmt.Sprintf("%d", actNAV.UpdatedBlockHeight), "UpdatedBlockHeight (string)")
// TODO[2153]: Add Volume once https://github.com/provenance-io/provenance/pull/2160 has merged.
// TODO[2160]: Add Volume once https://github.com/provenance-io/provenance/pull/2160 has merged.
}
})
}
Expand Down

0 comments on commit 5ca0f19

Please sign in to comment.