@@ -72,7 +72,24 @@ var DefaultStraws = []Merger{
72
72
}
73
73
74
74
var JettonTransferPTONStraw = Straw [BubbleJettonTransfer ]{
75
- CheckFuncs : []bubbleCheck {IsTx , HasInterface (abi .JettonWallet ), HasOperation (abi .JettonTransferMsgOp )},
75
+ CheckFuncs : []bubbleCheck {IsTx , HasInterface (abi .JettonWallet ), HasOperation (abi .JettonTransferMsgOp ), func (bubble * Bubble ) bool {
76
+ if len (bubble .Children ) != 1 {
77
+ return false
78
+ }
79
+ tx , ok := bubble .Children [0 ].Info .(BubbleTx )
80
+ if ! ok {
81
+ return false
82
+ }
83
+ _ , ok = tx .decodedBody .Value .(abi.JettonNotifyMsgBody )
84
+ if ! ok {
85
+ _ , ok = tx .decodedBody .Value .(abi.PtonTonTransferMsgBody )
86
+ if ! ok {
87
+ return false
88
+ }
89
+ return true
90
+ }
91
+ return true
92
+ }},
76
93
Builder : func (newAction * BubbleJettonTransfer , bubble * Bubble ) error {
77
94
tx := bubble .Info .(BubbleTx )
78
95
newAction .master , _ = tx .additionalInfo .JettonMaster (tx .account .Address )
@@ -86,9 +103,11 @@ var JettonTransferPTONStraw = Straw[BubbleJettonTransfer]{
86
103
newAction .recipient = & Account {Address : * recipient }
87
104
bubble .Accounts = append (bubble .Accounts , * recipient )
88
105
}
106
+ newAction .success = true
89
107
return nil
90
108
},
91
109
SingleChild : & Straw [BubbleJettonTransfer ]{
110
+ Optional : true ,
92
111
CheckFuncs : []bubbleCheck {IsTx , HasOperation (abi .JettonNotifyMsgOp )},
93
112
Builder : func (newAction * BubbleJettonTransfer , bubble * Bubble ) error {
94
113
tx := bubble .Info .(BubbleTx )
0 commit comments