@@ -59,20 +59,6 @@ type CreateIntentHandler interface {
59
59
60
60
// AllowCreation determines whether the new intent creation should be allowed.
61
61
AllowCreation (ctx context.Context , intentRecord * intent.Record , metadata * transactionpb.Metadata , actions []* transactionpb.Action ) error
62
-
63
- // OnSaveToDB is a callback when the intent is being saved to the DB
64
- // within the scope of a DB transaction. Additional supporting DB records
65
- // (ie. not the intent record) relevant to the intent should be saved here.
66
- OnSaveToDB (ctx context.Context , intentRecord * intent.Record ) error
67
-
68
- // OnCommittedToDB is a callback when the intent has been committed to the
69
- // DB. Any instant side-effects should called here, and can be done async
70
- // in a new goroutine to not affect SubmitIntent latency.
71
- //
72
- // Note: Any errors generated here have no effect on rolling back the intent.
73
- // This is all best-effort up to this point. Use a worker for things
74
- // requiring retries!
75
- OnCommittedToDB (ctx context.Context , intentRecord * intent.Record ) error
76
62
}
77
63
78
64
type OpenAccountsIntentHandler struct {
@@ -294,14 +280,6 @@ func (h *OpenAccountsIntentHandler) validateActions(
294
280
return nil
295
281
}
296
282
297
- func (h * OpenAccountsIntentHandler ) OnSaveToDB (ctx context.Context , intentRecord * intent.Record ) error {
298
- return nil
299
- }
300
-
301
- func (h * OpenAccountsIntentHandler ) OnCommittedToDB (ctx context.Context , intentRecord * intent.Record ) error {
302
- return nil
303
- }
304
-
305
283
type SendPublicPaymentIntentHandler struct {
306
284
conf * conf
307
285
data code_data.Provider
@@ -791,14 +769,6 @@ func (h *SendPublicPaymentIntentHandler) validateActions(
791
769
return nil
792
770
}
793
771
794
- func (h * SendPublicPaymentIntentHandler ) OnSaveToDB (ctx context.Context , intentRecord * intent.Record ) error {
795
- return nil
796
- }
797
-
798
- func (h * SendPublicPaymentIntentHandler ) OnCommittedToDB (ctx context.Context , intentRecord * intent.Record ) error {
799
- return nil
800
- }
801
-
802
772
type ReceivePaymentsPubliclyIntentHandler struct {
803
773
conf * conf
804
774
data code_data.Provider
@@ -1084,14 +1054,6 @@ func (h *ReceivePaymentsPubliclyIntentHandler) validateActions(
1084
1054
return validateMoneyMovementActionUserAccounts (intent .ReceivePaymentsPublicly , initiatorAccountsByVault , actions )
1085
1055
}
1086
1056
1087
- func (h * ReceivePaymentsPubliclyIntentHandler ) OnSaveToDB (ctx context.Context , intentRecord * intent.Record ) error {
1088
- return nil
1089
- }
1090
-
1091
- func (h * ReceivePaymentsPubliclyIntentHandler ) OnCommittedToDB (ctx context.Context , intentRecord * intent.Record ) error {
1092
- return nil
1093
- }
1094
-
1095
1057
type PublicDistributionIntentHandler struct {
1096
1058
conf * conf
1097
1059
data code_data.Provider
@@ -1380,14 +1342,6 @@ func (h *PublicDistributionIntentHandler) validateActions(
1380
1342
return nil
1381
1343
}
1382
1344
1383
- func (h * PublicDistributionIntentHandler ) OnSaveToDB (ctx context.Context , intentRecord * intent.Record ) error {
1384
- return nil
1385
- }
1386
-
1387
- func (h * PublicDistributionIntentHandler ) OnCommittedToDB (ctx context.Context , intentRecord * intent.Record ) error {
1388
- return nil
1389
- }
1390
-
1391
1345
func validateAllUserAccountsManagedByCode (ctx context.Context , initiatorAccounts []* common.AccountRecords ) error {
1392
1346
// Try to unlock *ANY* latest account, and you're done
1393
1347
for _ , accountRecords := range initiatorAccounts {
0 commit comments