Skip to content

Commit 728945d

Browse files
🩹 use ledger types directly
1 parent 6edfa86 commit 728945d

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

motoko/token_transfer_from/README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,9 @@ import Error "mo:base/Error";
184184

185185
actor {
186186

187-
type Account = {
188-
owner : Principal;
189-
subaccount : ?[Nat8];
190-
};
191-
192187
type TransferArgs = {
193188
amount : Nat;
194-
toAccount : Account;
189+
toAccount : Icrc1Ledger.Account;
195190
};
196191

197192
public shared ({ caller }) func transfer(args : TransferArgs) : async Result.Result<Icrc1Ledger.BlockIndex, Text> {

motoko/token_transfer_from/src/token_transfer_from_backend/main.mo

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,9 @@ import Error "mo:base/Error";
77

88
actor {
99

10-
type Account = {
11-
owner : Principal;
12-
subaccount : ?[Nat8];
13-
};
14-
1510
type TransferArgs = {
1611
amount : Nat;
17-
toAccount : Account;
12+
toAccount : Icrc1Ledger.Account;
1813
};
1914

2015
public shared ({ caller }) func transfer(args : TransferArgs) : async Result.Result<Icrc1Ledger.BlockIndex, Text> {

0 commit comments

Comments
 (0)