show enabled only if configured to receive or send (handle client settings wipe)
This commit is contained in:
parent
2ef7651421
commit
40f24236fd
|
@ -51,7 +51,7 @@ function useWalletInner (name) {
|
||||||
const [config, saveConfig, clearConfig] = useConfig(walletDef)
|
const [config, saveConfig, clearConfig] = useConfig(walletDef)
|
||||||
const available = (!walletDef?.isAvailable || walletDef?.isAvailable())
|
const available = (!walletDef?.isAvailable || walletDef?.isAvailable())
|
||||||
|
|
||||||
const status = config?.enabled && available ? Status.Enabled : Status.Initialized
|
const status = config?.enabled && available && (config.canSend || config.canReceive) ? Status.Enabled : Status.Initialized
|
||||||
const enabled = status === Status.Enabled
|
const enabled = status === Status.Enabled
|
||||||
const priority = config?.priority
|
const priority = config?.priority
|
||||||
const hasConfig = walletDef?.fields?.length > 0
|
const hasConfig = walletDef?.fields?.length > 0
|
||||||
|
|
Loading…
Reference in New Issue