Skip to content

Commit 998f92c

Browse files
add owner field for jetton holders method
1 parent 02c3626 commit 998f92c

8 files changed

+73
-12
lines changed

api/openapi.json

+4
Original file line numberDiff line numberDiff line change
@@ -1971,10 +1971,14 @@
19711971
"balance": {
19721972
"example": 1000000000,
19731973
"type": "string"
1974+
},
1975+
"owner": {
1976+
"$ref": "#/components/schemas/AccountAddress"
19741977
}
19751978
},
19761979
"required": [
19771980
"address",
1981+
"owner",
19781982
"balance"
19791983
],
19801984
"type": "object"

api/openapi.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4373,11 +4373,14 @@ components:
43734373
type: object
43744374
required:
43754375
- address
4376+
- owner
43764377
- balance
43774378
properties:
43784379
address:
43794380
type: string
43804381
example: 0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365
4382+
owner:
4383+
$ref: '#/components/schemas/AccountAddress'
43814384
balance:
43824385
type: string
43834386
example: 1000000000

client/oas_json_gen.go

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

client/oas_schemas_gen.go

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

pkg/api/jetton_handlers.go

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ func (h Handler) GetJettonHolders(ctx context.Context, params oas.GetJettonHolde
186186
for _, holder := range holders {
187187
results.Addresses = append(results.Addresses, oas.JettonHoldersAddressesItem{
188188
Address: holder.Address.ToRaw(),
189+
Owner: convertAccountAddress(holder.Owner, h.addressBook),
189190
Balance: holder.Balance.String(),
190191
})
191192
}

pkg/core/jetton.go

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type JettonWallet struct {
2020
type JettonHolder struct {
2121
JettonAddress tongo.AccountID
2222
Address tongo.AccountID
23+
Owner tongo.AccountID
2324
Balance decimal.Decimal
2425
}
2526

pkg/oas/oas_json_gen.go

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

pkg/oas/oas_schemas_gen.go

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

0 commit comments

Comments
 (0)