Skip to content

Commit

Permalink
https://github.com/neo-project/neo/pull/2287
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje committed Feb 18, 2021
1 parent bdc90c8 commit 0923c54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion neo3/contracts/native/nativecontract.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ def _post_transfer(self,
from_: vm.StackItem = vm.NullStackItem()
else:
from_ = vm.ByteStringStackItem(account_from.to_array())
engine.call_from_native(self.hash, account_to, "onPayment", [from_, vm.IntegerStackItem(amount), data])
engine.call_from_native(self.hash, account_to, "onNEP17Payment", [from_, vm.IntegerStackItem(amount), data])

def transfer(self,
engine: contracts.ApplicationEngine,
Expand Down
4 changes: 4 additions & 0 deletions neo3/contracts/native/nonfungible.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,7 @@ def _post_transfer(self,
state.append(vm.ByteStringStackItem(token_id))

msgrouter.interop_notify(self.hash, "Transfer", state)

if account_to != types.UInt160.zero() and \
contracts.ManagementContract().get_contract(engine.snapshot, account_to) is not None:
engine.call_from_native(self.hash, account_to, "onNEP17Payment", list(state))

0 comments on commit 0923c54

Please sign in to comment.