Skip to content

Commit

Permalink
Merge pull request #860 from dfinity/fix/token-transfer-from
Browse files Browse the repository at this point in the history
Fix/token transfer from
  • Loading branch information
letmejustputthishere authored May 7, 2024
2 parents 60b6fa9 + e5365e9 commit 754d7be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
9 changes: 1 addition & 8 deletions motoko/token_transfer_from/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<Icrc1Ledger.BlockIndex, Text> {
Expand Down
Original file line number Diff line number Diff line change
@@ -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<Icrc1Ledger.BlockIndex, Text> {
Expand Down

0 comments on commit 754d7be

Please sign in to comment.