Skip to content

Commit

Permalink
Merge pull request #75 from make-software/fix/write-account
Browse files Browse the repository at this point in the history
Fixed write account transform
  • Loading branch information
Volodymyr-Kuchinskyi authored Jan 26, 2024
2 parents 073e6e6 + 116a615 commit b1f5443
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ func (t *Transform) IsWriteAccount() bool {

func (t *Transform) ParseAsWriteAccount() (key.AccountHash, error) {
type RawWriteAccountTransform struct {
key.AccountHash `json:"WriteAccount"`
WriteAccount key.AccountHash `json:"WriteAccount"`
}

jsonRes := RawWriteAccountTransform{}
if err := json.Unmarshal(*t, &jsonRes); err != nil {
return key.AccountHash{}, err
}

return jsonRes.AccountHash, nil
return jsonRes.WriteAccount, nil
}

func (t *Transform) IsWriteContract() bool {
Expand Down

0 comments on commit b1f5443

Please sign in to comment.