Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix #23

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contracts/Turnstone.vy
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def _safe_transfer_from(_token: address, _from: address, _to: address, _value: u
def send_token_to_paloma(token: address, receiver: String[64], amount: uint256):
_balance: uint256 = ERC20(token).balanceOf(self)
self._safe_transfer_from(token, msg.sender, self, amount)
_balance -= ERC20(token).balanceOf(self)
assert _balance > 0
_balance = ERC20(token).balanceOf(self) - _balance
assert _balance > 0, "Zero Transfer"
log SendToPalomaEvent(token, msg.sender, receiver, amount)

@internal
Expand All @@ -208,7 +208,7 @@ def submit_batch(consensus: Consensus, token: address, args: TokenSendArgs, mess
assert block.timestamp <= deadline, "Timeout"
assert not self.message_id_used[message_id], "Used Message_ID"
length: uint256 = len(args.receiver)
assert length == len(args.amount)
assert length == len(args.amount), "Unmatched Params"
self.message_id_used[message_id] = True
# check if the supplied current validator set matches the saved checkpoint
assert self.last_checkpoint == self.make_checkpoint(consensus.valset), "Incorrect Checkpoint"
Expand Down