Skip to content

Commit

Permalink
Make several chains configurable via env.json
Browse files Browse the repository at this point in the history
Now various whitelabels can disable chains via config.
  • Loading branch information
paullinator committed Aug 9, 2024
1 parent 11ae6a5 commit 32c0a4c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

- added: Add disableSurveyModal option
- changed: Disable Home scene swap and FIO cards if configured
- changed: Allow some chains to be disabled in env.json

## 4.11.0

- added: Kado buy via wire transfer
Expand Down Expand Up @@ -37,7 +41,7 @@
- fixed: Buying non-BTC assets with Bity
- fixed: Misc styling fixes on SepaFormScene and AddressFormScene
- fixed: Pressing back during native fiat buy/sell flows results in stuck button spinners
- fixed: Broken Android paste into `TextInputModal` in "ScanQR" -> "Enter"
- fixed: Broken Android paste into `TextInputModal` in "ScanQR" -> "Enter"
- fixed: Promo cards not visible until scroll for new accounts

## 4.9.2 (2024-07-22)
Expand Down
8 changes: 7 additions & 1 deletion src/envConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ export const asEnvConfig = asObject({
// Core plugin options:
ARBITRUM_INIT: asCorePluginInit(asEvmApiKeys),
AMOY_INIT: asCorePluginInit(asEvmApiKeys),
ALGORAND_INIT: asOptional(asBoolean, true),
AVALANCHE_INIT: asCorePluginInit(asEvmApiKeys),
AXELAR_INIT: asOptional(asBoolean, true),
BASE_INIT: asCorePluginInit(asEvmApiKeys),
BINANCE_SMART_CHAIN_INIT: asCorePluginInit(asEvmApiKeys),
BITCOIN_INIT: asCorePluginInit(
Expand Down Expand Up @@ -156,6 +158,7 @@ export const asEnvConfig = asObject({
}).withRest
),
COREUM_INIT: asCorePluginInit(asBoolean),
COSMOSHUB_INIT: asCorePluginInit(asBoolean),
DASH_INIT: asCorePluginInit(
asObject({
nowNodeApiKey: asOptional(asString, '')
Expand Down Expand Up @@ -188,6 +191,7 @@ export const asEnvConfig = asObject({
freeRegRefCode: asOptional(asString, '')
}).withRest
),
FILECOINFEVM_INIT: asOptional(asBoolean, true),
FILECOIN_INIT: asCorePluginInit(
asObject({
glifApiKey: asOptional(asString, '')
Expand All @@ -204,6 +208,8 @@ export const asEnvConfig = asObject({
}).withRest
),
HOLESKY_INIT: asCorePluginInit(asEvmApiKeys),
HEDERA_INIT: asOptional(asBoolean, true),
LIBERLAND_INIT: asOptional(asBoolean, true),
LIFI_INIT: asCorePluginInit(
asObject({
affiliateFeeBasis: asOptional(asString, '50'),
Expand All @@ -229,7 +235,7 @@ export const asEnvConfig = asObject({
OPTIMISM_INIT: asCorePluginInit(asEvmApiKeys),
OSMOSIS_INIT: asCorePluginInit(asBoolean),
PULSECHAIN_INIT: asCorePluginInit(asEvmApiKeys),

POLKADOT_INIT: asOptional(asBoolean, true),
POLYGON_INIT: asCorePluginInit(asEvmApiKeys),
RANGO_INIT: asCorePluginInit(
asObject({
Expand Down
14 changes: 7 additions & 7 deletions src/util/corePlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export const currencyPlugins: EdgeCorePluginsInit = {
// edge-currency-accountbased:
amoy: ENV.AMOY_INIT,
arbitrum: ENV.ARBITRUM_INIT,
algorand: true,
algorand: ENV.ALGORAND_INIT,
avalanche: ENV.AVALANCHE_INIT,
axelar: true,
axelar: ENV.AXELAR_INIT,
base: ENV.BASE_INIT,
binance: true,
binancesmartchain: ENV.BINANCE_SMART_CHAIN_INIT,
Expand All @@ -17,24 +17,24 @@ export const currencyPlugins: EdgeCorePluginsInit = {
cardanotestnet: false, // ENV.CARDANO_INIT,
celo: true,
coreum: ENV.COREUM_INIT,
cosmoshub: true,
cosmoshub: ENV.COSMOSHUB_INIT,
eos: true,
ethereum: ENV.ETHEREUM_INIT,
ethereumclassic: true,
ethereumpow: ENV.ETHEREUM_POW_INIT,
fantom: ENV.FANTOM_INIT,
filecoin: ENV.FILECOIN_INIT,
filecoinfevm: true,
filecoinfevm: ENV.FILECOINFEVM_INIT,
filecoinfevmcalibration: true,
fio: ENV.FIO_INIT,
hedera: true,
hedera: ENV.HEDERA_INIT,
holesky: ENV.HOLESKY_INIT,
liberland: true,
liberland: ENV.LIBERLAND_INIT,
liberlandtestnet: false,
optimism: ENV.OPTIMISM_INIT,
osmosis: ENV.OSMOSIS_INIT,
piratechain: true,
polkadot: true,
polkadot: ENV.POLKADOT_INIT,
polygon: ENV.POLYGON_INIT,
pulsechain: ENV.PULSECHAIN_INIT,
ripple: true,
Expand Down

0 comments on commit 32c0a4c

Please sign in to comment.