LiskArchive / lisk-elements

⚙️ Library for sending Lisk transactions from the client or server
https://lisk.io/
GNU General Public License v3.0
250 stars 64 forks source link

Fix type 0 transaction to accept undefined asset - Closes #1157 #1160

Closed shuse2 closed 5 years ago

shuse2 commented 5 years ago

What was the problem?

Transfer transaction can have undefined asset field now, but it doesn't accept it

How did I fix it?

if asset field does not exist in transfer transaction, it assigns empty object

How to test it?

create transfer transaction with

{
            "type": 0,
            "amount": "10008298357",
            "fee": 0,
            "timestamp": 0,
            "recipientId": "17033820735302139166L",
            "senderId": "6566229458323231555L",
            "senderPublicKey":
                "d121d3abf5425fdc0f161d9ddb32f89b7750b4bdb0bff7d18b191d4b4bafa6d4",
            "signature":
                "72c9b2aa734ec1b97549718ddf0d4737fd38a7f0fd105ea28486f2d989e9b3e399238d81a93aa45c27309d91ce604a5db9d25c9c90a138821f2011bc6636c60a",
            "id": "5449806225917864483"
}

Review checklist