Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 1468665

Browse files
authored
Merge pull request #1988 from blockstack/hotfix/remove-hacker-news-proof
Patch to remove some social proofs
2 parents 8103c82 + 0c6841d commit 1468665

3 files changed

Lines changed: 3 additions & 32 deletions

File tree

app/js/profiles/DefaultProfilePage.js

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,7 @@ const accountTypes = [
3838
'twitter',
3939
'facebook',
4040
'github',
41-
'hackerNews',
4241
'bitcoin',
43-
'ethereum',
44-
'pgp',
45-
'ssh',
46-
'linkedIn',
4742
'instagram'
4843
]
4944

@@ -235,7 +230,7 @@ export class DefaultProfilePage extends Component {
235230
})
236231
}
237232

238-
onPostVerificationButtonClick = (event, service, identifier) => {
233+
onPostVerificationButtonClick = (event, service) => {
239234
const profileIndex = this.props.defaultIdentity
240235
const identity = this.props.localIdentities[profileIndex]
241236

@@ -253,11 +248,6 @@ export class DefaultProfilePage extends Component {
253248
verificationUrl = 'https://gist.github.com/'
254249
} else if (service === 'instagram') {
255250
// no op
256-
} else if (service === 'linkedIn') {
257-
verificationUrl = 'https://www.linkedin.com/feed/'
258-
// verificationUrl = `https://www.linkedin.com/shareArticle?mini=true&url=http://www.blockstack.org&title=${verificationText}`
259-
} else if (service === 'hackerNews') {
260-
verificationUrl = `https://news.ycombinator.com/user?id=${identifier}`
261251
}
262252

263253
if (verificationUrl.length > 0) {
@@ -279,9 +269,6 @@ export class DefaultProfilePage extends Component {
279269
hasAccount = true
280270
account.identifier = identifier
281271
account.proofUrl = proofUrl
282-
if (this.shouldAutoGenerateProofUrl(service)) {
283-
account.proofUrl = this.generateProofUrl(service, identifier)
284-
}
285272
this.setState({ profile })
286273
this.saveProfile(profile)
287274
this.refreshProofs()
@@ -290,9 +277,6 @@ export class DefaultProfilePage extends Component {
290277

291278
if (!hasAccount && identifier.length > 0) {
292279
const newAccount = this.createNewAccount(service, identifier, proofUrl)
293-
if (this.shouldAutoGenerateProofUrl(service)) {
294-
newAccount.proofUrl = this.generateProofUrl(service, identifier)
295-
}
296280
profile.account.push(newAccount)
297281
this.setState({ profile })
298282
this.saveProfile(profile)
@@ -365,18 +349,6 @@ export class DefaultProfilePage extends Component {
365349
}
366350
}
367351

368-
shouldAutoGenerateProofUrl(service) {
369-
return service === 'hackerNews'
370-
}
371-
372-
generateProofUrl(service, identifier) {
373-
if (service === 'hackerNews') {
374-
return `https://news.ycombinator.com/user?id=${identifier}`
375-
}
376-
377-
return ''
378-
}
379-
380352
saveProfile(newProfile) {
381353
logger.info('saveProfile')
382354

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "blockstack-browser",
33
"description": "The Blockstack browser",
4-
"version": "0.36.3",
4+
"version": "0.36.4",
55
"author": "Blockstack PBC <admin@blockstack.com>",
66
"dependencies": {
77
"bigi": "^1.4.2",

test/profiles/DefaultProfilePage.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ describe('<DefaultProfilePage />', () => {
5353

5454
describe('with filled accounts', () => {
5555
const filledAccounts = [{ service: 'twitter'},
56-
{ service: 'facebook'},
57-
{ service: 'ssh'}]
56+
{ service: 'facebook'}]
5857
const { wrapper } = setup(filledAccounts)
5958
const list = wrapper.find('div.profile-accounts ul')
6059
it('should order verified proofs alphabetically', () => {

0 commit comments

Comments
 (0)