66 "testing"
77
88 sdk "github.com/cosmos/cosmos-sdk/types"
9+ "github.com/dfinance/glav"
910 "github.com/stretchr/testify/require"
1011
1112 "github.com/dfinance/dnode/x/ccstorage/internal/types"
@@ -20,10 +21,8 @@ func TestCCSKeeper_CreateCurrency(t *testing.T) {
2021 ctx , keeper := input .ctx , input .keeper
2122
2223 params := types.CurrencyParams {
23- Denom : "test" ,
24- Decimals : 8 ,
25- BalancePathHex : "010203" ,
26- InfoPathHex : "AABBCC" ,
24+ Denom : "test" ,
25+ Decimals : 8 ,
2726 }
2827 denom := params .Denom
2928
@@ -38,8 +37,6 @@ func TestCCSKeeper_CreateCurrency(t *testing.T) {
3837 require .Equal (t , denom , currency .Denom )
3938 require .EqualValues (t , params .Decimals , currency .Decimals )
4039 require .True (t , currency .Supply .IsZero ())
41- require .Equal (t , params .BalancePathHex , currency .BalancePathHex )
42- require .Equal (t , params .InfoPathHex , currency .InfoPathHex )
4340 require .True (t , keeper .HasCurrency (ctx , denom ))
4441
4542 // check currencyInfo
@@ -52,10 +49,8 @@ func TestCCSKeeper_CreateCurrency(t *testing.T) {
5249 require .False (t , curInfo .IsToken )
5350
5451 // check VM paths
55- curBalancePath , err := keeper .GetCurrencyBalancePath (ctx , denom )
56- require .NoError (t , err )
57- curInfoPath , err := keeper .GetCurrencyInfoPath (ctx , denom )
58- require .NoError (t , err )
52+ curBalancePath := glav .BalanceVector (denom )
53+ curInfoPath := glav .CurrencyInfoVector (denom )
5954
6055 require .EqualValues (t , currency .BalancePath (), curBalancePath )
6156 require .EqualValues (t , currency .InfoPath (), curInfoPath )
@@ -77,10 +72,8 @@ func TestCCSKeeper_GetCurrency(t *testing.T) {
7772
7873 // create currency
7974 params := types.CurrencyParams {
80- Denom : "test" ,
81- Decimals : uint8 (8 ),
82- BalancePathHex : "010203" ,
83- InfoPathHex : "AABBCC" ,
75+ Denom : "test" ,
76+ Decimals : uint8 (8 ),
8477 }
8578 denom := params .Denom
8679
@@ -117,10 +110,8 @@ func TestCCSKeeper_Supply(t *testing.T) {
117110 // create currency
118111 curAmount := sdk .ZeroInt ()
119112 params := types.CurrencyParams {
120- Denom : "test" ,
121- Decimals : uint8 (8 ),
122- BalancePathHex : "010203" ,
123- InfoPathHex : "AABBCC" ,
113+ Denom : "test" ,
114+ Decimals : uint8 (8 ),
124115 }
125116 denom := params .Denom
126117
0 commit comments