Skip to content

Commit

Permalink
fix: In gno code, change txlink.URL to txlink.Call. See the PR
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Thompson <[email protected]>
  • Loading branch information
jefft0 committed Dec 9, 2024
1 parent cbbe19f commit e87e611
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions realm/post.gno
Original file line number Diff line number Diff line change
Expand Up @@ -183,22 +183,22 @@ func (post *Post) GetURL() string {
}

func (post *Post) GetGnodFormURL() string {
return txlink.URL("AddReaction",
return txlink.Call("AddReaction",
"userPostsAddr", post.userPosts.userAddr.String(),
"threadid", post.threadID.String(),
"postid", post.id.String(),
"reaction", strconv.Itoa(int(Gnod)))
}

func (post *Post) GetReplyFormURL() string {
return txlink.URL("PostReply",
return txlink.Call("PostReply",
"userPostsAddr", post.userPosts.userAddr.String(),
"threadid", post.threadID.String(),
"postid", post.id.String())
}

func (post *Post) GetRepostFormURL() string {
return txlink.URL("RepostThread",
return txlink.Call("RepostThread",
"userPostsAddr", post.userPosts.userAddr.String(),
"threadid", post.threadID.String(),
"postid", post.id.String())
Expand Down
8 changes: 4 additions & 4 deletions realm/userposts.gno
Original file line number Diff line number Diff line change
Expand Up @@ -209,19 +209,19 @@ func (userPosts *UserPosts) GetURLFromThreadAndReplyID(threadID, replyID PostID)
}

func (userPosts *UserPosts) GetPostFormURL() string {
return txlink.URL("PostMessage")
return txlink.Call("PostMessage")
}

func (userPosts *UserPosts) GetFollowFormURL() string {
return txlink.URL("Follow", "followedAddr", userPosts.userAddr.String())
return txlink.Call("Follow", "followedAddr", userPosts.userAddr.String())
}

func (userPosts *UserPosts) GetUnfollowFormURL(followedAddr std.Address) string {
return txlink.URL("Unfollow", "followedAddr", followedAddr.String())
return txlink.Call("Unfollow", "followedAddr", followedAddr.String())
}

func (userPosts *UserPosts) GetRefreshFormURL() string {
return txlink.URL("RefreshHomePosts", "userPostsAddr", userPosts.userAddr.String())
return txlink.Call("RefreshHomePosts", "userPostsAddr", userPosts.userAddr.String())
}

// Scan userPosts.following for all posts from all followed users starting from lastRefreshId+1 .
Expand Down

0 comments on commit e87e611

Please sign in to comment.