From dc9f6a73aa087f3a42ff43fef36a4e937310b046 Mon Sep 17 00:00:00 2001 From: RustamOper05 Date: Mon, 15 Jan 2024 23:09:10 +0300 Subject: [PATCH] fix types convert --- Post/post_contract.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Post/post_contract.go b/Post/post_contract.go index ebf1878..ca709fb 100755 --- a/Post/post_contract.go +++ b/Post/post_contract.go @@ -1,8 +1,6 @@ package Post import ( - "strconv" - "github.com/nspcc-dev/neo-go/pkg/interop/native/oracle" "github.com/nspcc-dev/neo-go/pkg/interop/native/std" "github.com/nspcc-dev/neo-go/pkg/interop/runtime" @@ -56,7 +54,7 @@ func CbGetUUID(url string, postData any, code int, result []byte) { panic("not called from the oracle contract") } if code != oracle.Success { - panic("request failed for " + url + " with code " + std.Itoa(code, 10)) + panic("request failed for " + url + " with code " + std.Itoa10(code)) } runtime.Log("result for " + url + " is: " + string(result)) @@ -94,7 +92,7 @@ func GetAllPostsByUser(userId string) []Post { i := 0 n := getPostIndex(userId) for i < n { - post := storage.Get(ctx, userId+strconv.Itoa(i)) + post := storage.Get(ctx, userId+std.Itoa10(i)) i++ postsByUser = append(postsByUser, std.Deserialize(post.([]byte)).(Post)) }