Skip to content

Commit

Permalink
Add a file with the mainnet navs in them and make sure it can be pars…
Browse files Browse the repository at this point in the history
…ed properly.
  • Loading branch information
SpicyLemon committed Jul 11, 2024
1 parent 641eba2 commit 6d8d85f
Show file tree
Hide file tree
Showing 3 changed files with 212,914 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/scope_navs_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import (
metadatatypes "github.com/provenance-io/provenance/x/metadata/types"
)

const umberTestnetScopeNAVsFN = "upgrade_files/umber/testnet_scope_navs.csv"
const (
umberTestnetScopeNAVsFN = "upgrade_files/umber/testnet_scope_navs.csv"
umberMainnetScopeNAVsFN = "upgrade_files/umber/mainnet_scope_navs.csv"
)

type ScopeNAV struct {
ScopeUUID string
Expand Down
14 changes: 14 additions & 0 deletions app/scope_navs_updater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ func TestReadScopeNAVs(t *testing.T) {
Height: 23056719,
},
},
{
fileName: umberMainnetScopeNAVsFN,
expCount: 212895,
expFirst: ScopeNAV{
ScopeUUID: "a4a5173d-50e0-4f8a-a5a6-c570deb14af3",
NetAssetValue: metadatatypes.NewNetAssetValue(sdk.NewInt64Coin(metadatatypes.UsdDenom, 40475000)),
Height: 17662354,
},
expLast: ScopeNAV{
ScopeUUID: "4887e509-0c75-494e-ae01-ad9de0b44148",
NetAssetValue: metadatatypes.NewNetAssetValue(sdk.NewInt64Coin(metadatatypes.UsdDenom, 24813000)),
Height: 17662354,
},
},
}

assertEqualEntry := func(t *testing.T, expected, actual ScopeNAV, msg string, args ...interface{}) bool {
Expand Down
Loading

0 comments on commit 6d8d85f

Please sign in to comment.