Hey folks, I have a question about using ICRC2 transfers in a canister and whether we need to verify the transaction after calling the transfer.
On our canister, we have the following transfer function:
await ICRC.service(Constants.CKBTC_Canister).icrc2_transfer_from({
spender_subaccount = null;
from = _accountFactory(from);
to = _accountFactory(to);
amount;
fee = ?fee;
memo = ?memo;
created_at_time = null;
});
After calling this, if the response is #Ok
, do we just assume the transfer went through and don’t need to check the transaction further?
Should I be calling get_transaction
or a similar method to check that the funds were actually transferred. I guess it’s slower but more secure.
So, my question is: Should we be adding a call to verify the transfer after the transfer_from
? Have others encountered issues where the transfer didn’t go through? Any insights would be appreciated!
Thanks in advance!