Conversation
GriffGreen
left a comment
There was a problem hiding this comment.
in general i think the better strategy is to keep the base token concept and add a second function for non base token transfers....
But this is a jordi call :-D
| uint total = getBalance(); | ||
| // Send the total balance of this contract to the `escapeHatchDestination` | ||
| transfer(escapeHatchDestination, total); | ||
| transfer(baseToken, escapeHatchDestination, total); |
There was a problem hiding this comment.
This has it's own function and should not be added to the constructor
| function transfer(address _to, uint _amount) internal { | ||
| if (address(baseToken) != 0) { | ||
| if (!baseToken.transfer(_to, _amount)) throw; | ||
| function transfer(address _token, address _to, uint _amount) internal { |
There was a problem hiding this comment.
We will have to ask jordi but i think the better design is to have a second function for this
| uint total = getBalance(); | ||
| // Send the total balance of this contract to the `escapeHatchDestination` | ||
| transfer(escapeHatchDestination, total); | ||
| transfer(baseToken, escapeHatchDestination, total); |
There was a problem hiding this comment.
This has it's own function, see claimTokens which may need to be renamed
| function transfer(address _to, uint _amount) internal { | ||
| if (address(baseToken) != 0) { | ||
| if (!baseToken.transfer(_to, _amount)) throw; | ||
| function transfer(address _token, address _to, uint _amount) internal { |
There was a problem hiding this comment.
This has it's own function, see claimTokens which may need to be renamed... Honestly i dont think this contract needs changes
| function authorizePayment( | ||
| string _name, | ||
| bytes32 _reference, | ||
| address _token, |
There was a problem hiding this comment.
I think it is a better strategy to create a second function for non-baseToken transfers... but we need to hear from jordi... it might be a few days
Should fix #35.
Sorry for messing up in #36, I tried to fix it but github didn't updated the commits.