diff --git a/packages/concordia-app/src/constants/OrbitDatabases.js b/packages/concordia-app/src/constants/OrbitDatabases.js new file mode 100644 index 0000000..bf85018 --- /dev/null +++ b/packages/concordia-app/src/constants/OrbitDatabases.js @@ -0,0 +1,20 @@ +export const USER_DATABASE = 'user'; +export const TOPICS_DATABASE = 'topics'; +export const POSTS_DATABASE = 'posts'; + +const databases = [ + { + address: USER_DATABASE, + type: 'keyvalue', + }, + { + address: TOPICS_DATABASE, + type: 'keyvalue', + }, + { + address: POSTS_DATABASE, + type: 'keyvalue', + }, +]; + +export default databases; diff --git a/packages/concordia-app/src/options/breezeOptions.js b/packages/concordia-app/src/options/breezeOptions.js index 8a0e894..b04ff33 100644 --- a/packages/concordia-app/src/options/breezeOptions.js +++ b/packages/concordia-app/src/options/breezeOptions.js @@ -1,4 +1,5 @@ import { EthereumContractIdentityProvider } from '@ezerous/eth-identity-provider'; +import databases from '../constants/OrbitDatabases'; const breezeOptions = { ipfs: { @@ -24,16 +25,7 @@ const breezeOptions = { }, orbit: { identityProvider: EthereumContractIdentityProvider, - databases: [ - { - address: 'topics', - type: 'keyvalue', - }, - { - address: 'posts', - type: 'keyvalue', - }, - ], + databases, }, };