Skip to content

Commit

Permalink
fix bug, update test
Browse files Browse the repository at this point in the history
  • Loading branch information
roadscape committed May 20, 2019
1 parent 54ae09b commit 83679fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/app/redux/TransactionSaga.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,9 @@ export function* createPermlink(title, author) {
const noise = base58
.encode(secureRandom.randomBuffer(4))
.toLowerCase();
permlink = noise + '-' + permlink;
permlink = noise + '-' + s;
} else {
permlink = s;
}

// ensure permlink conforms to STEEMIT_MAX_PERMLINK_LENGTH
Expand Down
4 changes: 1 addition & 3 deletions src/app/redux/TransactionSaga.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ describe('TransactionSaga', () => {
it('should generate own permlink, independent of api if title is empty', () => {
const gen2 = createPermlink('', operation.author);
const actual = gen2.next().value;
expect(
actual.match(/cmt-[0-9]{8}-[0-9]{9}/) !== null
).toEqual(true);
expect(actual.match(/^[a-z0-9]{7,9}$/) !== null).toEqual(true);
});
});

Expand Down

0 comments on commit 83679fd

Please sign in to comment.