Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 6bb99c7

Browse files
Merge pull request #634 from lightninglabs/fix-uppercase-seed-verify
Set all seed verification input as lowercase
2 parents 8b34672 + e9d5a72 commit 6bb99c7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/action/wallet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class WalletAction {
3737
* @param {string} options.word The seed word
3838
* @param {number} options.index The seed index
3939
*/
40-
setSeedVerify({ word, index }) {
41-
this._store.wallet.seedVerify[index] = word;
40+
setSeedVerify({ word = '', index }) {
41+
this._store.wallet.seedVerify[index] = word.toLowerCase();
4242
}
4343

4444
//

test/unit/action/wallet.spec.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,15 @@ describe('Action Wallet Unit Tests', () => {
4747
});
4848

4949
describe('setSeedVerify()', () => {
50-
it('should clear attributes', () => {
50+
it('should set seed word', () => {
5151
wallet.setSeedVerify({ word: 'foo', index: 1 });
5252
expect(store.wallet.seedVerify[1], 'to equal', 'foo');
5353
});
54+
55+
it('should make seed word lowercase', () => {
56+
wallet.setSeedVerify({ word: 'FOO', index: 1 });
57+
expect(store.wallet.seedVerify[1], 'to equal', 'foo');
58+
});
5459
});
5560

5661
describe('initSetPassword()', () => {

0 commit comments

Comments
 (0)