From 47d8f0f2039f01635e67e69c999f3b1d869d5486 Mon Sep 17 00:00:00 2001 From: Mark Cherepovskyi Date: Tue, 3 Sep 2024 11:14:52 +0300 Subject: [PATCH] unwrap contract address --- x/rarimocore/crypto/pkg/op_passport_root_update.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x/rarimocore/crypto/pkg/op_passport_root_update.go b/x/rarimocore/crypto/pkg/op_passport_root_update.go index 11c76428..8421be3c 100644 --- a/x/rarimocore/crypto/pkg/op_passport_root_update.go +++ b/x/rarimocore/crypto/pkg/op_passport_root_update.go @@ -7,6 +7,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/rarimo/rarimo-core/x/rarimocore/crypto/operation" "github.com/rarimo/rarimo-core/x/rarimocore/types" + "math/big" ) func GetPassportRootUpdate(operation types.Operation) (*types.PassportRootUpdate, error) { @@ -19,8 +20,8 @@ func GetPassportRootUpdate(operation types.Operation) (*types.PassportRootUpdate func GetPassportRootUpdateContent(op *types.PassportRootUpdate) (*operation.PassportRootUpdateContent, error) { return &operation.PassportRootUpdateContent{ - ContractAddress: operation.To32Bytes(hexutil.MustDecode(op.ContractAddress)), + ContractAddress: hexutil.MustDecode(op.ContractAddress), Root: operation.To32Bytes(hexutil.MustDecode(op.Root)), - RootTimestamp: operation.IntTo32Bytes(int(op.Timestamp)), + RootTimestamp: operation.To32Bytes(new(big.Int).SetInt64(op.Timestamp).Bytes()), }, nil }