This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Add data field option to type 0 transaction creator - Closes#606 #632
Closed
ishantiw
wants to merge
7
commits into
development
from
606-add-data-field-option-to-type-0-transaction-creator
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1c674fa
:seedling: Add data field to transfer 0 type
ishantiw f2de172
✅ Adding test for data field for transfer 0 type
ishantiw 1e40b4c
:recycle: Single flag object for data
ishantiw ed3ea15
:books: Adding new flag description
ishantiw 83a6f66
:recycle: Modified description for data field
ishantiw 184d713
:nail_care: Correcting articles
ishantiw c8c37b3
:nail_care: Correcting language
ishantiw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,7 +81,35 @@ describe('transaction:create:transfer', () => { | |
describe('transaction:create:transfer amount address', () => { | ||
setupTest() | ||
.command(['transaction:create:transfer', defaultAmount, defaultAddress]) | ||
.it('should create an tranfer transaction', () => { | ||
.it('should create a transfer transaction', () => { | ||
expect(transactionUtilStub.validateAddress).to.be.calledWithExactly( | ||
defaultAddress, | ||
); | ||
expect(transactionUtilStub.convertLSKToBeddows).to.be.calledWithExactly( | ||
defaultAmount, | ||
); | ||
expect(getInputsFromSources.default).to.be.calledWithExactly({ | ||
passphrase: { | ||
source: undefined, | ||
repeatPrompt: true, | ||
}, | ||
secondPassphrase: null, | ||
}); | ||
return expect(printMethodStub).to.be.calledWithExactly( | ||
defaultTransaction, | ||
); | ||
}); | ||
}); | ||
|
||
describe('transaction:create:transfer amount address --data=xxx', () => { | ||
setupTest() | ||
.command([ | ||
'transaction:create:transfer', | ||
defaultAmount, | ||
defaultAddress, | ||
'--data=Testing lisk transaction data.', | ||
]) | ||
.it('should create a transfer transaction', () => { | ||
expect(transactionUtilStub.validateAddress).to.be.calledWithExactly( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
defaultAddress, | ||
); | ||
|
@@ -109,7 +137,7 @@ describe('transaction:create:transfer', () => { | |
defaultAddress, | ||
'--no-signature', | ||
]) | ||
.it('should create an tranfer transaction without signature', () => { | ||
.it('should create a transfer transaction without signature', () => { | ||
expect(transactionUtilStub.validateAddress).to.be.calledWithExactly( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
defaultAddress, | ||
); | ||
|
@@ -131,7 +159,7 @@ describe('transaction:create:transfer', () => { | |
defaultAddress, | ||
'--passphrase=pass:123', | ||
]) | ||
.it('should create an tranfer transaction', () => { | ||
.it('should create a transfer transaction', () => { | ||
expect(transactionUtilStub.validateAddress).to.be.calledWithExactly( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
defaultAddress, | ||
); | ||
|
@@ -160,7 +188,7 @@ describe('transaction:create:transfer', () => { | |
'--passphrase=pass:123', | ||
'--second-passphrase=pass:456', | ||
]) | ||
.it('should create an tranfer transaction', () => { | ||
.it('should create a transfer transaction', () => { | ||
expect(transactionUtilStub.validateAddress).to.be.calledWithExactly( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
defaultAddress, | ||
); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"tranfer" --> "transfer"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, good catch, these were old test and these wrong articles caught my eye but I missed out this one 😅