Commit ce1bb0f3 authored by / /\ / /\/'s avatar / /\ / /\/
Browse files

add 3 steem price message and allow cancel

parent f8f58b0d
...@@ -31,9 +31,15 @@ class CreateCommunity extends React.Component { ...@@ -31,9 +31,15 @@ class CreateCommunity extends React.Component {
updateCommunityOwnerAccountName, updateCommunityOwnerAccountName,
updateCommunityOwnerWifPassword, updateCommunityOwnerWifPassword,
broadcastOps, broadcastOps,
communityCreationPending,
} = this.props; } = this.props;
const handleAccountCreateError = () => { const handleAccountCreateError = error => {
// If the user cancels the account creation do not show an error.
if (error === undefined) {
communityCreationPending(false);
return;
}
this.setState({ accountError: true }); this.setState({ accountError: true });
}; };
...@@ -322,6 +328,13 @@ export default connect( ...@@ -322,6 +328,13 @@ export default connect(
) )
); );
}, },
communityCreationPending: createCommunityAccountPending => {
dispatch(
communityActions.createCommunityAccountPending(
createCommunityAccountPending
)
);
},
}; };
} }
)(CreateCommunity); )(CreateCommunity);
...@@ -185,7 +185,8 @@ export function* createCommunityAccount(createCommunityAction) { ...@@ -185,7 +185,8 @@ export function* createCommunityAccount(createCommunityAction) {
yield put( yield put(
transactionActions.broadcastOperation({ transactionActions.broadcastOperation({
type: 'account_create', type: 'account_create',
confirm: 'Are you sure?', confirm:
'This operation will cost 3 STEEM. Would you like to proceed?',
operation: op, operation: op,
successCallback: res => { successCallback: res => {
createAccountSuccessCB(); createAccountSuccessCB();
...@@ -193,7 +194,7 @@ export function* createCommunityAccount(createCommunityAction) { ...@@ -193,7 +194,7 @@ export function* createCommunityAccount(createCommunityAction) {
}, },
errorCallback: res => { errorCallback: res => {
console.log('error', res); console.log('error', res);
createAccountErrorCB(); createAccountErrorCB(res);
}, },
}) })
); );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment