nebulasio / web-wallet

GNU Lesser General Public License v3.0
265 stars 188 forks source link

Please add a `payload` field to the web wallet UI #54

Closed royguo closed 6 years ago

royguo commented 6 years ago

Hey guys, great job!

I found you have a payload param inside your code here:


// file: go-nebulas/core/pb/block.proto

message Data {
    string type = 1;
    bytes payload = 2;
}

message Transaction {
    bytes hash  = 1;
    bytes from = 2;
    bytes to = 3;
    bytes value = 4;
    uint64 nonce = 5;
    int64 timestamp = 6;
    Data data = 7;
    uint32 chain_id = 8;
    bytes gas_price = 9;
    bytes gas_limit = 10;

    uint32 alg = 11;
    bytes sign = 12;
}```

could you add this field to your web wallet?
ChengOrangeJu commented 6 years ago

Hi @royguo , actually the call/deploy of a smart contract is using this field :)

royguo commented 6 years ago

@ChengOrangeJu

Do you have any other way to make transactions with extra data? e.g. I want to tell the receiver why I send him coins.

ChengOrangeJu commented 6 years ago

Oh, I understand you needs now. We have a 64byte field for data storage for each binary transactions for now, but it is not encouraged in web-wallet to use since there might be some sensitive data. You could use neb.js to write your own script to do the transaction

royguo commented 6 years ago

@ChengOrangeJu thank you.

Then, can you add it to the web-wallet UI? I need to do some tests on it currently.

AFAIK, an extra data field won't hurt anyone, after all the private key we use on the website is more sensitive.

ChengOrangeJu commented 6 years ago

@royguo Thanks for your information. By sensitive I mean illegal data. Before we add this feature to web-wallet ui, we have to have an internal meeting to decide, will let you know the result :)