Skip to content

Commit

Permalink
Merge pull request #37 from rarimo/fix/passport-signature-rootupdater
Browse files Browse the repository at this point in the history
unwrap contract address
  • Loading branch information
MarkCherepovskyi authored Sep 3, 2024
2 parents aad5a9d + 47d8f0f commit 9587946
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions x/rarimocore/crypto/pkg/op_passport_root_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
}

0 comments on commit 9587946

Please sign in to comment.