diff --git a/motoko/token_transfer_from/README.md b/motoko/token_transfer_from/README.md index 3afca6559..79bbbed2e 100644 --- a/motoko/token_transfer_from/README.md +++ b/motoko/token_transfer_from/README.md @@ -178,20 +178,13 @@ Replace the contents of the `src/token_transfer_from_backend/main.mo` file with import Icrc1Ledger "canister:icrc1_ledger_canister"; import Debug "mo:base/Debug"; import Result "mo:base/Result"; -import Option "mo:base/Option"; -import Blob "mo:base/Blob"; import Error "mo:base/Error"; actor { - type Account = { - owner : Principal; - subaccount : ?[Nat8]; - }; - type TransferArgs = { amount : Nat; - toAccount : Account; + toAccount : Icrc1Ledger.Account; }; public shared ({ caller }) func transfer(args : TransferArgs) : async Result.Result { diff --git a/motoko/token_transfer_from/src/token_transfer_from_backend/main.mo b/motoko/token_transfer_from/src/token_transfer_from_backend/main.mo index 568164978..ab2330bc2 100644 --- a/motoko/token_transfer_from/src/token_transfer_from_backend/main.mo +++ b/motoko/token_transfer_from/src/token_transfer_from_backend/main.mo @@ -1,20 +1,13 @@ import Icrc1Ledger "canister:icrc1_ledger_canister"; import Debug "mo:base/Debug"; import Result "mo:base/Result"; -import Option "mo:base/Option"; -import Blob "mo:base/Blob"; import Error "mo:base/Error"; actor { - type Account = { - owner : Principal; - subaccount : ?[Nat8]; - }; - type TransferArgs = { amount : Nat; - toAccount : Account; + toAccount : Icrc1Ledger.Account; }; public shared ({ caller }) func transfer(args : TransferArgs) : async Result.Result {