fix_: hide mercuryo provider
This commit is contained in:
parent
11cf42bedd
commit
4305609493
|
@ -558,6 +558,7 @@ type WalletConfig struct {
|
|||
StatusProxyEnabled bool `json:"StatusProxyEnabled"`
|
||||
StatusProxyStageName string `json:"StatusProxyStageName"`
|
||||
EnableCelerBridge bool `json:"EnableCelerBridge"`
|
||||
EnableMercuryoProvider bool `json:"EnableMercuryoProvider"`
|
||||
}
|
||||
|
||||
// MarshalJSON custom marshalling to avoid exposing sensitive data in log,
|
||||
|
@ -567,10 +568,12 @@ func (wc WalletConfig) MarshalJSON() ([]byte, error) {
|
|||
Enabled bool `json:"Enabled"`
|
||||
StatusProxyEnabled bool `json:"StatusProxyEnabled"`
|
||||
EnableCelerBridge bool `json:"EnableCelerBridge"`
|
||||
EnableMercuryoProvider bool `json:"EnableMercuryoProvider"`
|
||||
}{
|
||||
Enabled: wc.Enabled,
|
||||
StatusProxyEnabled: wc.StatusProxyEnabled,
|
||||
EnableCelerBridge: wc.EnableCelerBridge,
|
||||
EnableMercuryoProvider: wc.EnableMercuryoProvider,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -29,4 +29,7 @@ type FeatureFlags struct {
|
|||
|
||||
// EnableCelerBridge indicates whether we should enable the Celer bridge in the Router
|
||||
EnableCelerBridge bool
|
||||
|
||||
// EnableMercuryoProvider indicates whether we should enable the Mercuryo provider in the Wallet
|
||||
EnableMercuryoProvider bool
|
||||
}
|
||||
|
|
|
@ -106,10 +106,23 @@ func NewService(
|
|||
tokenManager.Start()
|
||||
|
||||
cryptoOnRampProviders := []onramp.Provider{
|
||||
onramp.NewMercuryoProvider(tokenManager),
|
||||
onramp.NewRampProvider(),
|
||||
onramp.NewMoonPayProvider(),
|
||||
}
|
||||
|
||||
featureFlags := &protocolCommon.FeatureFlags{}
|
||||
if config.WalletConfig.EnableCelerBridge {
|
||||
featureFlags.EnableCelerBridge = true
|
||||
}
|
||||
|
||||
if config.WalletConfig.EnableMercuryoProvider {
|
||||
featureFlags.EnableMercuryoProvider = true
|
||||
}
|
||||
|
||||
if featureFlags.EnableMercuryoProvider {
|
||||
cryptoOnRampProviders = append(cryptoOnRampProviders, onramp.NewMercuryoProvider(tokenManager))
|
||||
}
|
||||
|
||||
cryptoOnRampManager := onramp.NewManager(cryptoOnRampProviders)
|
||||
|
||||
savedAddressesManager := &SavedAddressesManager{db: db}
|
||||
|
@ -184,11 +197,6 @@ func NewService(
|
|||
|
||||
activity := activity.NewService(db, accountsDB, tokenManager, collectiblesManager, feed, pendingTxManager)
|
||||
|
||||
featureFlags := &protocolCommon.FeatureFlags{}
|
||||
if config.WalletConfig.EnableCelerBridge {
|
||||
featureFlags.EnableCelerBridge = true
|
||||
}
|
||||
|
||||
router := router.NewRouter(rpcClient, transactor, tokenManager, marketManager, collectibles,
|
||||
collectiblesManager, ens)
|
||||
pathProcessors := buildPathProcessors(rpcClient, transactor, tokenManager, ens, featureFlags)
|
||||
|
|
Loading…
Reference in New Issue