Skip to content

Commit

Permalink
Refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
DariuszDepta committed Oct 12, 2023
1 parent 29d10f3 commit 99ade09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 0 additions & 6 deletions t.sh

This file was deleted.

5 changes: 4 additions & 1 deletion x/wasm/keeper/addresses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ import (
)

func TestBuildContractAddressClassic(t *testing.T) {
// preserve current Bech32 settings and make sure they will be restores when this test finishes
// preserve current Bech32 settings and restore them after test completion
x, y := sdk.GetConfig().GetBech32AccountAddrPrefix(), sdk.GetConfig().GetBech32AccountPubPrefix()
t.Cleanup(func() {
sdk.GetConfig().SetBech32PrefixForAccount(x, y)
})

// set custom Bech32 settings
sdk.GetConfig().SetBech32PrefixForAccount("purple", "purple")

// prepare test data
Expand All @@ -32,6 +34,7 @@ func TestBuildContractAddressClassic(t *testing.T) {
var specs []Spec
require.NoError(t, json.Unmarshal([]byte(goldenMasterClassicContractAddr), &specs))
require.NotEmpty(t, specs)

// run test on prepared test data
for i, spec := range specs {
t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) {
Expand Down

0 comments on commit 99ade09

Please sign in to comment.