Skip to content

Commit 1d1dac1

Browse files
committed
itest: update asset meta decimal display itest
We now allow a user to not specify an asset meta, but specify a decimal display.
1 parent d630fa1 commit 1d1dac1

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

itest/asset_meta_test.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -197,18 +197,9 @@ func testMintAssetWithDecimalDisplayMetaField(t *harnessTest) {
197197
_, err = t.tapd.MintAsset(ctxt, secondAssetReq)
198198
require.ErrorContains(t.t, err, "decimal display does not match")
199199

200-
// Requesting a decimal display without specifying the metadata field
201-
// with at least the type should fail.
202-
secondAssetReq.Asset.DecimalDisplay = firstAsset.DecimalDisplay
203-
secondAssetReq.Asset.AssetMeta = nil
204-
205-
_, err = t.tapd.MintAsset(ctxt, secondAssetReq)
206-
require.ErrorContains(
207-
t.t, err, "decimal display requires asset metadata",
208-
)
209-
210200
// Attempting to set a different decimal display in the JSON meta data
211201
// as in the new RPC request field should give us an error as well.
202+
secondAssetReq.Asset.DecimalDisplay = firstAsset.DecimalDisplay
212203
secondAssetReq.Asset.AssetMeta = &taprpc.AssetMeta{
213204
Type: taprpc.AssetMetaType_META_TYPE_JSON,
214205
Data: []byte(`{"foo": "bar", "decimal_display": 3}`),

0 commit comments

Comments
 (0)