@@ -59,20 +59,6 @@ type CreateIntentHandler interface {
5959
6060 // AllowCreation determines whether the new intent creation should be allowed.
6161 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
7662}
7763
7864type OpenAccountsIntentHandler struct {
@@ -294,14 +280,6 @@ func (h *OpenAccountsIntentHandler) validateActions(
294280 return nil
295281}
296282
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-
305283type SendPublicPaymentIntentHandler struct {
306284 conf * conf
307285 data code_data.Provider
@@ -791,14 +769,6 @@ func (h *SendPublicPaymentIntentHandler) validateActions(
791769 return nil
792770}
793771
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-
802772type ReceivePaymentsPubliclyIntentHandler struct {
803773 conf * conf
804774 data code_data.Provider
@@ -1084,14 +1054,6 @@ func (h *ReceivePaymentsPubliclyIntentHandler) validateActions(
10841054 return validateMoneyMovementActionUserAccounts (intent .ReceivePaymentsPublicly , initiatorAccountsByVault , actions )
10851055}
10861056
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-
10951057type PublicDistributionIntentHandler struct {
10961058 conf * conf
10971059 data code_data.Provider
@@ -1380,14 +1342,6 @@ func (h *PublicDistributionIntentHandler) validateActions(
13801342 return nil
13811343}
13821344
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-
13911345func validateAllUserAccountsManagedByCode (ctx context.Context , initiatorAccounts []* common.AccountRecords ) error {
13921346 // Try to unlock *ANY* latest account, and you're done
13931347 for _ , accountRecords := range initiatorAccounts {
0 commit comments