fix: properly initialize NFTMetadataProvider in wallet service
This commit is contained in:
parent
5738cf7e21
commit
ce45a7b1e8
|
@ -105,11 +105,6 @@ func (b *StatusNode) initServices(config *params.NodeConfig, mediaServer *server
|
|||
services = append(services, wakuext)
|
||||
}
|
||||
|
||||
if config.WalletConfig.Enabled {
|
||||
walletService := b.walletService(accDB, accountsFeed)
|
||||
services = append(services, walletService)
|
||||
}
|
||||
|
||||
if config.WakuV2Config.Enabled {
|
||||
telemetryServerURL := ""
|
||||
if accDB.DB() != nil {
|
||||
|
@ -135,6 +130,13 @@ func (b *StatusNode) initServices(config *params.NodeConfig, mediaServer *server
|
|||
services = append(services, wakuext)
|
||||
}
|
||||
|
||||
// Wallet Service makes use of wakuExtSrvc/wakuV2ExtSrvc
|
||||
// Keep this initialization below the other two
|
||||
if config.WalletConfig.Enabled {
|
||||
walletService := b.walletService(accDB, accountsFeed)
|
||||
services = append(services, walletService)
|
||||
}
|
||||
|
||||
// We ignore for now local notifications flag as users who are upgrading have no mean to enable it
|
||||
lns, err := b.localNotificationsService(config.NetworkID)
|
||||
if err != nil {
|
||||
|
|
|
@ -2,6 +2,7 @@ package collectibles
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -254,6 +255,9 @@ func (o *Manager) processAssets(chainID uint64, assets []opensea.Asset) error {
|
|||
}
|
||||
|
||||
if isMetadataEmpty(asset) {
|
||||
if o.metadataProvider == nil {
|
||||
return fmt.Errorf("NFTMetadataProvider not available")
|
||||
}
|
||||
tokenURI, err := o.fetchTokenURI(chainID, id)
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue