Skip to content

Commit e2fa490

Browse files
committed
itest: test empty meta, and empty meta w/ dec display in testAssetMeta
1 parent 33b94a9 commit e2fa490

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

itest/asset_meta_test.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,31 @@ func testAssetMeta(t *harnessTest) {
8484
},
8585
},
8686
},
87+
88+
// A mint request that doesn't specify asset meta at all should
89+
// be permitted.
90+
{
91+
asset: &mintrpc.MintAssetRequest{
92+
Asset: &mintrpc.MintAsset{
93+
AssetType: taprpc.AssetType_NORMAL,
94+
Name: "no meta",
95+
Amount: 5000,
96+
},
97+
},
98+
},
99+
100+
// A user should also be able to specify a decimal display, but
101+
// not actually specify an asset meta at all.
102+
{
103+
asset: &mintrpc.MintAssetRequest{
104+
Asset: &mintrpc.MintAsset{
105+
AssetType: taprpc.AssetType_NORMAL,
106+
Name: "dec display",
107+
Amount: 5000,
108+
DecimalDisplay: 6,
109+
},
110+
},
111+
},
87112
}
88113

89114
ctxb := context.Background()

0 commit comments

Comments
 (0)