From 3fc93dd59b0e3b3659850fcad95662e30d5c5fc3 Mon Sep 17 00:00:00 2001 From: Victoria Erokhina Date: Wed, 18 Sep 2024 21:56:38 +0000 Subject: [PATCH] Refactor --- pkg/api/event_converters.go | 32 +++++------ pkg/bath/actions.go | 2 +- pkg/bath/bath_test.go | 1 + pkg/bath/intentions.go | 54 +++++++++++++------ pkg/bath/testdata/buy-nft-on-fragment.json | 6 +-- pkg/bath/testdata/cut-jetton-transfer.json | 2 +- pkg/bath/testdata/dedust-swap-from-ton.json | 2 +- pkg/bath/testdata/dedust-swap-jettons.json | 4 +- pkg/bath/testdata/dedust-swap-to-ton.json | 2 +- pkg/bath/testdata/deploy-contract.json | 4 +- pkg/bath/testdata/deposit-liquid-staking.json | 6 +-- pkg/bath/testdata/disintar-nft-purchase.json | 8 +-- pkg/bath/testdata/domain-renew.json | 4 +- pkg/bath/testdata/encrypted-comment.json | 4 +- pkg/bath/testdata/failed-dedust-swap.json | 2 +- pkg/bath/testdata/failed-simple-transfer.json | 2 +- pkg/bath/testdata/getgems-nft-purchase.json | 10 ++-- pkg/bath/testdata/getgetms-cancel-sale.json | 4 +- pkg/bath/testdata/governance_jetton_mint.json | 12 ++--- pkg/bath/testdata/ihr-fee.json | 2 +- .../jetton-transfer-to-another-person.json | 4 +- .../testdata/jetton-transfer-to-myself.json | 2 +- .../liquid-withdraw-pending-request.json | 4 +- pkg/bath/testdata/megatonfi-swap.json | 4 +- .../testdata/multiple-call-contracts.json | 14 ++--- pkg/bath/testdata/nft-transfer.json | 2 +- pkg/bath/testdata/simple-transfer.json | 2 +- .../testdata/simple-transfers-one-failed.json | 4 +- pkg/bath/testdata/stonfi-failed-swap.json | 2 +- pkg/bath/testdata/stonfi-purchase-jUSDT.json | 2 +- pkg/bath/testdata/stonfi-swap-jUSDT-STON.json | 4 +- pkg/bath/testdata/subscription-init.json | 4 +- .../testdata/subscription-prolongation.json | 2 +- pkg/bath/testdata/telemint-deploy.json | 4 +- pkg/bath/testdata/tf-nominator-deposit.json | 2 +- ...f-nominator-process-withdraw-requests.json | 6 +-- .../tf-nominator-request-a-withdraw.json | 2 +- .../testdata/tf-update-validator-set.json | 4 +- pkg/bath/testdata/tonstake-withdraw.json | 2 +- pkg/bath/testdata/wton-mint.json | 2 +- 40 files changed, 127 insertions(+), 108 deletions(-) diff --git a/pkg/api/event_converters.go b/pkg/api/event_converters.go index d5d3886b..4158d228 100644 --- a/pkg/api/event_converters.go +++ b/pkg/api/event_converters.go @@ -122,7 +122,7 @@ func signedValue(value string, viewer *tongo.AccountID, source, destination tong return value } -func (h *Handler) convertActionTonTransfer(t *bath.TonTransferAction, acceptLanguage string, viewer *tongo.AccountID, actionDescription *string) (oas.OptTonTransferAction, oas.ActionSimplePreview) { +func (h *Handler) convertActionTonTransfer(t *bath.TonTransferAction, acceptLanguage string, viewer *tongo.AccountID) (oas.OptTonTransferAction, oas.ActionSimplePreview) { var action oas.OptTonTransferAction action.SetTo(oas.TonTransferAction{ @@ -139,23 +139,19 @@ func (h *Handler) convertActionTonTransfer(t *bath.TonTransferAction, acceptLang }) } value := i18n.FormatTONs(t.Amount) - description := i18n.T(acceptLanguage, i18n.C{ - DefaultMessage: &i18n.M{ - ID: "tonTransferAction", - Other: "Transferring {{.Value}}", - }, - TemplateData: i18n.Template{ - "Value": value, - }, - }) - if actionDescription != nil { - description = *actionDescription - } simplePreview := oas.ActionSimplePreview{ - Name: "Ton Transfer", - Description: description, - Accounts: distinctAccounts(viewer, h.addressBook, &t.Sender, &t.Recipient), - Value: oas.NewOptString(value), + Name: "Ton Transfer", + Description: i18n.T(acceptLanguage, i18n.C{ + DefaultMessage: &i18n.M{ + ID: "tonTransferAction", + Other: "Transferring {{.Value}}", + }, + TemplateData: i18n.Template{ + "Value": value, + }, + }), + Accounts: distinctAccounts(viewer, h.addressBook, &t.Sender, &t.Recipient), + Value: oas.NewOptString(value), } return action, simplePreview } @@ -436,7 +432,7 @@ func (h *Handler) convertAction(ctx context.Context, viewer *tongo.AccountID, a } switch a.Type { case bath.TonTransfer: - action.TonTransfer, action.SimplePreview = h.convertActionTonTransfer(a.TonTransfer, acceptLanguage.Value, viewer, a.Description) + action.TonTransfer, action.SimplePreview = h.convertActionTonTransfer(a.TonTransfer, acceptLanguage.Value, viewer) case bath.NftItemTransfer: action.NftItemTransfer, action.SimplePreview = h.convertActionNftTransfer(a.NftItemTransfer, acceptLanguage.Value, viewer) case bath.JettonTransfer: diff --git a/pkg/bath/actions.go b/pkg/bath/actions.go index 91c2e13d..707117f3 100644 --- a/pkg/bath/actions.go +++ b/pkg/bath/actions.go @@ -90,7 +90,7 @@ type ( InscriptionTransfer *InscriptionTransferAction `json:",omitempty"` Success bool Type ActionType - Description *string + Error *string BaseTransactions []ton.Bits256 } TonTransferAction struct { diff --git a/pkg/bath/bath_test.go b/pkg/bath/bath_test.go index 3108f70d..6254e1cc 100644 --- a/pkg/bath/bath_test.go +++ b/pkg/bath/bath_test.go @@ -428,6 +428,7 @@ func TestFindActions(t *testing.T) { WithStraws(straws), WithInformationSource(source)) require.Nil(t, err) + actionsList = EnrichWithIntentions(trace, actionsList) results := result{ Actions: actionsList.Actions, } diff --git a/pkg/bath/intentions.go b/pkg/bath/intentions.go index 8479c646..2227c445 100644 --- a/pkg/bath/intentions.go +++ b/pkg/bath/intentions.go @@ -17,8 +17,11 @@ type OutMessage struct { } func EnrichWithIntentions(trace *core.Trace, actions *ActionsList) *ActionsList { - var outMessages []OutMessage - extractIntentions(trace, &outMessages) + outMessages, inMsgCount := extractIntentions(trace) + if len(outMessages) <= inMsgCount { + return actions + } + outMessages = removeMatchedIntentions(trace, &outMessages) for _, outMsg := range outMessages { newAction := createActionFromMessage(outMsg) added := false @@ -36,17 +39,40 @@ func EnrichWithIntentions(trace *core.Trace, actions *ActionsList) *ActionsList return actions } -func extractIntentions(trace *core.Trace, outMessages *[]OutMessage) { - *outMessages = append(*outMessages, getOutMessages(&trace.Transaction)...) - for _, child := range trace.Children { - for i, outMsg := range *outMessages { - if isMatch(outMsg, child.Transaction.InMsg) { - // remove this outgoing message - *outMessages = append((*outMessages)[:i], (*outMessages)[i+1:]...) +func extractIntentions(trace *core.Trace) ([]OutMessage, int) { + var outMessages []OutMessage + var inMsgCount int + + var getIntentions func(*core.Trace) + getIntentions = func(trace *core.Trace) { + outMessages = append(outMessages, getOutMessages(&trace.Transaction)...) + for _, child := range trace.Children { + if child.InMsg != nil { + inMsgCount += 1 + } + getIntentions(child) + } + } + getIntentions(trace) + + return outMessages, inMsgCount +} + +func removeMatchedIntentions(trace *core.Trace, intentions *[]OutMessage) []OutMessage { + var matchAndRemove func(*core.Trace) + matchAndRemove = func(trace *core.Trace) { + for _, child := range trace.Children { + for i, outMsg := range *intentions { + if isMatch(outMsg, child.Transaction.InMsg) { + // remove this outgoing message + *intentions = append((*intentions)[:i], (*intentions)[i+1:]...) + } } + matchAndRemove(child) } - extractIntentions(child, outMessages) } + matchAndRemove(trace) + return *intentions } func isMatch(msgOut OutMessage, msgIn *core.Message) bool { @@ -97,10 +123,6 @@ func compareMessageFields(msgOut OutMessage, msgIn *core.Message) bool { return false } - if msgOut.tx.Account != *msgIn.Source { - return false - } - if msgOut.mode < 128 && int64(msg.Value.Grams) != msgIn.Value { return false } @@ -172,7 +194,7 @@ func createActionFromMessage(msgOut OutMessage) Action { if msgOut.mode < 128 { action.TonTransfer.Amount = int64(msgOut.messageRelaxed.MessageInternal.Value.Grams) if msgOut.tx.EndBalance < action.TonTransfer.Amount { - action.Description = g.Pointer("Not enough balance") + action.Error = g.Pointer("Not enough balance") } } case abi.NftTransferMsgBody: @@ -195,7 +217,7 @@ func createActionFromMessage(msgOut OutMessage) Action { if msgOut.mode < 128 { action.TonTransfer.Amount = int64(msgOut.messageRelaxed.MessageInternal.Value.Grams) if msgOut.tx.EndBalance < action.TonTransfer.Amount { - action.Description = g.Pointer("Not enough balance") + action.Error = g.Pointer("Not enough balance") } } } diff --git a/pkg/bath/testdata/buy-nft-on-fragment.json b/pkg/bath/testdata/buy-nft-on-fragment.json index b3645c87..978e1b12 100644 --- a/pkg/bath/testdata/buy-nft-on-fragment.json +++ b/pkg/bath/testdata/buy-nft-on-fragment.json @@ -10,7 +10,7 @@ }, "Success": true, "Type": "NftPurchase", - "Description": null, + "Error": null, "BaseTransactions": [ "268f46a593b64400a93eb17a0945629647fdd662fb00ff69b58327d10336022b", "29c039520eeef18295d428e919b7b33bd472f50ab3e9713b767a4f5e5c55181e" @@ -27,7 +27,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "9fc8546b6f866685908c18b91e14d0fbafb39d6389403831b3ba63c3e60399e5" ] @@ -43,7 +43,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "fa4c9108bebce63aff79570fceccf99126996b1e8793fcbdcd56a0b8752a2ee1" ] diff --git a/pkg/bath/testdata/cut-jetton-transfer.json b/pkg/bath/testdata/cut-jetton-transfer.json index 8976e4d4..2989b2a6 100644 --- a/pkg/bath/testdata/cut-jetton-transfer.json +++ b/pkg/bath/testdata/cut-jetton-transfer.json @@ -14,7 +14,7 @@ }, "Success": true, "Type": "JettonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "ae17905025e6920b8ca4f036c79bf3cdddeea052556f9d2b21c574670caf1d12", "9187161025b3f6249b5d57b8a347bb6e7f82c364fb7f0efb3261f54604574e50", diff --git a/pkg/bath/testdata/dedust-swap-from-ton.json b/pkg/bath/testdata/dedust-swap-from-ton.json index 1e1bd091..9ea25099 100644 --- a/pkg/bath/testdata/dedust-swap-from-ton.json +++ b/pkg/bath/testdata/dedust-swap-from-ton.json @@ -20,7 +20,7 @@ }, "Success": true, "Type": "JettonSwap", - "Description": null, + "Error": null, "BaseTransactions": [ "c85ebd3043603612af808ab874ac1d19d1a68725afc3c4a78589ed5e88372b21", "bdef4c941f1f311c7de9badebc71464752c6599ae7cdcf514cd449726d750dd6", diff --git a/pkg/bath/testdata/dedust-swap-jettons.json b/pkg/bath/testdata/dedust-swap-jettons.json index 45cb4183..826b6c37 100644 --- a/pkg/bath/testdata/dedust-swap-jettons.json +++ b/pkg/bath/testdata/dedust-swap-jettons.json @@ -20,7 +20,7 @@ }, "Success": true, "Type": "JettonSwap", - "Description": null, + "Error": null, "BaseTransactions": [ "c18eaf143061a879bdd81f4db08cf4e37ebaeeea03b350fcf33dce1fa486bb62", "2e2cdf4736ba039f1e86faf195c6ac68835c030e150cbabcf96ce20514fbf7e4", @@ -39,7 +39,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "2e2cdf4736ba039f1e86faf195c6ac68835c030e150cbabcf96ce20514fbf7e4" ] diff --git a/pkg/bath/testdata/dedust-swap-to-ton.json b/pkg/bath/testdata/dedust-swap-to-ton.json index 153c8bae..dc19c4d8 100644 --- a/pkg/bath/testdata/dedust-swap-to-ton.json +++ b/pkg/bath/testdata/dedust-swap-to-ton.json @@ -20,7 +20,7 @@ }, "Success": true, "Type": "JettonSwap", - "Description": null, + "Error": null, "BaseTransactions": [ "bba7985c6b547c2bce3a2979b41bf5b0c5bf5a399bcbee69a80572039147ce4d", "93a65eccc2922a64274a090e52973ff9ddd26b86d6458ab2bed36ed3c051ec59", diff --git a/pkg/bath/testdata/deploy-contract.json b/pkg/bath/testdata/deploy-contract.json index 29b026b8..86a47598 100644 --- a/pkg/bath/testdata/deploy-contract.json +++ b/pkg/bath/testdata/deploy-contract.json @@ -11,7 +11,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "4ac45cea7c469c2c98b73b064d1588313f8cde5b356267418302801d5e94b17b" ] @@ -23,7 +23,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "657623f3db93397a3bb956e0e621d7a37e4ff27b80013a68f2dd91c8094b50e3" ] diff --git a/pkg/bath/testdata/deposit-liquid-staking.json b/pkg/bath/testdata/deposit-liquid-staking.json index 03c546cb..6f0e507a 100644 --- a/pkg/bath/testdata/deposit-liquid-staking.json +++ b/pkg/bath/testdata/deposit-liquid-staking.json @@ -9,7 +9,7 @@ }, "Success": true, "Type": "DepositStake", - "Description": null, + "Error": null, "BaseTransactions": [ "20bee52141d1af08d3631baba8e598518a5a98e7b7d82e6960c79cb4001ec910" ] @@ -23,7 +23,7 @@ }, "Success": true, "Type": "JettonMint", - "Description": null, + "Error": null, "BaseTransactions": [ "2d77c21a86e5189a6b44bfed0c8c588505f770ff8bdcdfe1a3528512f330d9b1", "242f3560ec3274abf5046ed7a867dfb7b37a97d86abb244f06211e809a27e6de", @@ -38,7 +38,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "2d77c21a86e5189a6b44bfed0c8c588505f770ff8bdcdfe1a3528512f330d9b1" ] diff --git a/pkg/bath/testdata/disintar-nft-purchase.json b/pkg/bath/testdata/disintar-nft-purchase.json index a73aecec..100837d3 100644 --- a/pkg/bath/testdata/disintar-nft-purchase.json +++ b/pkg/bath/testdata/disintar-nft-purchase.json @@ -10,7 +10,7 @@ }, "Success": true, "Type": "NftPurchase", - "Description": null, + "Error": null, "BaseTransactions": [ "bccf47a1994af80196b94000b1d3a7bd92a046ca0a8a26db690802457da1d5cf", "3a30ad237eedde236d8aad4e1506e249d70fb6eb245c4d776ecb24df38d628d9", @@ -28,7 +28,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "5191af8acbf473017d2df1b164fd686f0d107278104597d89040104a7c63b9e7" ] @@ -44,7 +44,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "6f7fa225314b344d390ef9c1a451ea4c01b32528bf3341f215ad7787b6bc9694" ] @@ -60,7 +60,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "ec4e20e6047390f1202af08d2c4df336d8e843ea015d488832404898c54ffda2" ] diff --git a/pkg/bath/testdata/domain-renew.json b/pkg/bath/testdata/domain-renew.json index 9b367e45..7913577a 100644 --- a/pkg/bath/testdata/domain-renew.json +++ b/pkg/bath/testdata/domain-renew.json @@ -7,7 +7,7 @@ }, "Success": true, "Type": "DomainRenew", - "Description": null, + "Error": null, "BaseTransactions": [ "bf33c4ee09a872f0831935adec38a0e411c6be83b87e47bb7bf7a843d5e06047" ] @@ -22,7 +22,7 @@ }, "Success": true, "Type": "SmartContractExec", - "Description": null, + "Error": null, "BaseTransactions": [ "5123850dca7109412f695435a9a75618c001b70fad98d34d950b860116f37785" ] diff --git a/pkg/bath/testdata/encrypted-comment.json b/pkg/bath/testdata/encrypted-comment.json index b14e3dd4..88c4e238 100644 --- a/pkg/bath/testdata/encrypted-comment.json +++ b/pkg/bath/testdata/encrypted-comment.json @@ -14,7 +14,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "c1d98ee34e88a912d7eefd7d1401d612d33c74835343814ca99a318fb7138ea8" ] @@ -26,7 +26,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "6f3e1f2c05df05345198a9d26456dcb51d4c78ce64ced56fb9976e92941211d3" ] diff --git a/pkg/bath/testdata/failed-dedust-swap.json b/pkg/bath/testdata/failed-dedust-swap.json index 85893124..f5227b02 100644 --- a/pkg/bath/testdata/failed-dedust-swap.json +++ b/pkg/bath/testdata/failed-dedust-swap.json @@ -11,7 +11,7 @@ }, "Success": false, "Type": "TonTransfer", - "Description": "Not enough balance", + "Error": "Not enough balance", "BaseTransactions": null } ], diff --git a/pkg/bath/testdata/failed-simple-transfer.json b/pkg/bath/testdata/failed-simple-transfer.json index e226cb57..30fe652b 100644 --- a/pkg/bath/testdata/failed-simple-transfer.json +++ b/pkg/bath/testdata/failed-simple-transfer.json @@ -11,7 +11,7 @@ }, "Success": false, "Type": "TonTransfer", - "Description": "Not enough balance", + "Error": "Not enough balance", "BaseTransactions": null } ], diff --git a/pkg/bath/testdata/getgems-nft-purchase.json b/pkg/bath/testdata/getgems-nft-purchase.json index f76da325..51e18c90 100644 --- a/pkg/bath/testdata/getgems-nft-purchase.json +++ b/pkg/bath/testdata/getgems-nft-purchase.json @@ -10,7 +10,7 @@ }, "Success": true, "Type": "NftPurchase", - "Description": null, + "Error": null, "BaseTransactions": [ "5bf0cbc13d3079056cf300c80ab1cebf2e7e3ba20d0cef31678f0575fecb8beb", "dec6e1b8984a00114f6c0763ae1a5b2db5f9b82d57932554727a4f2c33498a9b", @@ -29,7 +29,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "4a38cfbe295cdb38b98d010975372aeb96ebd700682132f641bcadc4de230a60" ] @@ -45,7 +45,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "95e7869735d43d858c82356f2475a52e7682b7ed9718e55d07296f9ed0a3396c" ] @@ -61,7 +61,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "0dd50bfaeb46c13bc7919612cde6034e8a9a4d79ee23fc64a7570d739da601f9" ] @@ -73,7 +73,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "8feb00edd889f8a36fb8af5b4d5370190fcbe872088cd1247c445e3c3b39a795" ] diff --git a/pkg/bath/testdata/getgetms-cancel-sale.json b/pkg/bath/testdata/getgetms-cancel-sale.json index 91d19ef8..fafba1a5 100644 --- a/pkg/bath/testdata/getgetms-cancel-sale.json +++ b/pkg/bath/testdata/getgetms-cancel-sale.json @@ -10,7 +10,7 @@ }, "Success": true, "Type": "SmartContractExec", - "Description": null, + "Error": null, "BaseTransactions": [ "dd73b0fbd2f8ddb788802e999afb4e27a931492036f9038a9f0b773caf96e923" ] @@ -26,7 +26,7 @@ }, "Success": true, "Type": "NftItemTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "e4717dd6a13f472299757879cf46480e07ea64fae7a5bccbc4a0766ba71b6f4e", "af9603b51ea224f718d884d977b85ac9f46ead2c9fe2b424412dade6a8305e1a" diff --git a/pkg/bath/testdata/governance_jetton_mint.json b/pkg/bath/testdata/governance_jetton_mint.json index 643208b9..ec07dd94 100644 --- a/pkg/bath/testdata/governance_jetton_mint.json +++ b/pkg/bath/testdata/governance_jetton_mint.json @@ -10,7 +10,7 @@ }, "Success": true, "Type": "SmartContractExec", - "Description": null, + "Error": null, "BaseTransactions": [ "6ea51bde0e6471ef5a7d06209f7b4cef6e2e175ad36d3cd00e8b5fa23c174dfd" ] @@ -25,7 +25,7 @@ }, "Success": true, "Type": "SmartContractExec", - "Description": null, + "Error": null, "BaseTransactions": [ "da099f32c4504fdcec2e5ee93f5dbc958b79e5c82a3fff25545738ec8b91cb34" ] @@ -40,7 +40,7 @@ }, "Success": true, "Type": "SmartContractExec", - "Description": null, + "Error": null, "BaseTransactions": [ "86697608f8a1a352d1b83fbb295890236f306ec2e56ac80e55510573b34251f0" ] @@ -54,7 +54,7 @@ }, "Success": true, "Type": "JettonMint", - "Description": null, + "Error": null, "BaseTransactions": [ "aa939cbcd55cd707175d71d55136e101d8ad1e4b4339bd56e23d0492c5e15ac1", "50877f2d76ad0c3b5e079b9fa0c75ebb04fd8ef4905e439f52e608259357ce62", @@ -68,7 +68,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "50877f2d76ad0c3b5e079b9fa0c75ebb04fd8ef4905e439f52e608259357ce62" ] @@ -80,7 +80,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "da099f32c4504fdcec2e5ee93f5dbc958b79e5c82a3fff25545738ec8b91cb34" ] diff --git a/pkg/bath/testdata/ihr-fee.json b/pkg/bath/testdata/ihr-fee.json index 0ebe8d49..02f90c27 100644 --- a/pkg/bath/testdata/ihr-fee.json +++ b/pkg/bath/testdata/ihr-fee.json @@ -11,7 +11,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "0916cd818bacdf7b23a1c75dd3940f0dfe7a815162a58bddd32124c229efd56a" ] diff --git a/pkg/bath/testdata/jetton-transfer-to-another-person.json b/pkg/bath/testdata/jetton-transfer-to-another-person.json index d63318f7..aca9e325 100644 --- a/pkg/bath/testdata/jetton-transfer-to-another-person.json +++ b/pkg/bath/testdata/jetton-transfer-to-another-person.json @@ -14,7 +14,7 @@ }, "Success": true, "Type": "JettonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "d7c56c9c08a0b83d0486a993f248aa61b62504bb7cb8223c5705cb8ee4882d17", "61f2a240452c334febc1f20df9c468c4bb13f396fd08929537409dd47c1f5261", @@ -29,7 +29,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "61f2a240452c334febc1f20df9c468c4bb13f396fd08929537409dd47c1f5261" ] diff --git a/pkg/bath/testdata/jetton-transfer-to-myself.json b/pkg/bath/testdata/jetton-transfer-to-myself.json index 73f6358e..40e05f3a 100644 --- a/pkg/bath/testdata/jetton-transfer-to-myself.json +++ b/pkg/bath/testdata/jetton-transfer-to-myself.json @@ -14,7 +14,7 @@ }, "Success": true, "Type": "JettonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "e7befadce3fc7a1f15f7119beb23a8e056c3e8db5fc807c72c488a740a08614b", "d1e9668698b01c839bfa12be742d6c88ffe703a0790099bfbbb844c4d7edbdf0", diff --git a/pkg/bath/testdata/liquid-withdraw-pending-request.json b/pkg/bath/testdata/liquid-withdraw-pending-request.json index f2bcb113..b419d715 100644 --- a/pkg/bath/testdata/liquid-withdraw-pending-request.json +++ b/pkg/bath/testdata/liquid-withdraw-pending-request.json @@ -9,7 +9,7 @@ }, "Success": true, "Type": "WithdrawStakeRequest", - "Description": null, + "Error": null, "BaseTransactions": [ "32a649c3f4c5cd15cda3678bba67f2a1ccd6cd554249a726e760cfe389226008", "1cb338e71299a927fb4f3ed26d87b141df6d5996b31c01bde8494c0ee2b4ec8d", @@ -26,7 +26,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "075bfecbaae2f45c6e0d5c3125e41a0d1f123ef9ba0638c7701e3b4e36472d0d" ] diff --git a/pkg/bath/testdata/megatonfi-swap.json b/pkg/bath/testdata/megatonfi-swap.json index 503a8970..921d8db0 100644 --- a/pkg/bath/testdata/megatonfi-swap.json +++ b/pkg/bath/testdata/megatonfi-swap.json @@ -20,7 +20,7 @@ }, "Success": true, "Type": "JettonSwap", - "Description": null, + "Error": null, "BaseTransactions": [ "e5d8031bb6e6001342fae861e94761658a96d4e6bd8ed26814ff2746ed3c38a6", "b7be28c8fcba9e2a4e07d7f6a11c30ad3a3e4e07181717cf2372be88069d4815", @@ -46,7 +46,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "f40d673de37e9a7ea81a346ee4b6b1371fa0c456ddcf15b48e6e6d67e3b02071" ] diff --git a/pkg/bath/testdata/multiple-call-contracts.json b/pkg/bath/testdata/multiple-call-contracts.json index 8e064dfb..bb950bf8 100644 --- a/pkg/bath/testdata/multiple-call-contracts.json +++ b/pkg/bath/testdata/multiple-call-contracts.json @@ -14,7 +14,7 @@ }, "Success": true, "Type": "JettonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "a47be2c95381c33a3efd100aaff86f9bb415bc21d3f2b7a751872ea7631012f1", "7309e9a76410ed7d8d4147790dea40c3cbbbe325946b6af36bcf30ae86048d67", @@ -31,7 +31,7 @@ }, "Success": true, "Type": "SmartContractExec", - "Description": null, + "Error": null, "BaseTransactions": [ "52d18ed6ff9de1724d30a7bc7347680b37a6205736c74f09495e5a482e3196e6" ] @@ -46,7 +46,7 @@ }, "Success": true, "Type": "SmartContractExec", - "Description": null, + "Error": null, "BaseTransactions": [ "e9b362ae466b18a53a8bb658e14511787699d14428c753b94ffcfe34262ff92d" ] @@ -65,7 +65,7 @@ }, "Success": true, "Type": "JettonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "1c0e8d968434981c8d380453bc55c31984ae50c7068ebc9262610c798dbcbfb4", "3cf5c2370fa0677f13b4629758942c0a309be33d878b796a4c8ad1ad7297fd48", @@ -82,7 +82,7 @@ }, "Success": true, "Type": "SmartContractExec", - "Description": null, + "Error": null, "BaseTransactions": [ "2ba854a4642c1523aa1e6a91f61f3e9d7f8c2963787b6c9c8f5695f0720d3383" ] @@ -101,7 +101,7 @@ }, "Success": true, "Type": "JettonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "be8c3f1bba22515a8efbe43cbbf195476f43ad7c75fc772dc636ffddf51f2304", "34fa15497ceebed556dcdde456d5a232d4194b57f1ba403aebce0a838b77f8dc", @@ -115,7 +115,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "34fa15497ceebed556dcdde456d5a232d4194b57f1ba403aebce0a838b77f8dc" ] diff --git a/pkg/bath/testdata/nft-transfer.json b/pkg/bath/testdata/nft-transfer.json index b4f075dd..6ec84e8b 100644 --- a/pkg/bath/testdata/nft-transfer.json +++ b/pkg/bath/testdata/nft-transfer.json @@ -11,7 +11,7 @@ }, "Success": true, "Type": "NftItemTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "18122fb128076d62f3ad1b45619ac929eb308d757690a6ab9832d977e8214859", "648b9fb6f0781778b5128efcffd306545695e019795ca35e4a7ff981c544f0ea", diff --git a/pkg/bath/testdata/simple-transfer.json b/pkg/bath/testdata/simple-transfer.json index a45461ca..ca5d0b1c 100644 --- a/pkg/bath/testdata/simple-transfer.json +++ b/pkg/bath/testdata/simple-transfer.json @@ -11,7 +11,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "e969bcf584062ba9d329890a28c36fa818a050ab9cf9c80c62847fead1ef3732" ] diff --git a/pkg/bath/testdata/simple-transfers-one-failed.json b/pkg/bath/testdata/simple-transfers-one-failed.json index 7435f7eb..b7391d14 100644 --- a/pkg/bath/testdata/simple-transfers-one-failed.json +++ b/pkg/bath/testdata/simple-transfers-one-failed.json @@ -11,7 +11,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "5595b0f88d7482de31ba6499d9e95e19c75b527c67447aa54404f226373a8ea4" ] @@ -27,7 +27,7 @@ }, "Success": false, "Type": "TonTransfer", - "Description": "Not enough balance", + "Error": "Not enough balance", "BaseTransactions": null } ], diff --git a/pkg/bath/testdata/stonfi-failed-swap.json b/pkg/bath/testdata/stonfi-failed-swap.json index d849d860..96c55fac 100644 --- a/pkg/bath/testdata/stonfi-failed-swap.json +++ b/pkg/bath/testdata/stonfi-failed-swap.json @@ -20,7 +20,7 @@ }, "Success": false, "Type": "JettonSwap", - "Description": null, + "Error": null, "BaseTransactions": [ "ea39b268e9771623b9c4991ae6fd607b1faa0518c1ca8fa7adbdfbb5ee26314e", "ff27078f163f27a2b9d579da2e15b4d2d59de7e9806d64e8d511bd98d449e7a0", diff --git a/pkg/bath/testdata/stonfi-purchase-jUSDT.json b/pkg/bath/testdata/stonfi-purchase-jUSDT.json index a3a6e9d1..971cc6be 100644 --- a/pkg/bath/testdata/stonfi-purchase-jUSDT.json +++ b/pkg/bath/testdata/stonfi-purchase-jUSDT.json @@ -20,7 +20,7 @@ }, "Success": true, "Type": "JettonSwap", - "Description": null, + "Error": null, "BaseTransactions": [ "0758bff5c2318d2063d798d2040ffdcd550991bfe27d7a78d0479aa0d27c5f7a", "5b14584359682422af53bd5e957bdec0905225d8b14a798bb61a29cc01f971d3", diff --git a/pkg/bath/testdata/stonfi-swap-jUSDT-STON.json b/pkg/bath/testdata/stonfi-swap-jUSDT-STON.json index 0f365354..8af86990 100644 --- a/pkg/bath/testdata/stonfi-swap-jUSDT-STON.json +++ b/pkg/bath/testdata/stonfi-swap-jUSDT-STON.json @@ -20,7 +20,7 @@ }, "Success": true, "Type": "JettonSwap", - "Description": null, + "Error": null, "BaseTransactions": [ "e8933ed0b2086b312f89a3ae5f597666493ca747b69cea9ef9a79c1e641e763f", "cdc129c36ad3c345459ed5d0c1ffad145134e6ce96b8a4ed8201909def33de2a", @@ -39,7 +39,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "9809a999b20e8bae123c21f229abb4de7b00b03c754eb692b23a8662f5445c19" ] diff --git a/pkg/bath/testdata/subscription-init.json b/pkg/bath/testdata/subscription-init.json index d646aab2..c8280c43 100644 --- a/pkg/bath/testdata/subscription-init.json +++ b/pkg/bath/testdata/subscription-init.json @@ -10,7 +10,7 @@ }, "Success": true, "Type": "Subscribe", - "Description": null, + "Error": null, "BaseTransactions": [ "a9d02569af93f8ec85ea9c322690e5ba561783dcb02f000698af9b2f334ae9c4", "ccf8675254a925f516ee7facaaf7a71d166e6ac99fc71ce9f6f4129ea9ee3130" @@ -23,7 +23,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "a9d02569af93f8ec85ea9c322690e5ba561783dcb02f000698af9b2f334ae9c4" ] diff --git a/pkg/bath/testdata/subscription-prolongation.json b/pkg/bath/testdata/subscription-prolongation.json index a86ad025..c1ff8982 100644 --- a/pkg/bath/testdata/subscription-prolongation.json +++ b/pkg/bath/testdata/subscription-prolongation.json @@ -10,7 +10,7 @@ }, "Success": true, "Type": "Subscribe", - "Description": null, + "Error": null, "BaseTransactions": [ "d5cf39c85392e40a7f5b0e706c4df56ad89cb214e4c5b5206fbe82c6d71a09cf", "0869aca7038f732a29e89fc9ce1990afecc99106d8ab07d967a2e0950faf6580", diff --git a/pkg/bath/testdata/telemint-deploy.json b/pkg/bath/testdata/telemint-deploy.json index 3bd31dd2..58b49688 100644 --- a/pkg/bath/testdata/telemint-deploy.json +++ b/pkg/bath/testdata/telemint-deploy.json @@ -11,7 +11,7 @@ }, "Success": true, "Type": "AuctionBid", - "Description": null, + "Error": null, "BaseTransactions": [ "17d25b9f2dae646c63f005abcdc6e2778f7fb9511015f2eafbd3f46c33276198", "9e979adabf0853c34a675d635a8ff7dae24f6c980780a7e5c4e21f4b6e29f575" @@ -24,7 +24,7 @@ }, "Success": true, "Type": "ContractDeploy", - "Description": null, + "Error": null, "BaseTransactions": [ "17d25b9f2dae646c63f005abcdc6e2778f7fb9511015f2eafbd3f46c33276198" ] diff --git a/pkg/bath/testdata/tf-nominator-deposit.json b/pkg/bath/testdata/tf-nominator-deposit.json index 9660b5d0..4b359c04 100644 --- a/pkg/bath/testdata/tf-nominator-deposit.json +++ b/pkg/bath/testdata/tf-nominator-deposit.json @@ -9,7 +9,7 @@ }, "Success": true, "Type": "DepositStake", - "Description": null, + "Error": null, "BaseTransactions": [ "1e941df6eff142f1b6e11d984e695ff90a1b975e73640f4b3a9781f5fd6a5d71" ] diff --git a/pkg/bath/testdata/tf-nominator-process-withdraw-requests.json b/pkg/bath/testdata/tf-nominator-process-withdraw-requests.json index 8950209b..2079a14e 100644 --- a/pkg/bath/testdata/tf-nominator-process-withdraw-requests.json +++ b/pkg/bath/testdata/tf-nominator-process-withdraw-requests.json @@ -10,7 +10,7 @@ }, "Success": true, "Type": "SmartContractExec", - "Description": null, + "Error": null, "BaseTransactions": [ "d6760dc8f3cbc37003f76b3e78b55613a8d81b5354cedf7ce6b2149e0e4cad85" ] @@ -26,7 +26,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "42233d9a77a59c9909fad1ccf76655efa46f60412de37cfa36dd5dd98cdb7eba" ] @@ -42,7 +42,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "1984eefa9f92e1137c442153295c61160ac5990606065285590bac249aa54775" ] diff --git a/pkg/bath/testdata/tf-nominator-request-a-withdraw.json b/pkg/bath/testdata/tf-nominator-request-a-withdraw.json index 98dbe8be..798b712a 100644 --- a/pkg/bath/testdata/tf-nominator-request-a-withdraw.json +++ b/pkg/bath/testdata/tf-nominator-request-a-withdraw.json @@ -9,7 +9,7 @@ }, "Success": true, "Type": "WithdrawStakeRequest", - "Description": null, + "Error": null, "BaseTransactions": [ "64e3d3c5020beebbf423654c305996909e89df21339a41b2f37fd40183a67205", "6eee762f4db52fcd5e797f86436cbf940c0d9b4759603be95a5fd24f145cbe22" diff --git a/pkg/bath/testdata/tf-update-validator-set.json b/pkg/bath/testdata/tf-update-validator-set.json index cc4079e5..4cc55f61 100644 --- a/pkg/bath/testdata/tf-update-validator-set.json +++ b/pkg/bath/testdata/tf-update-validator-set.json @@ -10,7 +10,7 @@ }, "Success": true, "Type": "SmartContractExec", - "Description": null, + "Error": null, "BaseTransactions": [ "0143cff500c883ccfd40a1a873a45a6f6168f4b0b2a9f2c9a81d6d5e8be1c41d" ] @@ -26,7 +26,7 @@ }, "Success": true, "Type": "TonTransfer", - "Description": null, + "Error": null, "BaseTransactions": [ "890ccbb2740d15ada498270a12508afe448d64f08385b7b2d14eaca566802814" ] diff --git a/pkg/bath/testdata/tonstake-withdraw.json b/pkg/bath/testdata/tonstake-withdraw.json index 731385c3..0c86754f 100644 --- a/pkg/bath/testdata/tonstake-withdraw.json +++ b/pkg/bath/testdata/tonstake-withdraw.json @@ -9,7 +9,7 @@ }, "Success": true, "Type": "WithdrawStake", - "Description": null, + "Error": null, "BaseTransactions": [ "708fc31d9355864979a2c4237adb6541fd87b4fa58f553c1ae8f286dc14e1672", "fd93c25d37d1ba7033a337a12663a2a24907e6f7442463b4b97f4fda7d3422df", diff --git a/pkg/bath/testdata/wton-mint.json b/pkg/bath/testdata/wton-mint.json index 659f63f5..33b20e4c 100644 --- a/pkg/bath/testdata/wton-mint.json +++ b/pkg/bath/testdata/wton-mint.json @@ -9,7 +9,7 @@ }, "Success": true, "Type": "JettonMint", - "Description": null, + "Error": null, "BaseTransactions": [ "85f69a391a9f79a7b30f4d50371ab96f6aae9e2d30ad25eabb97e0350c1ae54a", "e8999c9ce8e675bef70edb66b69755223436e3c6c86424a20b62ca61411c87fe",