AschPlatform / asch-js

Asch frontend library
18 stars 15 forks source link

add group functions #27

Closed bassjobsen closed 6 years ago

a1300 commented 6 years ago

@bassjobsen

Review

1

There are some SPACES where TABS should be. Please have another look

2

The function vote(targetId) function is missing an function argument secret and secondSecret

3

The function vote needs to be constructed with an requestorId and mode set to 1

Thanks! :+1:

bassjobsen commented 6 years ago

Thanks!

Thank you too. I'll fix these issues

bassjobsen commented 6 years ago

@a1300

3

The function vote needs to be constructed with an requestorId and mode set to 1

Are you sure about that. I believe one should create a group transaction first, from the tests:

    trs = {
      secret: group.members[0].secret,
      type: 1,
      fee: 20000000,
      senderId: groupAccount.address,
      args: [
        11230,
        group.members[1].address,
      ],
      mode: 1,
    }

The above transaction got a senderId: groupAccount.address and mode: 1. After that group members may vote on the transaction, and one of them may call group.active after all votes has been gained.

All the above differs from adding a new member, which requires the signature of all other members, see also: https://stackoverflow.com/questions/52367434/how-can-users-sign-a-multi-signed-transaction

bassjobsen commented 6 years ago

closed in favour of #37