Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gmsui/transactions/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ func (txb *Transaction) resolveFunctionArguments(inputArguments []interface{}, r
unresolvedParameter.Objects[idx] = UnresolvedObject{Mutable: false, ObjectId: inputArguments[idx].(string)}
case reflect.TypeOf(types.SuiMoveNormalizedType_MutableReference{}):
unresolvedParameter.Objects[idx] = UnresolvedObject{Mutable: true, ObjectId: inputArguments[idx].(string)}
case reflect.TypeOf(types.SuiMoveNormalizedType_Struct{}):
unresolvedParameter.Objects[idx] = UnresolvedObject{Mutable: false, ObjectId: inputArguments[idx].(string)}
default:
return nil, fmt.Errorf("function parameter [%v] is not supported at index %d", reflectParameter.Type(), idx)
}
Expand Down Expand Up @@ -427,7 +429,7 @@ func objectResponseToObjectArg(data *types.SuiObjectResponse, mutable bool) (*su
}
default:
// Other object: set the version and digest
objectRef, err := ObjectStringRef{ObjectId: data.Data.ObjectId, Version: data.Data.Version, Digest: data.Data.Digest}.toObjectRef()
objectRef, err := ObjectStringRef{ObjectId: data.Data.ObjectId, Version: data.Data.Version, Digest: data.Data.Digest}.ToObjectRef()
if err != nil {
return nil, fmt.Errorf("can not convert object ref: %v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions gmsui/transactions/object_ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type ObjectStringRef struct {
Digest string `json:"digest"`
}

func (ref ObjectStringRef) toObjectRef() (*sui_types.ObjectRef, error) {
func (ref ObjectStringRef) ToObjectRef() (*sui_types.ObjectRef, error) {
objectId, err := sui_types.NewObjectIdFromHex(ref.ObjectId)
if err != nil {
return nil, fmt.Errorf("can not create object id from hex [%s]: %v", ref.ObjectId, err)
Expand All @@ -32,5 +32,5 @@ func (ref ObjectStringRef) toObjectRef() (*sui_types.ObjectRef, error) {
}

func coinStructToObjectRef(coin types.CoinStruct) (*sui_types.ObjectRef, error) {
return ObjectStringRef{ObjectId: coin.CoinObjectId, Version: coin.Version, Digest: coin.Digest}.toObjectRef()
return ObjectStringRef{ObjectId: coin.CoinObjectId, Version: coin.Version, Digest: coin.Digest}.ToObjectRef()
}