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

Fix/token transfer from #860

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
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
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