actor
is basically my canister (I’m using ic-use-actor library).
Using an agent
like so…
const agent = await createAgent({
identity,
//host: HOST,
});
const { approve } = IcrcLedgerCanister.create({
agent,
canisterId: process.env.CANISTER_ID_ICP_LEDGER,
});
let approveArgs = {
spender: {
owner : Principal.fromText(principal),
subaccount: []
},
amount: 1000000000000,
expected_allowance: 100000000,
fee: 10000
}
const data = await approve(approveArgs);
console.log(data);
…I’m gettting a Invalid certificate: Signature verification
failed error. Any idea how to solve this one? (I was getting this error a few days ago - see here - this is why I tried to get creative and tried using actor
)