@@ -151,14 +151,14 @@ func NewWalletAdvertiser(chain, privateKey, storageURL, advertisableURI string,
151151 activeServices := services .New (slog .Default (), cfg .Services )
152152
153153 // Create storage manager for the wallet
154- storageManager , errStorage := storage .NewGORMProvider (context . TODO (), slog . Default (), storage. GORMProviderConfig {
155- DB : cfg .DBConfig ,
156- Chain : cfg . BSVNetwork ,
157- FeeModel : cfg .FeeModel ,
158- Commission : cfg .Commission ,
159- Services : activeServices ,
160- SynchronizeTxStatuses : cfg .SynchronizeTxStatuses ,
161- } )
154+ storageManager , errStorage := storage .NewGORMProvider (
155+ cfg .BSVNetwork ,
156+ activeServices ,
157+ storage . WithDBConfig ( cfg .DBConfig ) ,
158+ storage . WithFeeModel ( cfg .FeeModel ) ,
159+ storage . WithCommission ( cfg . Commission ) ,
160+ storage . WithSynchronizeTxStatuses ( cfg .SynchronizeTxStatuses ) ,
161+ )
162162 if errStorage != nil {
163163 return nil , fmt .Errorf ("failed to create storage manager: %w" , errStorage )
164164 }
@@ -291,14 +291,14 @@ func (w *WalletAdvertiser) CreateAdvertisements(adsData []*oa.AdvertisementData)
291291 cfg .ServerPrivateKey = w .privateKey
292292 activeServices := services .New (logger , cfg .Services )
293293
294- storageManager , errStorage := storage .NewGORMProvider (context . TODO (), logger , storage. GORMProviderConfig {
295- DB : cfg .DBConfig ,
296- Chain : cfg . BSVNetwork ,
297- FeeModel : cfg .FeeModel ,
298- Commission : cfg .Commission ,
299- Services : activeServices ,
300- SynchronizeTxStatuses : cfg .SynchronizeTxStatuses ,
301- } )
294+ storageManager , errStorage := storage .NewGORMProvider (
295+ cfg .BSVNetwork ,
296+ activeServices ,
297+ storage . WithDBConfig ( cfg .DBConfig ) ,
298+ storage . WithFeeModel ( cfg .FeeModel ) ,
299+ storage . WithCommission ( cfg . Commission ) ,
300+ storage . WithSynchronizeTxStatuses ( cfg .SynchronizeTxStatuses ) ,
301+ )
302302 if errStorage != nil {
303303 return overlay.TaggedBEEF {}, fmt .Errorf ("failed to create storage provider: %w" , errStorage )
304304 }
0 commit comments