-
Notifications
You must be signed in to change notification settings - Fork 456
Functional test tx type 6 - Subtask #678 - Closes #935 #953
Conversation
213fd24
to
c9b3456
Compare
c9b3456
to
bb31fbe
Compare
830f168
to
ef68d1a
Compare
c790155
to
9478e4d
Compare
081e3ce
to
fac39c6
Compare
07b500b
to
632a168
Compare
632a168
to
5f04316
Compare
Rollback the removal of shared dapp getGenesis function
5f04316
to
77ecc26
Compare
|
||
return sendTransactionPromise(transaction).then(function (res) { | ||
node.expect(res).to.have.property('status').to.equal(400); | ||
node.expect(res).to.have.nested.property('body.message').to.equal('Invalid transaction body - Failed to validate transaction schema: Value -1 is less than minimum 0'); |
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.
Why are we allowing 0 lsk in transfers? The minimum should be 1, just like a type 0.
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.
This the minimum defined by the parent transaction schema, where child types might only have a fee.
Then for an actual transfer
it is checked here in verify: https://github.com/LiskHQ/lisk/blob/development/logic/transfer.js#L62
Schema checks are designed to be less concrete to allow for inheritance pattern.
describe('transactions processing', function () { | ||
|
||
it('invented dapp id should fail', function () { | ||
var inventedDappId = '1'; |
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.
Maybe call this unknownDapp instead.
@@ -104,6 +104,9 @@ function invalidAssets (account, option, badTransactions) { | |||
case 'dapp': | |||
transaction = node.lisk.dapp.createDapp(account.password, null, node.guestbookDapp); | |||
break; | |||
case 'inTransfer': | |||
transaction = node.lisk.transfer.createInTransfer(node.guestbookDapp.id, Date.now(), node.gAccount.password); | |||
break; |
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.
The naming here is odd. The other cases go node.lisk.NAME
.
Here we are using the name of type 0 as the base name. Should it be called intransfer instead?
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.
The naming here is odd. The other cases go node.lisk.NAME.
I believe naming relates to how the lisk-js
API is designed.
Here we are using the name of type 0 as the base name. Should it be called intransfer instead?
This is a correct strategy, using parent/base type name, which all cases are.
Subtask #678
Closes #935