Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
lightning-bits
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitsoko services
lightning-bits
Commits
fcf6b9aa
Unverified
Commit
fcf6b9aa
authored
Jun 03, 2019
by
Tankred Hase
Committed by
GitHub
Jun 03, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1129 from lightninglabs/trim-seed-words
Trim seed word whitespace to avoid obscure errors.
parents
89b74488
14226ab2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
wallet.js
src/action/wallet.js
+1
-1
wallet.spec.js
test/unit/action/wallet.spec.js
+5
-0
No files found.
src/action/wallet.js
View file @
fcf6b9aa
...
...
@@ -53,7 +53,7 @@ class WalletAction {
* @param {number} options.index The seed index
*/
setRestoreSeed
({
word
,
index
})
{
this
.
_store
.
seedMnemonic
[
index
]
=
word
;
this
.
_store
.
seedMnemonic
[
index
]
=
word
.
trim
()
;
}
/**
...
...
test/unit/action/wallet.spec.js
View file @
fcf6b9aa
...
...
@@ -382,6 +382,11 @@ describe('Action Wallet Unit Tests', () => {
wallet
.
setRestoreSeed
({
word
:
'foo'
,
index
:
1
});
expect
(
store
.
seedMnemonic
[
1
],
'to equal'
,
'foo'
);
});
it
(
'should trim whitespace'
,
()
=>
{
wallet
.
setRestoreSeed
({
word
:
' foo '
,
index
:
1
});
expect
(
store
.
seedMnemonic
[
1
],
'to equal'
,
'foo'
);
});
});
describe
(
'setFocusedRestoreInd()'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment