From f0f055153473ae44fd31a449f37a6f41a920a0ca Mon Sep 17 00:00:00 2001 From: jinuk Date: Mon, 27 Nov 2023 17:24:53 +0900 Subject: [PATCH] Modify test file by adding PayloadJson to Tx --- types/jsonrpc/tx_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/jsonrpc/tx_test.go b/types/jsonrpc/tx_test.go index 7db41b674..a7f3fe122 100644 --- a/types/jsonrpc/tx_test.go +++ b/types/jsonrpc/tx_test.go @@ -57,9 +57,9 @@ func TestParseBase58TxBody(t *testing.T) { func TestParseTx(t *testing.T) { testTx := &types.Tx{Body: &types.TxBody{Payload: []byte(`{"Name":"v1createName","Args":["honggildong3"]}`)}} result := MarshalJSON(ConvTx(testTx, Base58)) - assert.Equal(t, "{\n \"body\": {\n \"payload\": \"22MZAFWvxtVWehpgwEVxrvoqGL5xmcPmyLBiwraDfxRwKUNrV9tmhuB7Uu6ZeJWvp\"\n }\n}", result, "") + assert.Equal(t, "{\n \"body\": {\n \"payload\": \"22MZAFWvxtVWehpgwEVxrvoqGL5xmcPmyLBiwraDfxRwKUNrV9tmhuB7Uu6ZeJWvp\",\n \"payloadJson\": {}\n }\n}", result, "") result = MarshalJSON(ConvTx(testTx, Raw)) - assert.Equal(t, "{\n \"body\": {\n \"payload\": \"{\\\"Name\\\":\\\"v1createName\\\",\\\"Args\\\":[\\\"honggildong3\\\"]}\"\n }\n}", result, "") + assert.Equal(t, "{\n \"body\": {\n \"payload\": \"{\\\"Name\\\":\\\"v1createName\\\",\\\"Args\\\":[\\\"honggildong3\\\"]}\",\n \"payloadJson\": {}\n }\n}", result, "") } func TestConvTxBody(t *testing.T) {