diff --git a/src/token/main.mo b/src/token/main.mo index 5f87d3c..00904da 100644 --- a/src/token/main.mo +++ b/src/token/main.mo @@ -266,7 +266,12 @@ shared(msg) actor class ICRC1Canister(args : {tokenOwner : Principal}) = this { (result: TxnResult) { let from = _from; let to = _to; - let operation: Operation = #transfer({ action = #send; }); + // destination is minter or not + let operation: Operation = if(_to == owner_){ + #transfer({ action = #burn; }); + } else { + #transfer({ action = #send; }); + }; // check fee if(not(_checkFee(from, _value))){ return #err({ code=#InsufficientBalance; message="Insufficient Balance"; });