From faac749906b7508a16dbce54b19301618db3b52b Mon Sep 17 00:00:00 2001 From: Apostolof Date: Sun, 15 Nov 2020 17:13:39 +0200 Subject: [PATCH] Add user database --- .../src/constants/OrbitDatabases.js | 20 +++++++++++++++++++ .../src/options/breezeOptions.js | 12 ++--------- 2 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 packages/concordia-app/src/constants/OrbitDatabases.js 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, }, };