Skip to content

Commit

Permalink
improve multisigs and mintless jettons
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tron committed Sep 16, 2024
1 parent 96a0ed0 commit 88f04f1
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 11 deletions.
19 changes: 18 additions & 1 deletion api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3783,6 +3783,9 @@
"format": "address",
"type": "string"
},
"custom_payload_api_uri": {
"type": "string"
},
"decimals": {
"example": 9,
"type": "integer"
Expand Down Expand Up @@ -4321,6 +4324,10 @@
"format": "int32",
"type": "integer"
},
"creation_date": {
"format": "int64",
"type": "integer"
},
"expiration_date": {
"format": "int64",
"type": "integer"
Expand All @@ -4337,6 +4344,14 @@
"example": false,
"type": "boolean"
},
"signed_by": {
"items": {
"example": "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf",
"format": "address",
"type": "string"
},
"type": "array"
},
"signers": {
"items": {
"example": "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf",
Expand All @@ -4358,7 +4373,9 @@
"signers",
"approvals_num",
"expiration_date",
"risk"
"risk",
"creation_date",
"signed_by"
],
"type": "object"
},
Expand Down
13 changes: 13 additions & 0 deletions api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5345,6 +5345,8 @@ components:
example: https://cache.tonapi.io/images/jetton.jpg
verification:
$ref: '#/components/schemas/JettonVerificationType'
custom_payload_api_uri: # todo: maybe remove
type: string
JettonBalance:
type: object
required:
Expand Down Expand Up @@ -5574,6 +5576,8 @@ components:
- approvals_num
- expiration_date
- risk
- creation_date
- signed_by
properties:
address:
type: string
Expand Down Expand Up @@ -5603,6 +5607,15 @@ components:
format: int64
risk:
$ref: '#/components/schemas/Risk'
creation_date:
type: integer
format: int64
signed_by:
type: array
items:
type: string
format: address
example: "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf"
Refund:
type: object
required:
Expand Down
1 change: 1 addition & 0 deletions pkg/api/converters.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ func (h *Handler) convertMultisig(ctx context.Context, item core.Multisig) (*oas
Signers: signers,
ApprovalsNum: order.ApprovalsNum,
ExpirationDate: order.ExpirationDate,
CreationDate: order.CreationDate,
Risk: oasRisk,
})
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/api/jetton_converters.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ func jettonPreview(master ton.AccountID, meta NormalizedMetadata) oas.JettonPrev
Decimals: meta.Decimals,
Image: meta.Image,
}
if meta.CustomPayloadApiUri != "" {
preview.CustomPayloadAPIURI = oas.NewOptString(meta.CustomPayloadApiUri)
}
return preview
}

Expand Down
1 change: 1 addition & 0 deletions pkg/core/multisig.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ type MultisigOrder struct {
ApprovalsMask []byte
ApprovalsNum int32
ExpirationDate int64
CreationDate int64
Actions []abi.MultisigSendMessageAction
}
72 changes: 68 additions & 4 deletions pkg/oas/oas_json_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 39 additions & 6 deletions pkg/oas/oas_schemas_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions pkg/oas/oas_validators_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 88f04f1

Please sign in to comment.