Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/actions/Actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ export const deleteContacts = (): DeleteContactsAction => ({
});

export const createUser = (name: string) => {
if (name == null) {
return;
}
return async (dispatch, getState: () => AppState) => {
const publicKey = await pssGetPublicKey();
const address = await pssGetBaseAddress();
Expand Down
1 change: 1 addition & 0 deletions src/components/ContactList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ class ListHeader extends React.PureComponent<ListHeaderProps, ListHeaderState> {
address: this.props.user.identity.address,
timestamp: Date.now(),
random: this.props.contactRandom,
name: this.props.user.name,
};
return JSON.stringify(data);
}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/HomeScreenContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const mapDispatchToProps = (dispatch): DispatchProps => {
},
onCreateContact: (data: ContactData) => {
if (isTimestampValid(data.timestamp)) {
dispatch(Actions.createContact(data.publicKey, data.address, '', 'invite-sent'));
dispatch(Actions.createContact(data.publicKey, data.address, data.name, 'invite-sent'));
dispatch(Actions.sendInitiateContact(data.publicKey, data.address, data.timestamp, data.random));
}
},
Expand Down
1 change: 1 addition & 0 deletions src/models/ContactData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ interface ContactData {
address: string;
timestamp: number;
random: string;
name: string;
}