Giveth / vaultcontract

Timelock vault for securing the payments
GNU General Public License v3.0
57 stars 30 forks source link

Naming changes in vault #6

Closed GriffGreen closed 7 years ago

GriffGreen commented 7 years ago

Sidenote: thanx for making the code so easy to follow Jordi! It really is a joy to commit extra comments to this contract, you set up the format to natspec for me and organize everything so well, with all of the spenders functions together and all that jazz! Heck! Its even set in standard DAO format with the events at the bottom ;-)

Name Changes

  1. _paymentDalay = _paymentDelay

  2. cancelled = canceled // its an american thing

  3. To disambiguate between Payment payments and payment make payment = p payments = authorizedPayments

so that:

        Payment payment = payments[idPayment];  
        payment.spender = msg.sender;
        // TODO JORDI: MAKE THIS LINE 80 CHAR 
        payment.earliestPayTime = _paymentDalay >= timeLock ? now + _paymentDalay : now + timeLock;
        payment.recipient = _recipient;
        payment.amount = _amount;
        payment.description = _description;
        PaymentAuthorized(idPayment, payment.recipient, payment.amount);
        return idPayment;

becomes

        Payment p = authorizedPayments[idPayment];  // 
        p.spender = msg.sender;
        // TODO JORDI: MAKE THIS LINE 80 CHAR 
        p.earliestPayTime = _paymentDalay >= timeLock ? now + _paymentDalay : now + timeLock;
        p.recipient = _recipient;
        p.amount = _amount;
        p.description = _description;
        PaymentAuthorized(idPayment, p.recipient, p.amount);
        return idPayment;
jbaylina commented 7 years ago

Done!