Skip to content

56_胡闰祺_第三次作业#46

Open
aceRunqi wants to merge 16 commits intoGuigulive:56-胡闰祺from
aceRunqi:master
Open

56_胡闰祺_第三次作业#46
aceRunqi wants to merge 16 commits intoGuigulive:56-胡闰祺from
aceRunqi:master

Conversation

@aceRunqi
Copy link
Contributor

No description provided.

Copy link

@zchcai zchcai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use SafeMath and Ownable

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function changePaymentAddress(address newEmployeeId) employeeExist(msg.sender) employeeNonExist(newEmployeeId) {
require(newEmployeeId != 0x0);
var oldEmployee = employees[msg.sender];
employees[newEmployeeId] = Employee(newEmployeeId, oldEmployee.salary, oldEmployee.lastPayday);
delete employees[msg.sender];
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(1) require new addr non-zero

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(2) better for employees to change their addresses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants