@@ -10,6 +10,8 @@ import (
1010 "math/big"
1111 "time"
1212
13+ "github.com/centrifuge/go-centrifuge/pallets/utility"
14+
1315 keystoreTypes "github.com/centrifuge/chain-custom-types/pkg/keystore"
1416 proxyType "github.com/centrifuge/chain-custom-types/pkg/proxy"
1517 "github.com/centrifuge/go-centrifuge/centchain"
@@ -215,7 +217,7 @@ func ExecutePostAccountBootstrap(
215217
216218 defer testClient .Close ()
217219
218- if _ , err = testClient .SubmitAndWait (ctx , originKrp , batchCalls (callCreationFns ... )); err != nil {
220+ if _ , err = testClient .SubmitAndWait (ctx , originKrp , utility . BatchCalls (callCreationFns ... )); err != nil {
219221 return fmt .Errorf ("couldn't submit post account bootstrap batch call: %w" , err )
220222 }
221223
@@ -466,27 +468,3 @@ func GetAddKeysCall(
466468 return & proxyCall , nil
467469 }, nil
468470}
469-
470- func batchCalls (callCreationFns ... centchain.CallProviderFn ) centchain.CallProviderFn {
471- return func (meta * types.Metadata ) (* types.Call , error ) {
472- var calls []* types.Call
473-
474- for _ , callCreationFn := range callCreationFns {
475- call , err := callCreationFn (meta )
476-
477- if err != nil {
478- return nil , fmt .Errorf ("couldn't create call: %w" , err )
479- }
480-
481- calls = append (calls , call )
482- }
483-
484- batchCall , err := types .NewCall (meta , "Utility.batch_all" , calls )
485-
486- if err != nil {
487- return nil , err
488- }
489-
490- return & batchCall , nil
491- }
492- }
0 commit comments