File tree 2 files changed +2
-16
lines changed
motoko/token_transfer_from
src/token_transfer_from_backend
2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -178,20 +178,13 @@ Replace the contents of the `src/token_transfer_from_backend/main.mo` file with
178
178
import Icrc1Ledger " canister:icrc1_ledger_canister" ;
179
179
import Debug " mo:base/Debug" ;
180
180
import Result " mo:base/Result" ;
181
- import Option " mo:base/Option" ;
182
- import Blob " mo:base/Blob" ;
183
181
import Error " mo:base/Error" ;
184
182
185
183
actor {
186
184
187
- type Account = {
188
- owner : Principal;
189
- subaccount : ? [Nat8];
190
- };
191
-
192
185
type TransferArgs = {
193
186
amount : Nat;
194
- toAccount : Account;
187
+ toAccount : Icrc1Ledger. Account;
195
188
};
196
189
197
190
public shared ({ caller }) func transfer(args : TransferArgs) : async Result.Result< Icrc1Ledger.BlockIndex, Text> {
Original file line number Diff line number Diff line change 1
1
import Icrc1Ledger "canister:icrc1_ledger_canister" ;
2
2
import Debug "mo:base/Debug" ;
3
3
import Result "mo:base/Result" ;
4
- import Option "mo:base/Option" ;
5
- import Blob "mo:base/Blob" ;
6
4
import Error "mo:base/Error" ;
7
5
8
6
actor {
9
7
10
- type Account = {
11
- owner : Principal ;
12
- subaccount : ?[Nat8 ];
13
- };
14
-
15
8
type TransferArgs = {
16
9
amount : Nat ;
17
- toAccount : Account ;
10
+ toAccount : Icrc1Ledger . Account ;
18
11
};
19
12
20
13
public shared ({ caller }) func transfer(args : TransferArgs ) : async Result . Result < Icrc1Ledger . BlockIndex , Text > {
You can’t perform that action at this time.
0 commit comments