AlphaWallet / AlphaWallet/alpha-wallet-android

Recode the customisation system

Abierto
#2,758 2 comentarios 0 reacciones 1 asignado Reclamado por @keval-finimble Ver en GitHub
Lenguaje dominante
Java
Estrellas
646
Forks
579
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Currently the way we customise the appearance of the wallet is a bit 'lumpy'.

Ideally, all customisation options should be in a JSON file which is bundled with the app where devs can edit options which change the appearance and behaviour of the wallet.

Currently the main file that controls appearance is:

```class CustomViewSettings```

This *should* control which chains appear in the wallet, and which tokens appear automatically.

Ideally, this file should let us configure the following:

1. Restrict chains to one or more as defined in ```lockedChains```. If lockedChains is empty, then fall back to default AW behaviour.
2. Ensure specific tokens (eg chainId 1 USDC) always appear. If this is empty then AW should attempt to find and display all non-zero tokens.

This should be expanded to:

3. Only show a specific token (ie a token contract eg USDC, as opposed to the base chain eg Ethereum mainnet), never show other tokens.

Also, the config file could restrict the number of wallets the user can have, automatic creation of the first wallet (ie no splash screen with option to import, create or watch) and default dark mode.

The JSON file should appear like this:

```
{
"exclusive_chains":[] // eg [1, 4, 10] // <-- Only these chains appear
"locked_chains":[] // eg [1, 4, 10] // <-- These chains are locked on, cannot be unselected (note this option works with "exclusive_chains")
"locked_tokens":[] // eg [{1, ["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x....."]}, {100, {["0x....", "0x..."]}]
"dark_mode": "" // eg "true", "false" else user configured
}
```

^^^ You may need to correct my JSON syntax above

Once done the ```CustomViewSettings``` file can be deleted.

We should add integration tests to ensure the correct chains/tokens are displayed. For examples of this see: ```QRParserTest```.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.