Skip to content

Commit b9fb5eb

Browse files
committed
get method order fix
1 parent 07a4c6d commit b9fb5eb

7 files changed

+17
-104
lines changed

api/openapi.json

+4-14
Original file line numberDiff line numberDiff line change
@@ -6691,7 +6691,7 @@
66916691
},
66926692
"/v2/accounts/{account_id}/events/emulate": {
66936693
"post": {
6694-
"description": "Emulate sending message to blockchain",
6694+
"description": "Emulate sending message to retrieve account-specific events",
66956695
"operationId": "emulateMessageToAccountEvent",
66966696
"parameters": [
66976697
{
@@ -7546,16 +7546,6 @@
75467546
},
75477547
"type": "array"
75487548
}
7549-
},
7550-
{
7551-
"in": "query",
7552-
"name": "fix_order",
7553-
"required": false,
7554-
"schema": {
7555-
"default": true,
7556-
"description": "A temporary fix to switch to a scheme with direct ordering of arguments. \nIf equal to false, then the method takes arguments in direct order,\ne.g. for get_nft_content(int index, cell individual_content) we pass a list of arguments [index, individual_content].\nIf equal to true, then the method takes arguments in reverse order, e.g. [individual_content, index].",
7557-
"type": "boolean"
7558-
}
75597549
}
75607550
],
75617551
"responses": {
@@ -8181,7 +8171,7 @@
81818171
},
81828172
"/v2/events/emulate": {
81838173
"post": {
8184-
"description": "Emulate sending message to blockchain",
8174+
"description": "Emulate sending message to retrieve general blockchain events",
81858175
"operationId": "emulateMessageToEvent",
81868176
"parameters": [
81878177
{
@@ -10720,7 +10710,7 @@
1072010710
},
1072110711
"/v2/traces/emulate": {
1072210712
"post": {
10723-
"description": "Emulate sending message to blockchain",
10713+
"description": "Emulate sending message to retrieve with a detailed execution trace",
1072410714
"operationId": "emulateMessageToTrace",
1072510715
"parameters": [
1072610716
{
@@ -10823,7 +10813,7 @@
1082310813
},
1082410814
"/v2/wallet/emulate": {
1082510815
"post": {
10826-
"description": "Emulate sending message to blockchain",
10816+
"description": "Emulate sending message to retrieve the resulting wallet state",
1082710817
"operationId": "emulateMessageToWallet",
1082810818
"parameters": [
1082910819
{

api/openapi.yml

-11
Original file line numberDiff line numberDiff line change
@@ -428,17 +428,6 @@ paths:
428428
items:
429429
type: string
430430
example: [ "0:9a33970f617bcd71acf2cd28357c067aa31859c02820d8f01d74c88063a8f4d8" ]
431-
- name: fix_order
432-
in: query
433-
required: false
434-
schema:
435-
type: boolean
436-
description: |-
437-
A temporary fix to switch to a scheme with direct ordering of arguments.
438-
If equal to false, then the method takes arguments in direct order,
439-
e.g. for get_nft_content(int index, cell individual_content) we pass a list of arguments [index, individual_content].
440-
If equal to true, then the method takes arguments in reverse order, e.g. [individual_content, index].
441-
default: true
442431
responses:
443432
'200':
444433
description: method execution result

pkg/api/account_handlers.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ import (
1717
"go.uber.org/zap"
1818
"golang.org/x/exp/maps"
1919

20-
"github.com/tonkeeper/opentonapi/pkg/addressbook"
21-
"golang.org/x/exp/slices"
22-
2320
"github.com/cespare/xxhash/v2"
2421
"github.com/go-faster/jx"
2522
"github.com/tonkeeper/opentonapi/internal/g"
23+
"github.com/tonkeeper/opentonapi/pkg/addressbook"
2624
"github.com/tonkeeper/opentonapi/pkg/core"
2725
"github.com/tonkeeper/opentonapi/pkg/oas"
2826
"github.com/tonkeeper/tongo"
@@ -210,10 +208,6 @@ func (h *Handler) ExecGetMethodForBlockchainAccount(ctx context.Context, params
210208
}
211209
return nil, toError(http.StatusInternalServerError, err)
212210
}
213-
// TODO: remove parameter after user migration
214-
if params.FixOrder.IsSet() && params.FixOrder.Value == true && len(params.Args) > 1 {
215-
slices.Reverse(params.Args)
216-
}
217211
key, err := getMethodCacheKey(account.ID, params.MethodName, contract.LastTransactionLt, params.Args)
218212
if err != nil {
219213
return nil, toError(http.StatusInternalServerError, err)

pkg/oas/oas_handlers_gen.go

+4-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/oas/oas_parameters_gen.go

-56
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/oas/oas_server_gen.go

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/oas/oas_unimplemented_gen.go

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)