Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akos-tk committed Dec 11, 2024
1 parent 4a2d6c8 commit 8d0139b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 139 deletions.
8 changes: 0 additions & 8 deletions api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3133,17 +3133,12 @@
"example": "https://cache.tonapi.io/images/extra.jpg",
"type": "string"
},
"name": {
"example": "FMS",
"type": "string"
},
"symbol": {
"example": "FMS",
"type": "string"
}
},
"required": [
"name",
"symbol",
"decimals",
"image"
Expand Down Expand Up @@ -3315,9 +3310,6 @@
"recipient": {
"$ref": "#/components/schemas/AccountAddress"
},
"refund": {
"$ref": "#/components/schemas/Refund"
},
"sender": {
"$ref": "#/components/schemas/AccountAddress"
}
Expand Down
6 changes: 0 additions & 6 deletions api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5848,14 +5848,10 @@ components:
EcPreview:
type: object
required:
- name
- symbol
- decimals
- image
properties:
name:
type: string
example: FMS
symbol:
type: string
example: FMS
Expand Down Expand Up @@ -5887,8 +5883,6 @@ components:
example: "Hi! This is your salary. \nFrom accounting with love."
encrypted_comment:
$ref: '#/components/schemas/EncryptedComment'
refund:
$ref: '#/components/schemas/Refund'
currency:
$ref: '#/components/schemas/EcPreview'
SmartContractAction:
Expand Down
7 changes: 0 additions & 7 deletions pkg/api/event_converters.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,11 @@ func (h *Handler) convertActionExtraCurrencyTransfer(t *bath.ExtraCurrencyTransf
Sender: convertAccountAddress(t.Sender, h.addressBook),
EncryptedComment: convertEncryptedComment(t.EncryptedComment),
Currency: oas.EcPreview{
Name: meta.Name,
Symbol: meta.Symbol,
Decimals: meta.Decimals,
Image: meta.Image,
},
})
if t.Refund != nil {
action.Value.Refund.SetTo(oas.Refund{
Type: oas.RefundType(t.Refund.Type),
Origin: t.Refund.Origin,
})
}
simplePreview := oas.ActionSimplePreview{
Name: "Extra Currency Transfer",
Description: "", // TODO: add description
Expand Down
7 changes: 5 additions & 2 deletions pkg/bath/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ type (
EncryptedComment *EncryptedComment
Recipient tongo.AccountID
Sender tongo.AccountID
Refund *Refund
}
SmartContractAction struct {
TonAttached int64
Expand Down Expand Up @@ -274,7 +273,7 @@ func (a Action) ContributeToExtra(account tongo.AccountID) int64 {
return 0
}
switch a.Type {
case NftItemTransfer, ContractDeploy, UnSubscription, JettonMint, JettonBurn, WithdrawStakeRequest, DomainRenew, InscriptionMint, InscriptionTransfer: // actions without extra
case NftItemTransfer, ContractDeploy, UnSubscription, JettonMint, JettonBurn, WithdrawStakeRequest, DomainRenew, InscriptionMint, InscriptionTransfer, ExtraCurrencyTransfer: // actions without extra
return 0
case TonTransfer:
return detectDirection(account, a.TonTransfer.Sender, a.TonTransfer.Recipient, a.TonTransfer.Amount)
Expand Down Expand Up @@ -351,6 +350,10 @@ func (a *TonTransferAction) SubjectAccounts() []tongo.AccountID {
return []tongo.AccountID{a.Sender, a.Recipient}
}

func (a *ExtraCurrencyTransferAction) SubjectAccounts() []tongo.AccountID {
return []tongo.AccountID{a.Sender, a.Recipient}
}

func (a *SmartContractAction) SubjectAccounts() []tongo.AccountID {
return []tongo.AccountID{a.Contract, a.Executor}
}
Expand Down
58 changes: 12 additions & 46 deletions pkg/oas/oas_json_gen.go

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

22 changes: 0 additions & 22 deletions pkg/oas/oas_schemas_gen.go

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

48 changes: 0 additions & 48 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 8d0139b

Please sign in to comment.