|
@ -15,8 +15,10 @@ import { breeze, drizzle } from '../../redux/store'; |
|
|
import './styles.css'; |
|
|
import './styles.css'; |
|
|
import { TRANSACTION_ERROR, TRANSACTION_SUCCESS } from '../../constants/TransactionStatus'; |
|
|
import { TRANSACTION_ERROR, TRANSACTION_SUCCESS } from '../../constants/TransactionStatus'; |
|
|
import { POST_CONTENT, POST_SUBJECT } from '../../constants/PostsDatabaseKeys'; |
|
|
import { POST_CONTENT, POST_SUBJECT } from '../../constants/PostsDatabaseKeys'; |
|
|
|
|
|
import { FORUM_CONTRACT } from '../../constants/ContractNames'; |
|
|
|
|
|
import { POST_CREATED_EVENT } from '../../constants/ForumContractEvents'; |
|
|
|
|
|
|
|
|
const { contracts: { Forum: { methods: { createPost } } } } = drizzle; |
|
|
const { contracts: { [FORUM_CONTRACT]: { methods: { createPost } } } } = drizzle; |
|
|
const { orbit } = breeze; |
|
|
const { orbit } = breeze; |
|
|
|
|
|
|
|
|
const PostCreate = (props) => { |
|
|
const PostCreate = (props) => { |
|
@ -86,7 +88,7 @@ const PostCreate = (props) => { |
|
|
setPosting(false); |
|
|
setPosting(false); |
|
|
} else if (transactions[transactionStack[createPostCacheSendStackId]].status === TRANSACTION_SUCCESS) { |
|
|
} else if (transactions[transactionStack[createPostCacheSendStackId]].status === TRANSACTION_SUCCESS) { |
|
|
const { |
|
|
const { |
|
|
receipt: { events: { PostCreated: { returnValues: { postID: contractPostId } } } }, |
|
|
receipt: { events: { [POST_CREATED_EVENT]: { returnValues: { postID: contractPostId } } } }, |
|
|
} = transactions[transactionStack[createPostCacheSendStackId]]; |
|
|
} = transactions[transactionStack[createPostCacheSendStackId]]; |
|
|
|
|
|
|
|
|
const { stores } = orbit; |
|
|
const { stores } = orbit; |
|
|