mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-11-24 14:35:47 +00:00
fix: do not try to notarize liquid asset here (#250)
Actually error in case of error. Signed-off-by: Julian Strobl <jmastr@mailbox.org>
This commit is contained in:
parent
fd73ef87a7
commit
a71f3d7f2a
@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/planetmint/planetmint-go/testutil/sample"
|
"github.com/planetmint/planetmint-go/testutil/sample"
|
||||||
|
|
||||||
clitestutil "github.com/planetmint/planetmint-go/testutil/cli"
|
clitestutil "github.com/planetmint/planetmint-go/testutil/cli"
|
||||||
|
assettypes "github.com/planetmint/planetmint-go/x/asset/types"
|
||||||
machinetypes "github.com/planetmint/planetmint-go/x/machine/types"
|
machinetypes "github.com/planetmint/planetmint-go/x/machine/types"
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/crypto/hd"
|
"github.com/cosmos/cosmos-sdk/crypto/hd"
|
||||||
@ -109,17 +110,16 @@ func (s *E2ETestSuite) TestNotarizeAsset() {
|
|||||||
s.Require().NoError(err)
|
s.Require().NoError(err)
|
||||||
|
|
||||||
addr, _ := k.GetAddress()
|
addr, _ := k.GetAddress()
|
||||||
liquidAsset := machinetypes.LiquidAsset{}
|
|
||||||
|
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
name string
|
name string
|
||||||
msg *machinetypes.MsgNotarizeLiquidAsset
|
msg *assettypes.MsgNotarizeAsset
|
||||||
rawLog string
|
rawLog string
|
||||||
expectCheckTxErr bool
|
expectCheckTxErr bool
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
"valid notarization",
|
"valid notarization",
|
||||||
machinetypes.NewMsgNotarizeLiquidAsset(addr.String(), &liquidAsset),
|
assettypes.NewMsgNotarizeAsset(addr.String(), sample.Asset()),
|
||||||
"[]",
|
"[]",
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
@ -134,9 +134,9 @@ func (s *E2ETestSuite) TestNotarizeAsset() {
|
|||||||
|
|
||||||
s.Require().NoError(s.network.WaitForNextBlock())
|
s.Require().NoError(s.network.WaitForNextBlock())
|
||||||
rawLog, err := clitestutil.GetRawLogFromTxOut(val, out)
|
rawLog, err := clitestutil.GetRawLogFromTxOut(val, out)
|
||||||
|
s.Require().NoError(err)
|
||||||
|
|
||||||
if !tc.expectCheckTxErr {
|
if !tc.expectCheckTxErr {
|
||||||
s.Require().NoError(err)
|
|
||||||
assert.Contains(s.T(), rawLog, tc.rawLog)
|
assert.Contains(s.T(), rawLog, tc.rawLog)
|
||||||
} else {
|
} else {
|
||||||
assert.Contains(s.T(), txResponse.RawLog, tc.rawLog)
|
assert.Contains(s.T(), txResponse.RawLog, tc.rawLog)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user