From e0997a50166bc3291e2d3ee3fb8f1ffddd947b46 Mon Sep 17 00:00:00 2001 From: gfanton <8671905+gfanton@users.noreply.github.com> Date: Wed, 15 May 2024 16:58:00 +0200 Subject: [PATCH] chore: typo and comments update Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com> --- gnovm/pkg/gnoamino/packages.go | 2 +- gnovm/pkg/gnoamino/value_wrapper.go | 6 +++--- gnovm/pkg/gnoamino/value_wrapper_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gnovm/pkg/gnoamino/packages.go b/gnovm/pkg/gnoamino/packages.go index 40e61a5957e..0c8ef2585f1 100644 --- a/gnovm/pkg/gnoamino/packages.go +++ b/gnovm/pkg/gnoamino/packages.go @@ -7,5 +7,5 @@ var Package = amino.RegisterPackage(amino.NewPackage( "gno", amino.GetCallersDirname(), ).WithDependencies().WithTypes( - &TypedValueWrapper{}, "gno_value", + &TypedValueWrapper{}, "t_value", )) diff --git a/gnovm/pkg/gnoamino/value_wrapper.go b/gnovm/pkg/gnoamino/value_wrapper.go index 2fc67abebbd..ed78666bc0e 100644 --- a/gnovm/pkg/gnoamino/value_wrapper.go +++ b/gnovm/pkg/gnoamino/value_wrapper.go @@ -1,10 +1,10 @@ -// Most of the methods here are inspired by `gnonative.go` but are now included here for specific reasons: +// Most of the methods here are inspired or copied from `gnonative.go`. They are exported here for several reasons: // - Methods in `gnonative` are meant for general use and may be removed later, while here they are focused // on marshaling and unmarshaling only. // - These methods should be simpler as they don't require the full support of reflection, enabling a more // detailed implementation. -// - We expect familiarity with the TypedValue type, making its handling easier. -// - We will probably implement Gas comsumtion within those methods. +// - We assume prior knowledge of the type of the TypedValue, simplifying its management. +// - We will likely implement gas consumption calculations within those methods. package gnoamino import ( diff --git a/gnovm/pkg/gnoamino/value_wrapper_test.go b/gnovm/pkg/gnoamino/value_wrapper_test.go index 80e7d9c901d..2bb915359e6 100644 --- a/gnovm/pkg/gnoamino/value_wrapper_test.go +++ b/gnovm/pkg/gnoamino/value_wrapper_test.go @@ -238,7 +238,7 @@ func TestTypedValueMarshalJSON_Struct(t *testing.T) { }) t.Run("Marshal", func(t *testing.T) { - raw, err := amino.MarshalJSON(mv) + raw, err := amino.MarshalJSONAny(mv) require.NoError(t, err) assert.Equal(t, tc.Expected, string(raw)) })